Re: Lightunino

76 views
Skip to first unread message

Andrew Stone

unread,
Dec 8, 2011, 9:38:03 AM12/8/11
to Phil Spitler, toasted-circu...@googlegroups.com
Hi Phil,

I've never seen this error.  I'm running version 22 of the IDE but I'll upgrade to 1.0 and try it against that right now.  Please check your IDE version and upgrade if it is really old.  Anyone else seen this error?

Cheers!
Andrew

On Thu, Dec 8, 2011 at 1:45 AM, Phil Spitler <ph...@bonfirelabs.com> wrote:
I fixed the issue of it not showing up, I missed the bit about the boards.txt

I added the board and it now shows up, I still get an error when I try and compile the begin_here5.

This is the error:

In file included from begin_here5.cpp:13:
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h:212:26: error: pins_arduino.h: No such file or directory

Any ideas?

Thanks.

Phil



Phil Spitler |   Associate Creative Director  |  Bonfire  |  t : 415.394.8200  |  c : 415.571.3139  |  Bonfirelabs.com




Andrew Stone

unread,
Dec 8, 2011, 10:40:15 AM12/8/11
to Phil Spitler, toasted-circu...@googlegroups.com
Ok, there were several simple issues running with IDE version 1.0 since the Arduino team did a bit of naming "cleanup" that affected libraries.  They are fixed now!  Please download the latest library release (5.1.6).

And please note that you need to change the board definitions in <arduino install dir>/hardware/arduino/boards.txt.  The 2 "lightuino5" board description needs the following lines added:
For the 16 mhz:
lightuino5_16.build.variant=eightanaloginputs
For the 20 mhz:
lightuino5_20.build.variant=eightanaloginputs

If you do not add this line you will get the "error: pins_arduino.h: No such file or directory" error.

Cheers!
Andrew

Andrew Stone

unread,
Dec 9, 2011, 1:58:53 PM12/9/11
to Phil Spitler, toasted-circu...@googlegroups.com
Hi Phil,

First, try to be calm.  You are cramming a semester's worth of learning in a few days!

Some comments:

On Fri, Dec 9, 2011 at 2:17 AM, Phil Spitler <ph...@bonfirelabs.com> wrote:
arghhhh... I'm going nuts here.

 I cannot get anything to happen with my board ;-(

I loaded the basic "blink" sketch and am trying to get it to flash an LED.

The on board LED flashes but I cannot get an external LED to light up.

Great! "Blink" flashes the onboard LED.
 

I have the IDE cable connected to the header pins and the LED in a breadboad. 

I tested the LED by connecting it to the +5 and GND on the board and it works

Its possible that doing that without a resistor will burn out your LED... please make sure they still work!

 
but when I put my jumper into the holes of the IDE cable, nothing happens.

The most common "newbie" problem is connecting the LED backwards.  The Lightuino does not provide the power, it "drains" it away...

Connect the ANODE (+, or long wire) of the LED to (any) +5v (or to pin 37 on the Lightuino -- its the one that's circled).  Try the same 5v source that you know works from your LED test above.
Connect the CATHODE (-) of the LED to one of the pins 0-35 on the IDE cable.

Run the begin_here5 sketch; the "blink" sketch only blinks the one onboard LED. Nothing else.
 

I have tried lots of different pins but no luck, this is driving me nuts, I know I'm a novice but this is crazy.

Embedded work can be frustrating because there are lots of possible problems, software, hardware, connections, and no feedback on what is wrong. 
But I personally tested your board so it does work :-).
 

I chose the Lightunino 20mhz from the board menu before uploading and the fact that the on board LED flashes makes me think that the board is ok.

Yup
 

I have tried different cables too but no luck.

I tried the same sketch on my Uno and it worked great.

Please tell me that I missed a vital step or something.... arghhhh.

When I run the begin_here5 sketch the serial monitor goes through all the stage but still no LEDs light up,

Great!  The board is definitely working.  If you remain stuck we can set up a quick skype call sometime in the next few days, make sure you have a webcam you can point at your stuff and really bright lighting.


Cheers!
Andrew
 

Andrew Stone

unread,
Dec 13, 2011, 9:56:25 AM12/13/11
to Phil Spitler, toasted-circu...@googlegroups.com
Do you mean a 2x20 male connector like the one on the left and right of the Lightuino (to be soldered onto a breadboard) or do you mean something that can be plugged into a solderless breadboard?

The problem with plugging into a solderless breadboard is that you need to transform the 2x20 into 1x40 so that each row on the solderless breadboard is one Lightuino pin.  There is no good source for these so I made my own.  You probably want the IDE to breadboard-only kit, at $9.99.  You need 2 of them since each one handles only one IDE cable.

___ IDE to breadboard or RJ45 (ethernet cable) kit $15 assembled $19.99 (breadboard only $7.50 kit $9.99 assembled). This useful board converts the Lightuino sink connector IDE into either RJ45 connectors (for long runs) and into a single 40 pin row of pins to be plugged into a breadboard.
If you are doing any breadboarding or long runs it is well worth the $ in time savings!
For more info and photos see:  http://groups.google.com/group/toasted-circuits-lightuino/browse_thread/thread/5d5055662df51194
You need 2 of them to fully connect a Lightuino as it has 2 IDE connectors.

You can also cut off the one IDE connector on the cable with scissors, separate each wire with your fingers, strip and "tin" the ends and plug them directly into a breadboard.  This can be pretty labor intensive if you need to do it for all 70 outputs though :-).

Cheers!
Andrew

On Tue, Dec 13, 2011 at 1:51 AM, Phil Spitler <ph...@bonfirelabs.com> wrote:
Thanks Andrew, sorry it took me so long to get back to you.

It works great.

One question, do you know a good source of the 20pin IDE connectors that will fit onto a breadboard?

Andrew Stone

unread,
Jan 8, 2012, 5:55:36 AM1/8/12
to Phil Spitler, toasted-circu...@googlegroups.com
Hi Phil,

There is documentation in the various headers files in the library.  I have not extracted it out yet; I should probably get on that :-).

Specific answers.

On Sun, Jan 8, 2012 at 1:27 AM, Phil Spitler <ph...@bonfirelabs.com> wrote:
Hi Andrew, I got the breakout board fired up and plugged into a breadboard and it seems to work great.

I am now starting to delve into the code and have a few questions, I tried posting to the group but it said my google Apps account was restricted for some reason. I fired an email off to my works admin to see if he put some weird restriction on...

Anyway.

I have been looking through the begin_here5 code and have hacked it down to make some LEDs light up ;-)

However, I am still unsure of the easiest way to light up an LED, on a regular Ardunio I could just do a digital_write and be done.

The first way I did it was to use sinks.set function.


 sinks.set(0xffffffff,0xffffffff,B00111111);  // Each bit in these 3 numbers corresponds to one LED light
 delay(1000);              // wait for a second

 sinks.set(0x00000000,0x00000000,B00000000);  //turn them off
  delay(1000);              // wait for a second


This worked great but I'm still confused and couldn't find any documentation.

What are the 3 parameters in the function? This does blink my LED but I'm guessing it will blink all of them, my LED is on pin 30.

This function turns all LEDs (IDE cable sinks) on or off solid.  The parameters are 70 bits, one for each LED.  The Nth bit turns on/off the Nth LED, "1" means on, "0" means off.
 


Digging around the forum, I found your very useful "setColor" function.

My LED is an RGB one I thought that using this would help me understand.

I have it connected to pins 30,31,32 and I know it works as the begin_Here5 sketch cycles through the r,g,b during some of it's cycle.



This is what I have.

void loop() {

SetColor(30,8000,0,0);

}



void SetColor(int led, int red, int green, int blue)
 {
   int pos = led*3;
   pwm.brightness[pos] = red;
   pwm.brightness[pos+1] = green;
   pwm.brightness[pos+2] = blue;
 }




When i upload this, the LED stays unlit, I'm curious why you are multiplying the pos x 3 in the function. I tried removing the "*3" so that pos becomes 30 which is where my LED is plugged. That still didn't give me anything.

The *3 is just so you can refer to it as the Nth RGB led (in this case it would be the 10th).
 
The problem is very likely that you haven't "turned on" PWM mode.  PWM stands for "pulse width modulation" google it -- and it lets you make a digital wire simulate an analog line, which is what you need to get subtle color variation out of your RGB leds.   Check out: begin_here5 sketch SinkPwmDemo() function:

it calls:

sinks.setBrightness(255);  // to make sure the global brightness control is 100% on
pwm.StartAutoLoop();  // To turn on PWM mode

Call the above functions just ONCE.


At that point, that SetColor function will work!



Is there any other documentation that would help me get a base understanding of what each function does?

Thanks for your help.

Phil








Andrew Stone

unread,
Jan 24, 2012, 6:00:40 PM1/24/12
to Phil Spitler, toasted-circu...@googlegroups.com
Nope, the board will always use the jack if its available.  The board will lose power momentarily when switching from one to the other though so it will reset (and give you a new device name in Linux for example).

Cheers!
Andrew

On Tue, Jan 24, 2012 at 12:23 PM, Phil Spitler <ph...@bonfirelabs.com> wrote:
So if I use the 12v, do I need to disconnect the USB or somehow tell the board to use the 12 instead of the USB power ?

Cheers. 

Phil

On Jan 24, 2012, at 8:42 AM, Andrew Stone <st...@toastedcircuits.com> wrote:

Yes. 3 or 4 depending on the voltage drop on the led.  That's the sole purpose of the 12v transformer vs the 5v.

Cheers!
Andrew

On Jan 24, 2012 2:12 AM, "Phil Spitler" <ph...@bonfirelabs.com> wrote:
Hi Andrew, i was just going back and re-reading your emails when i came across the line below.

I did order a 12v transformer, does than mean I could wire 4 LEDS in series to each of the 70 outputs?

Thanks.

Phil



Reply all
Reply to author
Forward
0 new messages