Go Down

Topic: ProtoSnap LilyPad development board issues (Read 3252 times) previous topic - next topic


Aug 24, 2011, 07:13 pm Last Edit: Aug 25, 2011, 12:31 am by unprinted Reason: 1
I am a bit surprised that no-one seems to have mentioned this here yet. It's a LilyPad Simple with a bunch of other Lilypad items on a board with electrical connections between them so you can play with it without using crocodile clips or conductive thread.


Wonderful idea, but I was having a few problems. I had solved or got around three, but the other escaped me until just after I pressed 'post' :)

The official SparkFun documentation at http://www.sparkfun.com/ProtoSnapLilyPadDev originally said the red of the RGB LED is connected to pin 11 and the green to pin 9. It is actually the other way around (the schematic on the product page is right) and this has now been corrected.

The LilyPad RGB LED turns out to have a green that's infamously dimmer than the red or the blue. If I halve the brightness of the red and blue for any given colour request, the results look 'about' right to me, but some more tuning could be done.

To make sound, see Leah's original buzzer code on her site web.media.mit.edu/~leah/LilyPad/07_sound.html and change / add lines marked with a '//\/\/'

Code: [Select]

    int speakerPin = 7      // on ProtoSnap, buzzer is pin 7  //\/\/
    int speakerPin2 = 12;   // .. and 12.  //\/\/
    void setup()
         pinMode(ledPin, OUTPUT); // sets the ledPin to be an output
         pinMode(speakerPin, OUTPUT); // sets the speakerPin to be an output

         pinMode(speakerPin2, OUTPUT);  // we'll use this one as ground - as neither    //\/\/
         digitalWrite(speakerPin2,LOW); // pin does PWM, it doesn't matter which  //\/\/

The one that took finding it in the documentation was:

When the board arrived it was programmed to go through a small routine involving flashing several (more than two) of the five white basic LEDs. The source code for this program is not provided. Without it, I can get two of them to work (the two connected to digital ports 5 and 6) but how do you get the ones connected to A2, A3 and A4 to work? Do you need to do some low level stuff to tell the CPU that you don't want them as ADC inputs, but you want to be able to write stuff to them?

.. and the answer is, yes :)

In setup() do..

Code: [Select]

  pinMode(A2, OUTPUT);
  pinMode(A3, OUTPUT);
  pinMode(A4, OUTPUT);

.. then you can happily digitalWrite to them. You'll find that the screenprinting on the board is wrong: the rightmost two LEDs (when reading the screenprinting) are attached to (inner) A4 and (outer) A3, i.e. the other way round to what's printed.

Hope this helps other people!


This is rather interesting - thanks for posting it!
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131