APA102 + Pico (problem on write data) #763
Replies: 17 comments
-
Posted at 2015-06-23 by @gfwilliams It's probably that the data is getting sent out too slowly so the lights think its the start of a frame - in Espruino you can just supply the whole array of data at once, like this:
You can use ArrayBufferViews so that you can get a 0-based index for the LEDs, but for now it's probably simpler to just use the single array, and start your LED indices from 4. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-23 by Jorgen Thx @gordon - this is working. Do you know, what this could be and how to solve it? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-24 by @gfwilliams Have you checked your USB cable? Maybe try plugging in direct? That kind of thing usually happens if power is making it to the Pico, but one or both of the USB data pins aren't making contact. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-24 by Jorgen Ah interesting... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-24 by @gfwilliams I do have one (Apple?) USB extension cable with a shitty non-standard socket that scratches away the silkscreen from the back of a Pico. See the image below: If it's like that, it would have shorted a USB data pin to GND, which would cause your problems.Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-24 by Jorgen Damn! this could be the problem. I also use the apple extension cable. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-24 by @gfwilliams The fix is easy though. Just cut into the back of the Pico where I drew the red line, cutting through the traces that are there. Or use another USB extension. Any sensible one will have little sprung bits of metal in it, spaced either side of the centre... and those won't gouge into the PCB and won't short out the data lines even on the board where the Apple extension went through. I shouldn't have added a Micro USB socket outline. I wonder how many people have even used it? Maybe it's something I should just remove on the next revision... It looks like Mini USB wouldn't cause any problems, it's just having the Micro one that sucks.Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-24 by Jorgen I will try this - just another extension cable - if not working, than shorten the traces. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by Jorgen Update:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by DrAzzy I'd ohm it out to verify that no data lines are shorted to eachother or to ground/vcc... since it sounds like that was the cause of the problem. It can be incredibly hard to separate two traces, because the metal gets "smeared" along the cut. And yeah - I don't think many people are using the micro, because those surface mount micro connectors are crap. I don't know about anyone else, but I absolutely use the mini ones because I don't like the bulky extension connectors, and the average quality of extension cables seems to be terrible despite higher prices. 4 ohm resistance along a 1 meter cable's V+ line - and 3 of the 5 I had were like that (well, the other brand was 3.x). Most mini and micro cables are usable for their intended purpose for a while at least (I have a friend who's gone through two micro-USB connectors on her phone - I just ordered her second replacement - and has gone through dozens of micro usb cables. Micro-USB was supposed to have longer operation life, but I can't reconcile that with my experience nor hers - the mini connector seems much sturdier) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by Jorgen @drazzy So do you think I should try to solder on a mini connector? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by @gfwilliams @jorgen wow, strange. As @drazzy says, can you check that the data traces aren't shorted? Also, where you did the cut should be above the area of PCB that got scraped off by the Apple connector. The other thing to watch out for is whether the resonator (tin can) on the other end of the board has got damaged somehow. Maybe you were soldering to the 0.05" pins and accidentally shorted out to it? Without the crystal Espruino will still bravely soldier on and boot, but won't be able to get USB to work :) On these chips, the IOs (especially USB) are pretty heavy duty. It's quite hard to blow them up so I'd have thought we could find a way to get it going again. @drazzy yeah, I'll try and get it taken off the rev 1.4 then. It'd stop this happening in the future. Frustrating really - just because someone asks for it on KickStarter doesn't mean they're representative of real users :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by Spocki @jorgen Did you use a separate power supply for the leds? If not you probably burnt something on the Pico. This would also explain the random colours from post #1. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by Jorgen @spocki yes I do use a external power supply (5V 1A)
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by Jorgen @gordon I will check this on weekend.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by @gfwilliams Thanks! Hopefully you will be able to get the original working though - I can't believe it's that badly broken. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-25 by DrAzzy I take it you did check that none of the USB pins are shorted now? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-06-22 by Jorgen
I have some trouble writing data to APA102 LED strip.

In my example I just do the same as the documentation said.
result is following source:
But it seems that the data I send is not the data I see.
Also if I change the pixel data to show only red pixels; there is always a kind of random colors to see :/
Hope someone can help me here to fix the problem.
Beta Was this translation helpful? Give feedback.
All reactions