Go Down

Topic: Rx & Tx pins used for buttons (Read 551 times) previous topic - next topic

SouthernAtHeart

If I'm only using Rx & Tx for loading the sketch and debugging with the terminal, it should hurt if I'm out of pins, to use them on momentary push buttons?

Coding Badly


SouthernAtHeart

The Uno, and Pro Mini (5 volt)

robtillaart

#3
Mar 31, 2012, 11:43 am Last Edit: Mar 31, 2012, 11:48 am by robtillaart Reason: 1
You can use them as digital pins but you don't have the Hardware Serial anymore. Be sure to disconnect the switches when uploading (or at least don't press them).
Did you know you can also use the analog pins as digitalIO?
Furthermore if you are out of pins you could consider an I2C expansion shile like - http://macetech.com/store/index.php?main_page=product_info&cPath=4&products_id=23 -

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

SouthernAtHeart

I just lack 2 pins, so I think I'll use them.  I normally connect one switch leg to GND and turn on the pins' internal pull up resister, getting a button reading when the pin goes low.  Will this work with the Tx and Rx pins, or should I use 10K resistors on the buttons connected to 5 V, to get get a button reading when the pin goes high?  Or doesn't either way interfer with the Serial transmission, so long as I don't push that button?
Thanks

wildbill

Have you used all the analog pins? Don't forget you can use them as digital pins too - sad to have to give up your debug output if you're making something complex enough to use all your pins.

SouthernAtHeart

6 LCD
5 Miniature Tactile Switch Joystick
4 SPI
2 Motor Control
2 Micro Switches
1 Manual Override Switch
 
This'll be my finished product.  I'm glad I won't have to use any shift out registers

Go Up