Pages: [1]   Go Down
Author Topic: TX on uno board  (Read 355 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can the Tx (pin 1) on a uno board be used as a digitalwrite output pin?
Thanks
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17259
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can the Tx (pin 1) on a uno board be used as a digitalwrite output pin?
Thanks

Yes it can be, if you are not using serial comm in your sketch.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26344
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think you can do this too:

Code:
// in void loop ...

Serial.end();
pinMode (D1, OUTPUT);
// whatever you're doing
:
:
// then turn serial back on
Serial.begin(9600);
:

If you are using Serial, the receiver may be a little confused about what be coming out.
Maybe send a coordination message indicating "stop lstening for 500ms while I send junky serial data out!"
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks
Logged

Pages: [1]   Go Up
Jump to: