Pages: [1]   Go Down
Author Topic: Starterkit buttons dont fit the breadboard?  (Read 970 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So i bought the arduino complete starter kit, with all the resistors led's and other components. In the verry first steps of the book your asked to put a button cross the center of the board. What cought my eye is that everytime i place a button on that locations it dosent make a verry good contact, the pins of the buttons look like there to short. So i started to test this with a little script to actually see whats going on. And yeah i was right, if i look up in the monitor the values i get are not constant (even if not pressing or even touching the button), it keeps swinging from 1 to 0 at random for random periods of time.

To give you guys a idea, here is the buttons i got in the kit
http://store.arduino.cc/eu/index.php?main_page=product_info&cPath=6_33&products_id=183

And this is the breadboard i got. (messurements should be the same onley exept for 840 pins my breadboard is about half the length)
http://store.arduino.cc/eu/index.php?main_page=product_info&cPath=6_32&products_id=25


Here is the code i use to read it out (with 2 buttons 1 reading) i was messing around abit and halfway i looked up a button reading for the monitor. Its partly dutch so  knop = button
Code:
int knop1 = 2; //toewijzen knop1
int knop2 = 3; //toewijzen knop2

void setup(){
  Serial.begin(9600); //port geopent
  pinMode (2,INPUT);
  pinMode (3,INPUT);
}
void loop(){
  int buttonState = digitalRead(2);
  Serial.println(buttonState);
  delay(100);
  knop1 = digitalRead(2); //lezing knop 1
  knop2 = digitalRead(3); //lezing knop 2

Hope somebody could help me out here and give me some advice cause its pritty annoying with buttons falling out of my breadboard all the time. Ty for reading
Logged

Pages: [1]   Go Up
Jump to: