Go Down

Topic: Starterkit buttons dont fit the breadboard? (Read 2288 times) previous topic - next topic


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

And this is the breadboard i got. (messurements should be the same onley exept for 840 pins my breadboard is about half the length)

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: [Select]
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);
  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

Go Up