I already have a code in the arduino IDE, in which when I pass the letter 'l', a led will be access, however, I can not access this serial port with PHP, I'm using Fedora 22, Arduino Uno, the codes are below:
Arduino code, port used / dev / ttyACM0
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
char caracter = Serial.read();
if(caracter == 'l'){
digitalWrite(13, HIGH);
delay(1000);
}
}
PHP code, with the 'l' character
<?php
$porta = fopen("/dev/ttyACM0", "w");
fwrite($porta, 'l');
fclose($porta);
?>
I gave a var_dump in the variable $ port and it returned me false, thank you for all the help.