Pages: [1]   Go Down
Author Topic: Rx & Tx pins used for buttons  (Read 529 times)
0 Members and 1 Guest are viewing this topic.
South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 655
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 210
Posts: 13037
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Which board?
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 655
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Uno, and Pro Mini (5 volt)
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 224
Posts: 13915
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 -

« Last Edit: March 31, 2012, 04:48:08 am by robtillaart » Logged

Rob Tillaart

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

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 655
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 70
Posts: 3741
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

South East USA
Offline Offline
God Member
*****
Karma: 5
Posts: 655
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: