Hi, i am trying to make a radio comunication beetween an arduino uno and a teensy using HC12 module but i have incountered some difficulties.
Following this tutorial https://howtomechatronics.com/tutorials/arduino/arduino-and-hc-12-long-range-wireless-communication-module/ on two original arduinoes no problem, but when i try it on the teensy it does not work.
I read that for the teensy is not that good to use the software serial library, but for me is very important having multiple serial devices connected together and because of that i can't use only the 0 and 1 pins on the teensy.
BTW the code that i am trying to use is this:
How can i solve this issue? Thanks Luca.
Following this tutorial https://howtomechatronics.com/tutorials/arduino/arduino-and-hc-12-long-range-wireless-communication-module/ on two original arduinoes no problem, but when i try it on the teensy it does not work.
I read that for the teensy is not that good to use the software serial library, but for me is very important having multiple serial devices connected together and because of that i can't use only the 0 and 1 pins on the teensy.
BTW the code that i am trying to use is this:
Code:
/* Arduino Long Range Wireless Communication using HC-12
Example 01
by Dejan Nedelkovski, www.HowToMechatronics.com
*/
#include <SoftwareSerial.h>
SoftwareSerial HC12(7, 8); // HC-12 TX Pin, HC-12 RX Pin
void setup() {
pinMode(10, OUTPUT);
digitalWrite(10, LOW);
Serial.begin(9600); // Serial port to computer
HC12.begin(9600); // Serial port to HC12
}
void loop() {
while (HC12.available()) { // If HC-12 has data
Serial.write(HC12.read()); // Send the data to Serial monitor
}
while (Serial.available()) { // If Serial monitor has data
HC12.write(Serial.read()); // Send that data to HC-12
}
}
How can i solve this issue? Thanks Luca.