Flashing the BlinkyTape from Linux appears to brick the strip
I attempted to send over a sketch from the Arduino UI on openSUSE 13.1 and it stalled out and dropped the connection halfway through. It appears to have bricked my Blinkytape. I've tried doing the reset to get it to accept a new sketch, but it doesn't come back. Occasionally I'll see random lights flash, but it won't run any sketches (my own, or from the Blinkytape examples).
I've tried moving it back to my Mac where I was successful before, but it doesn't seem to work on either platform.
I've tried moving it back to my Mac where I was successful before, but it doesn't seem to work on either platform.
Comments
#include
#include
#define LED_COUNT 60 // BlinkyTape has 60 LEDs!
struct CRGB leds[LED_COUNT]; // this struct contains 60 CRGB values. This is where
#define PIN_BUTTON 10
#define PIN_IO_A 7
#define PIN_IO_B 11
#define PIN_SIGNAL 13
#define PIN_INPUT 10
#define NUM_LEDS 8
#define LED_MIN 4
#define SPARKLE_STEP 5
int color_set = 0;
CRGB rgb;
uint8_t lastButtonState = 1;
int count = 0;
int sparkleZones = LED_COUNT/SPARKLE_STEP;
// first, let's get ready to blink using some FastSPI_LED2 routines
// take a look at the FastSPI_LED2 example called Fast2Dev for more usage info
void setup()
{
LEDS.addLeds(leds, LED_COUNT); // this configures the BlinkyBoard - leave as is.
LEDS.showColor(CRGB(0, 0, 0)); // set the color for the strip all at once.
LEDS.setBrightness(0); // start out with LEDs off
LEDS.show(); // you'll always need to call this function to make your changes happen.
pinMode(PIN_BUTTON, INPUT_PULLUP);
}
// we'll make the color fade in and out by setting the brightness
void pulse(int wait_time) {
// let's fade up by scaling the brightness - in general, brightness shouldn't go above 93, so the strip won't draw too much power.
// Oh, and 93 is plenty bright!
for(int scale = 0; scale < 93; scale++) {
LEDS.setBrightness(scale);
LEDS.show();
delay(wait_time);
}
// now let's fade down by scaling the brightness
for(int scale = 93; scale > 0; scale--) {
LEDS.setBrightness(scale);
LEDS.show();
delay(wait_time);
}
}
void loop() {
LEDS.setBrightness(93);
uint8_t buttonState = digitalRead(PIN_BUTTON);
if((buttonState != lastButtonState) && (buttonState == 0)) {
if (count == 0 || count == 1) {
count = count + 1;
}
if (count == 2) {
count = 0;
}
LEDS.showColor(CRGB(0, 0, 0));
LEDS.show();
}
lastButtonState = buttonState;
int waiting_time = 7;
if (count == 0) {
waiting_time = 15;
int pulsar_count = random(LED_MIN,(LED_COUNT/2));
for (int i = 0; i <= pulsar_count; i++) {
leds[(LED_COUNT/2) - i] = CRGB(random(0,255),random(0,255),random(0,255));
leds[(LED_COUNT/2) + i] = CRGB(random(0,255),random(0,255),random(0,255));
LEDS.show();
delay(waiting_time);
}
for (int i = pulsar_count; i >= LED_MIN; i--) {
leds[(LED_COUNT/2) - i] = CRGB(0,0,0);
leds[(LED_COUNT/2) + i] = CRGB(0,0,0);
LEDS.show();
delay(waiting_time);
}
delay(waiting_time);
}
if (count == 1) {
waiting_time = 7;
rgb = CRGB(random(0,255),random(0,255),random(0,255));
for (int i = 0; i < (LED_COUNT + NUM_LEDS); i++) {
if (i < LED_COUNT) {
leds[i] = rgb;
} else {
leds[i - NUM_LEDS] = CRGB(0,0,0);
}
if (i > (NUM_LEDS - 1)) {
leds[i-NUM_LEDS] = CRGB(0,0,0);
}
LEDS.show();
delay(waiting_time);
}
rgb = CRGB(random(0,255),random(0,255),random(0,255));
for (int i = (LED_COUNT - 1); i >= (0 - NUM_LEDS); i--) {
if (i >= 0) {
leds[i] = rgb;
} else {
leds[i + NUM_LEDS] = CRGB(0,0,0);
}
if (i < (LED_COUNT - NUM_LEDS)) {
leds[i+NUM_LEDS] = CRGB(0,0,0);
}
LEDS.setBrightness(93);
LEDS.show();
delay(waiting_time);
}
}
if (count == 2) {
waiting_time = 5;
int ledIndex = 0;
for (int i = 0; i < sparkleZones; i++) {
for (int ledCount = 0; ledCount < SPARKLE_STEP; ledCount++) {
ledIndex = random((SPARKLE_STEP * i),(SPARKLE_STEP * i)+(SPARKLE_STEP - 1));
leds[ledIndex] = CRGB(random(0,255),random(0,255),random(0,255));
pulse(waiting_time);
}
}
}
}
So it's not a blanket "Flashing from Linux results in a brick" issue.
From what I can infer, openSUSE 13.1 should have arduino version 1.0.5.
The reset procedure causes the tape to reset into bootloader mode, but it will only last for 6 seconds or so. Can you try to do the reset again (using your Linux box), then check the system log to see if it gets identified momentarily? Here are the steps:
1. Connect the BlinkyTape to your Linux system
2. Momentarily short the 'reset' hole to 'gnd' on the BlinkyTape controller using two pins, as described in the reset procedure. Touching them momentarily and then releasing should be fine.
3. Check the console to see if the system detected any USB activity:
dmesg | tail -n 20
On my system (running Ubuntu 12.04), it shows me the following for a working BlinkyTape:
matt@ratatoskr:~$ dmesg | tail -n 20
[31413.570301] cdc_acm 4-1:1.0: ttyACM0: USB ACM device
[31414.328380] usb 4-1: USB disconnect, device number 3
[31414.696346] usb 4-1: new full-speed USB device number 4 using uhci_hcd
[31414.760392] hub 4-0:1.0: unable to enumerate USB device on port 1
[31417.004116] usb 4-1: new full-speed USB device number 5 using uhci_hcd
[31417.188174] usb 4-1: New USB device found, idVendor=1d50, idProduct=606c
[31417.188184] usb 4-1: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[31417.188192] usb 4-1: Product: BlinkyTape
[31417.188199] usb 4-1: Manufacturer: BlinkyTape
[31417.190283] cdc_acm 4-1:1.0: ttyACM0: USB ACM device
[31424.496380] usb 4-1: USB disconnect, device number 5
[31424.772041] usb 4-1: new full-speed USB device number 6 using uhci_hcd
[31424.946148] usb 4-1: New USB device found, idVendor=1d50, idProduct=605e
[31424.946151] usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[31424.946159] usb 4-1: Product: BlinkyTape
[31424.946161] usb 4-1: Manufacturer: Blinkinlabs
[31424.949184] cdc_acm 4-1:1.0: This device cannot do calls on its own. It is not a modem.
[31424.949210] cdc_acm 4-1:1.0: ttyACM0: USB ACM device
[31424.956219] input: Blinkinlabs BlinkyTape as /devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.2/input/input9
[31424.956343] hid-generic 0003:1D50:605E.0002: input,hidraw0: USB HID v1.01 Mouse [Blinkinlabs BlinkyTape ] on usb-0000:00:1a.1-1/input2
[61245.519271] usb 3-2: new full-speed USB device number 2 using xhci_hcd
[61245.533072] usb 3-2: New USB device found, idVendor=2341, idProduct=8036
[61245.533080] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[61245.533084] usb 3-2: Product: Arduino Leonardo
[61245.533087] usb 3-2: Manufacturer: Arduino LLC
[61245.535089] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2/input/input18
[61245.535229] hid-generic 0003:2341:8036.0001: input,hidraw0: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:14.0-2/input2
[61245.542008] cdc_acm 3-2:1.0: This device cannot do calls on its own. It is not a modem.
[61245.542056] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
[61245.542583] usbcore: registered new interface driver cdc_acm
[61245.542585] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[61331.962358] usb 3-2: USB disconnect, device number 2
[61332.301483] usb 3-2: new full-speed USB device number 3 using xhci_hcd
[61332.314355] usb 3-2: New USB device found, idVendor=1d50, idProduct=606c
[61332.314362] usb 3-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[61332.314366] usb 3-2: Product: BlinkyTape
[61332.314369] usb 3-2: Manufacturer: BlinkyTape
[61332.314723] usb 3-2: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[61332.315198] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
[61340.066552] usb 3-2: USB disconnect, device number 3
[61340.349949] usb 3-2: new full-speed USB device number 4 using xhci_hcd
[61340.363695] usb 3-2: New USB device found, idVendor=2341, idProduct=8036
[61340.363702] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[61340.363706] usb 3-2: Product: Arduino Leonardo
[61340.363709] usb 3-2: Manufacturer: Arduino LLC
[61340.364274] cdc_acm 3-2:1.0: This device cannot do calls on its own. It is not a modem.
[61340.364294] cdc_acm 3-2:1.0: ttyACM0: USB ACM device
[61340.365756] input: Arduino LLC Arduino Leonardo as /devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2/input/input19
[61340.365918] hid-generic 0003:2341:8036.0002: input,hidraw0: USB HID v1.01 Mouse [Arduino LLC Arduino Leonardo] on usb-0000:00:14.0-2/input2
[61374.557514] thinkpad_acpi: EC reports that Thermal Table has changed
Sorry for all the questions - shoot me an email when you've tried that (if you haven't already) and we'll see about replacing that tape for you -- [email protected]