0

Adalight and Arduino Leonardo
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adalight and Arduino Leonardo

by swissarmy on Thu Apr 25, 2013 9:00 am

Hello,

I've recently bought Arduino Leonardo because I want to upgrade my adalight (125 leds) from Arduino Uno to a faster device. According to some posts here Leonardo has a support for a native usb (or sth like this;) and might be faster than Uno.
My Uno with Windows 7 (aero on), resolution 1920x1080 and Prismatik software gives ~20fps. Turning off aero and fps is much higher ~60-80 fps.

I connected Leonardo the same way as Uno was and uploaded the code ledstream.pde and there is no characteristic RGB flash. The default software programator is "AVRISP mkII".
Program shows that upload is finished without mistakes. During uploading the first led blinks, when it is finished led gives a white light.
What am I doing wrong? Any ideas?

EDIT:
Now I see that tutorial says:
"With the Leonardo, unfortunately the SPI pins are on the 6 pin programming header in the center of the board, so its really not suggested."

So which pins exactly should I use?
Last edited by swissarmy on Thu Apr 25, 2013 3:55 pm, edited 5 times in total.
swissarmy
 
Posts: 41
Joined: Sat Jan 07, 2012 8:57 am

Re: Adalight and Arduino Leonardo

by adafruit_support_bill on Thu Apr 25, 2013 10:00 am

Not sure that a Leonardo would be any faster since it runs at 16MHz like the Uno. http://arduino.cc/en/Main/arduinoBoardLeonardo
SPI for the Leonardo is on the ICSP header. Pin 1 on the Leonardo is designated by a white dot. The pinout for the header is as below:
Attachments
icsp_6pin.png
icsp_6pin.png (2.42 KiB) Viewed 1025 times

adafruit_support_bill
 
Posts: 84355
Joined: Sat Feb 07, 2009 10:11 am

Re: Adalight and Arduino Leonardo

by swissarmy on Thu Apr 25, 2013 11:19 am

That was helfpul, thanks. Now it works as it should.
Unfortunately there is no difference in using Arduino Uno R3 and Arduino Leonardo with 100 leds.
swissarmy
 
Posts: 41
Joined: Sat Jan 07, 2012 8:57 am

Re: Adalight and Arduino Leonardo

by Kev1000000 on Thu Apr 25, 2013 11:21 am

swissarmy wrote:That was helfpul, thanks. Now it works as it should.
Unfortunately there is no difference in using Arduino Uno R3 and Arduino Leonardo with 100 leds.


That isn't good news =( I was hoping for better performance as well.

Swiss, how did you hook up the LED's to the headers? Which specific pins did you use?
Kev1000000
 
Posts: 25
Joined: Mon Apr 22, 2013 1:07 pm

Re: Adalight and Arduino Leonardo

by swissarmy on Thu Apr 25, 2013 2:11 pm

Kev1000000 wrote:Swiss, how did you hook up the LED's to the headers? Which specific pins did you use?


Connecting two strands with each other is easy because plugs are "in" and "out" and fits with each other, no way to connect them incorrectly.

If you mean connecting leds with arduino I attached pictures.

This grey "connector" is made from a cut piece from an old IDE drive cable but it doesn't fit firmly and it's only for testing purposes only :)
Attachments
arduino leonardo.jpg
arduino leonardo.jpg (97.69 KiB) Viewed 996 times
arduino uno.jpg
arduino uno.jpg (88.48 KiB) Viewed 996 times
swissarmy
 
Posts: 41
Joined: Sat Jan 07, 2012 8:57 am

Re: Adalight and Arduino Leonardo

by pburgess on Thu Apr 25, 2013 2:55 pm

"Faster," in the case of the Leonardo, refers to the USB connection and not the CPU speed. You will see less latency with this board, though it won't be hugely pronounced at 100 LEDs. There are many other potential bottlenecks in the system, especially the screen capture speed.

pburgess
 
Posts: 4109
Joined: Sun Oct 26, 2008 2:29 am

Re: Adalight and Arduino Leonardo

by swissarmy on Thu Apr 25, 2013 4:03 pm

I have 125 leds, my mistake, sorry.

A can get a refund for Leonardo so there's no problem.
At least now I can be 100% sure that the bottleneck isn't Arduino Uno R3.
I've already tested Ambibox and it's much faster than Prismatik, but I like Prismatik more because I've been using it from the beginning. For me it's just a matter of habit so maybe I'll switch to Ambibox...

Thanks for help! :)
swissarmy
 
Posts: 41
Joined: Sat Jan 07, 2012 8:57 am

Re: Adalight and Arduino Leonardo

by Kev1000000 on Thu Apr 25, 2013 4:08 pm

Swiss,

How did you wire power through your LED strands?
Kev1000000
 
Posts: 25
Joined: Mon Apr 22, 2013 1:07 pm

Re: Adalight and Arduino Leonardo

by swissarmy on Thu Apr 25, 2013 4:16 pm

It was my friend's job because I didn't know how to do it.
As far as I know he connected power to the beginning of the first strand and the end of the last (5th) strand. My PSU is 5V/10A and don't give me "reddish white" which is a symptom of too weak power.
One thing more - My first led is placed at the RIGHT BOTTOM corner because it's easier to lead cables from there to me.
swissarmy
 
Posts: 41
Joined: Sat Jan 07, 2012 8:57 am

Please be positive and constructive with your questions and comments.