Keypel
July 21, 2019, 5:30am
1
#include <SoftwareSerial.h>
SoftwareSerial mySerial( 7, 8 );
void setup() {
Serial.begin (9600);
mySerial.begin(9600);
}//end void setup
void loop() {
delay (1000);
mySerial.println( "test");
}//end void loop
I've used up all my pins and all I have left is pin 0 and pin 1. How do I convert the above code so that it uses hardware pins 0 and 1?
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.println("test");
delay (1000);
}
system
July 21, 2019, 5:36am
3
I was going to post the exact same answer, then I thought to myself "Self, that's too easy..."
There has to be a catch in what OP's asking, I fear.
Keypel
July 21, 2019, 5:37am
4
Thank You,
I'll try it out. it was for a hc-05 Bluetooth module.
pert
July 21, 2019, 6:28am
5
Be aware that if you connect your HC-05 to some Arduino boards (e.g., Uno, Nano, Pro Mini, Mega), you will no longer be able to upload to the board until you disconnect the HC-05. This is because pins 0 and 1 are also used to communicate with the computer.
I've used up all my pins
Just as a matter of interest what else have you got connected and which Arduino board are you using ?