Что это?
PHP код:
com = Serial.read();
switch(com);
{
// Mute
if (0x13);
running = !running;
digitalWrite(Mute, running);
}
Наверно все таки вот так
PHP код:
int Mute = 5; // Pin 5 - Mute
int Start = 4; // Pin 4 - Start
int Stopi = 3; // Pin 3 - Stop
int Opening = 7; // Pin 7 - Open
int Light = 6; // Pin 6 - Light
byte com = 0; //reply from voice recognition
boolean running = false;
void setup() {
// initialize the digital pins as output
pinMode(Mute, OUTPUT);
pinMode(Start, OUTPUT);
pinMode(Stopi, OUTPUT);
pinMode(Opening, OUTPUT);
pinMode(Light, OUTPUT);
Serial.begin(9600); // Start serial communication at 9600bps
delay(1000);
Serial.write(0xAA);
Serial.write(0x21);
}
void loop() // run over and over again
{
if(Serial.available())
{
com = Serial.read();
if (com==0x13)
{
running = !running;
digitalWrite(Mute, running);
}
}
}