Hi guys ,
I am a new arduino user , but I have a few code language about arduino as well as TFT screens .
So I have copied this example on here :
http://forum.arduino.cc/index.php?topic=287212.15
But when I have a buttons pressed , I can get a label :
4 on or # 4 off .
I would like also change a color when on , like a red , it would be static until a press again .
Please Could someone else help me ?
Thanks so much to read as help me
Code :
if (pressed_button == but4)
if (Status4 == 0 ) {
myButtons.relabelButton(but4, "# 4 ON");
myButtons.drawButton(but4);
Status4 = 1;
digitalWrite(Relay_4, RELAY_ON);
}
else {
myButtons.relabelButton(but4, "# 4 OFF");
myButtons.drawButton(but4);
Status4 = 0;
digitalWrite(Relay_4, RELAY_OFF);
}