Go Down

Topic: Stepper Moves, IR Flashes, Repeat... How? (Read 5455 times) previous topic - next topic


Yes Tom, you just need the push switch wired to the input pin (in my code this is set to pin 3 and I call it ButtonPin) and to Gnd (ground or zero volts).

The INPUT_PULLUP causes the pin (pin 3) to normally be set to high via an internal pullup resistor and the reason for this is that it makes it more stable because if you don't do this and you use electric motors then it can spontaneously change with the electronic noise from the motors.

Here's the tutorial about INPUT_PULLUP   http://arduino.cc/en/Tutorial/InputPullupSerial




Hi Ian

Sorry for the long delay in replying.  I went abroad for a bit on business and have just been too busy to look at this.  Until today. 

I went over it all again and still could not get it to work.  I stripped everything off the breadboard and started again.  Still nothing.  I then tried using a different pin for the button and using the resistor to pull it down to ground.  This, I'm glad to say, worked.  The whole thing is now working exactly how I wanted.  Thanks for all your help on this

Quick question for fun.  I would like to add something that stops you from pressing the button while it's running.  i.e at the moment if you press it and then press it again, it will reset while running the loop.  Also it might be good to have a cancel button to break out of the loop and reset.

Can I get some clues how to do this?


Hi again, if you come over to our forum (see my signature for the link) and post your code I'm sure we can help, we have some good Arduino coders.

Please note also that the newest version of BTInterface works slightly differently.



Go Up