Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

accessing protoshield on board LEDs and button
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

accessing protoshield on board LEDs and button

by hijinx on Fri Oct 12, 2007 12:10 am

Is there any more documentation available for the protoshield besides how to assemble it? I'm specifically wondering how to utilize the extra button and the two LEDs. What do I have to do to, for instance, make the button cause the lights to blink or alternate? That seems like a logical first project.

any pointers would be grand!
hijinx
 
Posts: 5
Joined: Fri Oct 12, 2007 12:07 am

by adafruit on Fri Oct 12, 2007 12:17 am

there's little solder points you can solder a wire into to use the button and led. however, -what- to do with them is kinda beyond the instructions :)

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by hijinx on Fri Oct 12, 2007 12:35 am

I see. It would be nice to have breadboard style connectors for the button and LEDs to make it easier to prototype and experiment with.

I notice when I wire an LED through the button it turns off when I push it. How can I reverse that behavior?

Is there any more documentation on using the protoboard?
hijinx
 
Posts: 5
Joined: Fri Oct 12, 2007 12:07 am

by adafruit on Fri Oct 12, 2007 12:55 am

hijinx wrote:I see. It would be nice to have breadboard style connectors for the button and LEDs to make it easier to prototype and experiment with.


the breadboard style connectors are rather expensive and not available in single pin.

I notice when I wire an LED through the button it turns off when I push it. How can I reverse that behavior?

Is there any more documentation on using the protoboard?


theres the schematic, but the leds and button are general purpose... i dont quite understand what documentation is missing. ???
are you asking how to use buttons and LEDs?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by hijinx on Fri Oct 12, 2007 1:33 am

I guess I don't mean documentation as much as some projects or sample circuits to verify everything is working as it should. Why are the LED's even there? What is a common use for them? It's not obvious to a novice like myself how they should be connected and utilized.

It wouldn't have to be a breadboard, but any kind of solderless connection would be useful for experimenting with the protoboard.

I'll also be doing your tutorials as you post them and I'm looking forward to building a boardino soon.


thanks!
hijinx
 
Posts: 5
Joined: Fri Oct 12, 2007 12:07 am

by adafruit on Fri Oct 12, 2007 1:35 am

ok maybe later ill put something up but im pretty busy right now so it may be a while

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by johanges on Sun Oct 14, 2007 3:08 am

ladyada wrote:the breadboard style connectors are rather expensive and not available in single pin.

They are available in single pin, but they sure are expensive ($0.13/pin), at least from SparkFun. Digi-Key have these that are just under $0.06 each, but they have a minimum quantity of 8,000 (About $461!)

Then again, I probably missunderstood what you meant by "breadboard style connectors".

--j
johanges
 
Posts: 3
Joined: Sat Oct 13, 2007 7:39 pm

Easy Prototyping

by cheese on Fri Oct 19, 2007 3:30 am

The switch and LEDs were, intelligently, included so that you would have access to some basic components commonly used in projects or tests. If you solder a wire to each of the solder points you have a positive lead able to access those components. The components grd is conveniently handled by the pcb with no more work necessary.

A basic example of testing the components and running the ubiquitous "hello world" would be to plug your solder lead from LED1 into pin 13 and then run the example sketch "blink."

I'm a newbie as well (just got my first arduino yesterday), but there is a lot of info out there on the net. Just have to do a little searching. The arduino guide at arduino.cc and ladyada.net are great places to start.

Cheese
cheese
 
Posts: 1
Joined: Fri Oct 19, 2007 3:22 am

by schill on Sun Dec 16, 2007 12:40 am

To make it more convenient to connect to the LEDs and switch, I added a 3-contact female header to the proto shield and connected wires from it to the LEDs and switch.

I assumed that I would be using the board with a Diecimila or Freeduino so the 3-contact female header that connects to the ICSP header on the Arduino is not needed there (the reset is connected through one of the 6-contact headers).

The proto shield I'm using has a tiny solderless breadboard on it. I mounted the 3-contact header in the free area next to the breadboard near the reset switch (facing up like the other femail headers). It can be mounted anywhere that does not interfere with components on the Arduino board underneath. On the bottom of the proto shield, I ran wires from the new header to the solder points for the LEDs and switch. I used 30-ga wirewrap wire. Now, they can be connected to as if they were breadboard connections.

If you are using a larger solderless breadboard, it covers all the available solder points. In this case, you can use the ICSP header solder points (assuming you are not using the ICSP header). You just need to cut the traces from those solder points to the rest of the board to prevent interference with other functions.

schill
 
Posts: 66
Joined: Sat Dec 15, 2007 11:25 pm

by schill on Sun Dec 16, 2007 9:15 pm

johanges wrote:
ladyada wrote:the breadboard style connectors are rather expensive and not available in single pin.

They are available in single pin, but they sure are expensive ($0.13/pin), at least from SparkFun. Digi-Key have these that are just under $0.06 each, but they have a minimum quantity of 8,000 (About $461!)


The machine-pin headers that Sparkfun is selling have significantly smaller holes than the female headers included with the Proto Shield. They will probably accept wire with a maximum diameter similar to the diameter of the wires that resistors have. It's unlikely that you'd be able to insert the 22 gauge solid wire that's usually used with breadboards. The male headers will not plug into them.

schill
 
Posts: 66
Joined: Sat Dec 15, 2007 11:25 pm

by notedoge on Sat Dec 22, 2007 12:46 am

hijinx wrote:
I notice when I wire an LED through the button it turns off when I push it. How can I reverse that behavior?



You should have also noticed that if you just wired, say, LED1 to S1, nothing happens. This is because the circuit looks like the schematic in the arduino tutorial, Lesson 3, right after the "A quick rewiring..." subheading. Everything is connected to ground, there's no current or voltage running through the circuit.

If you look at Lesson 5, figure 5.6, you'll see the schematic of the circuit that pertains to the behavior I think you're looking for. This shows the use of a pull up resistor. Now the LED will be on as long as you're not holding down the push button becuase LED1 will only 'see' the connection to the 5v through the resistors. When you hold down the button, the LED will 'see' a connection to ground, and will turn off.

Make sure you do not connect 5V directly to the switch.
notedoge
 
Posts: 2
Joined: Sat Dec 22, 2007 12:30 am

by notedoge on Mon Dec 24, 2007 3:54 pm

Oops. I realized after posting what I said doesn't do anything different than what you already tried. My bad.
notedoge
 
Posts: 2
Joined: Sat Dec 22, 2007 12:30 am

by adafruit on Tue Jan 08, 2008 5:17 pm

ok i've added a section to the assembly instructions on how to use the 2 LEDs and buttons! (i found my camera :), it fell behind a table )

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by cattycom on Fri May 09, 2008 2:04 pm

I got mine to work, i.e. both leds and the switch work nicely together. It wasn't so easy, though, and may be inoptimal. I will attempt to paste my test program below:

#include <SoftwareSerial.h>

#define led1_pin 2
#define led2_pin 13
#define button2_pin 12

int state1 = 0;
int state2 = 0;

void setup() {
Serial.begin( 9600 );
Serial.println( "blinky switch test!" );
pinMode( button2_pin, INPUT ); // use internal pullup
}

void loop() {

digitalWrite( button2_pin, 1 ); // enable switch circuit
if (digitalRead( button2_pin ) == 0) {

if (! state2) {
state2 = 1;
state1 ^= 1;
Serial.println( "switch: ON!" );
}

} else {

if (state2) {
state2 = 0;
//state1 ^= 1;
Serial.println( "switch: off!" );
}

}

digitalWrite( led1_pin, state1 );
digitalWrite( led2_pin, state2 );

}
cattycom
 
Posts: 1
Joined: Fri May 09, 2008 1:54 pm
Location: LA

Please be positive and constructive with your questions and comments.