LED Belt kit Ubuntu 11.10
Moderators: adafruit_support_bill, adafruit

LED Belt kit Ubuntu 11.10

by grunthus on Thu Dec 06, 2012 6:03 pm

Hi, I have the digital LED belt, following the tutorial here (bought a while ago):
http://www.ladyada.net/make/ledbelt/

Step 1. I can ignore since this is an Ubuntu system (according to tutorial)
Step 2-4 OK
Step 5. Hmm. Which IDE am I supposed to use for this? I took a stab at the windows one and ran it under wine.

Trying to connect to the atmega32u4, the IDE gives the following error on upload:
Binary sketch size: 7096 bytes (of a 28672 byte maximum)
Connecting to programmer: .
Found programmer: Id = "B†"; type = Software Version = Hardware Version =
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?

Anyideas? Thanks in advance
grunthus
 
Posts: 6
Joined: Tue Aug 30, 2011 7:01 pm

Re: LED Belt kit Ubuntu 11.10

by adafruit on Sat Dec 08, 2012 8:40 pm

make sure you hit reset right after uploading!
User avatar
adafruit
 
Posts: 11706
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: LED Belt kit Ubuntu 11.10

by grunthus on Sun Dec 09, 2012 12:46 pm

Hi, confirm I'm pressing the reset after hitting upload, green LED pulses.
Running the IDE under wine, trying different COM ports.

COM1: avrdude: error: buffered memory access not supported. Maybe it isn't a butterfly/AVR109 but a AVR910 device?
COM2: ditto
COM3: avrdude: ser_open(): can't set buffers for "\\.\COM3"
COM4: avrdude: ser_open(): can't set buffers for "\\.\COM4"
COM5: avrdude: ser_open(): can't set buffers for "\\.\COM5"
COM6: ditto
COM7: ditto
COM8: ditto
COM9: ditto

Not sure which COM port wine would map serial port to, but none of them seem to work. Was defaulted to COM2.

I know that the 32u4 breakout has a special version of the IDE - is there a better way of doing this in Ubuntu than using the windows binary under wine. For example, can I apply the modification to a more up-to-date version of the arduino IDE and run it native?

Thanks.
grunthus
 
Posts: 6
Joined: Tue Aug 30, 2011 7:01 pm

Re: LED Belt kit Ubuntu 11.10

by tldr on Sun Dec 09, 2012 4:44 pm

teensyduino can be had for linux, so why bother with windows emulation?
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: LED Belt kit Ubuntu 11.10

by grunthus on Sun Dec 09, 2012 8:30 pm

Thanks tldr, I've been looking into teensyduino. The board which came with the kit is Adafruit's m32u4 breakout board. I ended up here:
http://www.ladyada.net/products/atmega32u4breakout/

The avrdude test worked after changing the port option to -P /dev/ttyACM0:
Code: Select all | TOGGLE FULL SIZE
avrdude -p m32u4 -P /dev/ttyACM1 -c avr109

Connecting to programmer: .
Found programmer: Id = "LUFACDC"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587

avrdude: safemode: Fuses OK
avrdude: ser_close(): can't reset attributes for device: Invalid argument

avrdude done.  Thank you.


So that's good, the board is alive. Interestingly, repeat run of avrdude failed, I had to bump to ttyACM1, so presumably that error message about ser_close() is to blame for that?

So next, I will look into teensyduino, but that will not be this night!
grunthus
 
Posts: 6
Joined: Tue Aug 30, 2011 7:01 pm

Re: LED Belt kit Ubuntu 11.10

by tldr on Sun Dec 09, 2012 11:45 pm

grunthus wrote:Thanks tldr, I've been looking into teensyduino. The board which came with the kit is Adafruit's m32u4 breakout board. I ended up here:
http://www.ladyada.net/products/atmega32u4breakout/


oh. i followed the link in your first post and saw all the teensyduino stuff. it's also an m32u4, but adafruit uses a different bootloader, so i was kind of confused.

mostly, i was curious as to why you were running all this stuff in a windows emulator, since all of the tools are unix native, except the ide which is java and, thus, os agnostic.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: LED Belt kit Ubuntu 11.10

by grunthus on Sun Dec 16, 2012 8:29 pm

I've started over and made a good bit of progress. I've gone the teensyduino route to try and get the LED belt kit to work. This is a 64bit box, so I have installed the 64 bit versions.

1. Installed Arduino 1.0.2 from arduino.cc
2. Installed teensyduino from http://www.pjrc.com/teensy/td_download.html
3. Edited boards.txt, vendor IDs and USB descriptors (but left avrdude as installed version is v5.10) as instructed here: http://www.ladyada.net/wiki/products/at ... 1302835337

In the IDE if I set the board to be a Teensy 2.0, the Advanced LED beltkit tutorial compiles, but fails to upload with this error:
Please press the RESET BUTTON on your Teensy to upload your sketch. Auto-reboot only works if the Teensy is running a previous sketch.


Pressing reset in any combination of before or after 'upload' results in the same error. Tried with /dev/ttyACM0, ttyS0, ttyS1.

OK, so then tried switching to Atmega32u4. This results in compiler errors:
Code: Select all | TOGGLE FULL SIZE
In file included from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/wiring.h:32,
                 from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/WProgram.h:19,
                 from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/Arduino.h:1,
                 from /home/chris/arduino-1.0.2/libraries/SPI/SPI.h:15,
                 from advancedLEDbeltKit.pde:15:
/home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/core_pins.h:1914:4: error: #error "Clock must be 16, 8, 4, 2 or 1 MHz"
In file included from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/wiring.h:32,
                 from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/WProgram.h:19,
                 from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/Arduino.h:1,
                 from /home/chris/arduino-1.0.2/libraries/SPI/SPI.h:15,
                 from advancedLEDbeltKit.pde:15:
/home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/core_pins.h: In function ‘void delayMicroseconds(uint16_t)’:
/home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/core_pins.h:1916: error: ‘tmp’ was not declared in this scope
/home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/core_pins.h:1933: error: invalid lvalue in asm output 0
In file included from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/WProgram.h:25,
                 from /home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/Arduino.h:1,
                 from /home/chris/arduino-1.0.2/libraries/SPI/SPI.h:15,
                 from advancedLEDbeltKit.pde:15:
/home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/HardwareSerial.h: In member function ‘void HardwareSerial::begin(uint32_t, uint8_t)’:
/home/chris/arduino-1.0.2/hardware/teensy/cores/teensy/HardwareSerial.h:11: error: ‘null’ was not declared in this scope
In file included from advancedLEDbeltKit.pde:17:
/home/chris/arduino-1.0.2/libraries/TimerOne/TimerOne.h: In member function ‘void TimerOne::setPeriod(long unsigned int)’:
/home/chris/arduino-1.0.2/libraries/TimerOne/TimerOne.h:47: error: ‘null’ was not declared in this scope


Some kind of missing header file? Hope someone has seen this before.

Thanks,

Chris
grunthus
 
Posts: 6
Joined: Tue Aug 30, 2011 7:01 pm