Put wamp server online
$serial->confStopBits(1) //Stop bits (this is the "1" in "8-N-1") ******THIS PART OF THE CODE WAS NOT NEEDED $serial->confCharacterLength(8) //Character length (this is the "8" in "8-N-1") ******THIS PART OF THE CODE WAS NOT NEEDED $serial->confParity("none") //Parity (this is the "N" in "8-N-1") ******THIS PART OF THE CODE WAS NOT NEEDED YOU CAN FIND THIS UNDER THE ARDUINO SOFTWARE'S MENU
#Put wamp server online serial
SET THIS TO WHATEVER YOUR SERIAL DEVICE HAPPENS TO BE, (Thanks you rule!!) to communicate with the Arduino Serial! Put the above class in the same folder/directory as this. The second PHP approach uses an extra PHP class you need to import… **Note: you’ll notice a sleep() function in there… this is ONLY there because I have NOT disabled the AUTO-RESET on SERIAL OPEN/CLOSE that the Arduino does (either by edit bootloader/firmware or by adding resistor) Now… I have actually gotten ‘2’ different PHP examples working…ġ.) this doesnt seem to use any other extra PHP classes or anything. Preform the code to switch on or off the ledsĭigitalWrite(ledPin13, HIGH) //If the serial data is 0 turn red LED onĭigitalWrite(ledPin13, LOW) //If the serial data is 0 turn red LED onĭigitalWrite(ledPin13, LOW) //If the serial data is 1 turn red LED off IncomingByte = Serial.read() // read the oldest byte in the serial buffer Serial.println(“Serial data available…”) PinMode(ledPin13, OUTPUT) // initialize the green LED pin as an output Serial.begin(9600) // initialize serial communication Int incomingByte // a variable to read incoming serial data into Int ledPin13 = 13 // the pin that the green LED is attached to The Arduino code/sketch I am using as a quick test to determine if the incomingByte is a 1 or a 0. (I made a folder called arduino_projects) (or left click on WAMP icon in sys tray and choose ‘www directory’ to go to folder) Once you have that installed you can make a folder in the www directory: C:\wamp\www