I've looked at a lot of examples on how to communicate using PHP. However, I'm running into a problem.
I'm trying to set the PWM of an LED by using PHP. For example, I would like to send a value from 0 to 255 and have the Arduino write the value to the LED.
The problem i'm having is that i can't seem to find the appropriate way to send/receive the value to properly set the PWM.
I'm using fwrite() in PHP to send commands but I need help to determine how to process the value. I tried using a byte array and couldn't really get that working correctly. Let me know if you need anything else.
I took that into consideration and put a 120ohm resistor between the RESET and 5V pin. I also flashed another LED in the setup() and it never came on unless i hit the reset button.
I used PortMon to verify that PHP was sending the correct data and it is. The Rx LED on the Arduino flashes when i send the character. If i use the Serial Monitor and send an 'a' it works correctly, just not with PHP.
That's too bad. PHP on Windows can't read from the serial port. It's a failing of some underlying Microsoft software. Otherwise, you could have the Arduino send serial data back, which would make debugging easier.