Cactus Micro Rev 2, external usb power problem [SOLVED]


#1

Hi!
I’m powering cactus with an external source of energy usb.It turns on, but does not work. Powering from the computer instead everything works properly. I tried several USB adapters but not working.

Some idea?
Thank you.


#2

I’m sorry!

SOLVED

I forgot

while(!Serial);


#3

Thank you! This has been puzzling me for months!

A little more detail for those with the same problem, if you started with the ‘HTTP post’ example from github.com/AprilBrother/cactus-micro-r2

Line 107 waits forever for the USB serial port to show up. This never happens if your cacus micro is powered from the wall with no computer. Change line 16 from 1 to 0.


#4

In fact all arduino board based on 32u4 has the problem. The Serial only work when it wire to a PC. It’s a virtual serial port.


#5

Now I have a new problem - I uploaded the code where it does not wait for Serial to be ready (line 107), and now I cannot program it anymore.

dmesg shows the device connects
[76000.606353] usb 2-2: new full-speed USB device number 10 using xhci_hcd
[76000.738964] cdc_acm 2-2:1.0: ttyACM0: USB ACM device
[76000.741048] input: SparkFun LilyPadUSB as /devices/pci0000:00/0000:00:14.0/usb2/2-2/2-2:1.2/0003:1B4F:9208.0005/input/input20
[76000.794674] hid-generic 0003:1B4F:9208.0005: input,hidraw0: USB HID v1.01 Mouse [SparkFun LilyPadUSB ] on usb-0000:00:14.0-2/input2

the 1 second later it disconnects.
[76001.175044] usb 2-2: USB disconnect, device number 10

Fix found: Press the reset button twice to force the chip into bootloader mode.


#6

Great!

It will happened if you choose a wrong board type to upload sketch