hello I'm trying to connect ZS 040 bluetooth module with my arduino due, vcc pin is connected to 3.3v and gnd to gnd of arduino now rx and tx pins are connected to tx1 and rx1 of due. I'm using the following code
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
if(Serial.available() > 0){
char inByte = Serial.read();
switch (inByte) {
case '0':
digitalWrite(13, HIGH);
break;
case '1':
digitalWrite(13, LOW);
delay(1000); // wait for a second
}}}
the same code is working fine with arduino uno and bluetooth module.