The new Raspberry Pi B Model B+ is here - Pick one up in the store and check our detailed guide!

How to access L1 and L2 in the SD shield?

by flyerx on Tue Aug 21, 2012 3:58 pm

Hello,

I am trying to use the L1 and L2 LEDs included with the SD logging shield. The shield is connected to an Arduino UNO R3. What pins and/or jumpers I need to use to get the LEDs to work? Also what are the functions of the three jumpers in the SD shield?

Thanks,

FlyerX
flyerx
 
Posts: 2
Joined: Tue Aug 14, 2012 2:33 am

Re: How to access L1 and L2 in the SD shield?

by adafruit_support_rick on Tue Aug 21, 2012 4:14 pm

[EDIT - this is the right answer]
The LEDs are connected to JP11 (the two holes labelled "LEDS"). From there, you have to connect them yourself to whatever digital IO pins you want to use. They already have current-limiting resistors, so you can connect directly to digital IO pins.
User avatar
adafruit_support_rick
 
Posts: 10746
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: How to access L1 and L2 in the SD shield?

by pgrunwald on Tue Dec 25, 2012 5:04 pm

Do these work the same on the new version of the board?
pgrunwald
 
Posts: 33
Joined: Tue Jul 14, 2009 9:32 pm

Re: How to access L1 and L2 in the SD shield?

by adafruit_support_rick on Wed Dec 26, 2012 10:18 am

pgrunwald wrote:Do these work the same on the new version of the board?

You mean the pre-assembed version? Yes - you still have to wire them to digital IO pins.
User avatar
adafruit_support_rick
 
Posts: 10746
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: How to access L1 and L2 in the SD shield?

by pgrunwald on Wed Dec 26, 2012 12:13 pm

I did wire both (not at the same time) L1 and L2 to pin 0. I set pin 0 to OUTPUT. The LED comes on at power up and digital write with HIGH or LOW does not do anything.

What am I missing? I'm using a arduino duemilanove as the base board.

TIA,
Paul
pgrunwald
 
Posts: 33
Joined: Tue Jul 14, 2009 9:32 pm

Re: How to access L1 and L2 in the SD shield?

by JD3 on Wed Dec 26, 2012 12:49 pm

Digital pins 0 and 1 are used for serial communication. When you upload a sketch these two pins are used.

Try using a different digital pin.

Also write a simple sketch to just turn on the LED's. The Blink sketch in the File\ Examples\ Basic folder works.
Change the LED value to the digital pin you are using.
That little black caterpillar you just stepped on will set you back a few bucks....
JD3
 
Posts: 101
Joined: Sat Jul 28, 2012 7:01 am

Re: How to access L1 and L2 in the SD shield?

by pgrunwald on Wed Dec 26, 2012 1:23 pm

OK, I will try that ,thanks.

BTW, I was going from here: http://arduino.cc/en/Main/ArduinoBoardDuemilanove

"Each of the 14 digital pins on the Duemilanove can be used as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions. "

I thought I could take over the pin after the sketch was loaded?

-Paul
pgrunwald
 
Posts: 33
Joined: Tue Jul 14, 2009 9:32 pm

Re: How to access L1 and L2 in the SD shield?

by adafruit_support_rick on Wed Dec 26, 2012 1:42 pm

pgrunwald wrote:I thought I could take over the pin after the sketch was loaded?

Yes, you can. Perhaps there is something wrong with your code. If you post it, we can have a look.
User avatar
adafruit_support_rick
 
Posts: 10746
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: How to access L1 and L2 in the SD shield?

by pgrunwald on Wed Dec 26, 2012 8:26 pm

Uh, DOH! <hangs head sheepishly...>

file:///G:/Arduino/arduino-1.0.3/reference/Serial.html

"Used for communication between the Arduino board and a computer or other devices. All Arduino boards have at least one serial port (also known as a UART or USART): Serial. It communicates on digital pins 0 (RX) and 1 (TX) as well as with the computer via USB. Thus, if you use these functions, you cannot also use pins 0 and 1 for digital input or output."
pgrunwald
 
Posts: 33
Joined: Tue Jul 14, 2009 9:32 pm