#define ANALOG_PIN 0
void setup()
{
Serial.begin(9600);
}
void loop()
{
if (Serial.available() > 0) {
if (Serial.read() == '1')
Serial.print(analogRead(ANALOG_PIN), DEC);
}
}
//E o do PHP:
PHP Warning: fopen(/dev/ttyUSB0): failed to open stream: Permission denied in /home/LBUImH/prog.php on line 18
PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /home/LBUImH/prog.php on line 20
PHP Warning: fgets() expects parameter 1 to be resource, bool given in /home/LBUImH/prog.php on line 22
PHP Warning: fclose() expects parameter 1 to be resource, bool given in /home/LBUImH/prog.php on line 23