من میخوام hc-05 رو با اردوینوو مگا راه بندازم.اطلاعات از کنسول سریال اردوینو به گوشی میره ولی هر کار میکنم اطلاعات از گوشی نمیاد کنسول.تازه کارم
#include <SoftwareSerial.h>
SoftwareSerial Bluetooth(19,18);
void setup() {
Serial.begin(9600);
Bluetooth.begin(9600);
pinMode(36,OUTPUT);
}
void loop() {
if(Serial.available()){
Bluetooth.write(Serial.read());
}
if (Bluetooth.available()){
Serial.println(Bluetooth.read());
}
// put your main code here, to run repeatedly:
}
#include <SoftwareSerial.h>
SoftwareSerial Bluetooth(19,18);
void setup() {
Serial.begin(9600);
Bluetooth.begin(9600);
pinMode(36,OUTPUT);
}
void loop() {
if(Serial.available()){
Bluetooth.write(Serial.read());
}
if (Bluetooth.available()){
Serial.println(Bluetooth.read());
}
// put your main code here, to run repeatedly:
}
دیدگاه