I want to when pressing button send data to slav bluetooth and run my some other staff. the first code is working but when I add some extra code and I press button. serial monitor for slav bluetooh doesn't respond
BluetoothSerial.write is working
if(currentHalfStep != LastHalfStep){
if(currentHalfStep == HIGH){
delay(100);
BluetoothSerial.write('C');
Serial.println("half step button clicked");
}
delay(50);
}
LastHalfStep = currentHalfStep;
BluetoothSerial.write is not working
if(currentHalfStep != LastHalfStep){
if(currentHalfStep == HIGH){
delay(100);
BluetoothSerial.write('C');
Serial.println("half step button clicked");
changeCount(2); // added function
}
delay(50);
}
LastHalfStep = currentHalfStep;