well im about to do the same but ill make a qr code(2d barcode) for the php site and make a circut to connect it as a remote for my tv or anything else
@emlygo Sounds interesting. How are you planning on implementing the QR code? Will you be using a camera phone or something? Sounds like a neat project.
@bhyltng In this case yes it does. Now if you were to hook up an ethernet shield it would not need to be directly connected to the computer. But that is a completely different project too.
Please can you send me the source code for the project. Thank you. I will be using a Linux box (running Ubuntu Karmic Koala) with a built in serial port and Apache web server... I hope that this hardware/OS functions with you software!
Please can you send me the source code for the project. Thank you. I will be using a Linux box (running Ubuntu Karmic Koala) with a built in serial port and Apache web server... I hope that this hardware/OS functions with you software!
For everyone that have "strange" url when they click on command, or < in the links-you need to enable "short open tag" in php.ini or replace short php tags in the code.
For me-code is working perfect by Serial Monitor, but it has problems with WEB GUI. (13pin LED is blinking on every command).
After adding 5V fix, LED just turn on and stay on, on every GUI command. Any ideas?
@Winsucker i have found a "fix": replace: if (incomingByte == '1') { in Arduino with if (incomingByte == 'f') { and in php: $serial->sendMessage("1/r"); with $serial->sendMessage("f"); (also delete /r from other ones) for "green" LED i have use "9" for ON state and "e" for "OFF" state. that should work with +5V on RESET pin.
@KINDanon Have you modified any of the PHP code other than the port settings in your PHP code? If not, and you have the correct port settings in the PHP code it should be working. I have noticed that I need to keep the Arduino's serial monitor running in order for everything to continue to work. Are you on PC or Mac? Also, have you modified the Arduino Sketch? The PHP code works by sending a string of one character and a new line each time through the serial port. You can view by using terminal.
@djrock9000 Strange... Sending commands through the Arduino terminal works perfectly. Sending the exact same commands through the PHP script doesn't work. I checked with a serial sniffer. jbcse.com/screenshots/phpvsarduino.png
The arduino alone works with the sketch. However, I haven't been successful at sending signal from the PHP page. I was wondering if you could help me to set up com ports (Mac or Windows) on the PHP script to make it work.
@georgeflacker Sorry I didn't get back to you sooner. The COM port in the PHP script is the one I used in my setup and would only work in my situation. So in your case, to find which port your Arduino is on, open your Arduino coding software and in the menu Tools -> Serial Port there will be a list of ports copy exactly the name of the port you use and input it into the PHP code where it says
How yo doing man. I set up XAMPP localhost on my computer to give this a try. However when I click on GREEN LED ON or any other link I get this as a response.
Is there something I am missing in the XAMPP settings?:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
@georgeflacker - Are you using OSX, Linux, or Windows? Try connecting the Arduino and opening the Arduino coding software with the project loaded and using the "Serial Monitor" send the commands manually to the Arduino that way and let me know if they make it to the Arduino.
I can't get the links to work correctly. I've loaded the sketch and everything works fine from the serial monitor but when I try to click a link I'm getting "You dont have permission...". Any help! Please!
@purpulhaze - There could be many things wrong. Try keeping the Arduino monitor open while you try the buttons. Second, did you replace the code that specifies your serial device with the correct one? You will find this setting in the PHP code you visit to control the Arduino. Let me know how it works for you.
Are you using a USB to Serial device or anything similar. Are you using a Mac or PC. The code should work with both. I have not tried the code on a PC though. Just on a Mac.
This is a perfect example for my project. My goal is to use mouseover events on an HTML table to drive the Arduino. I can easily post these client side mouseovers to the server code you are showing here. Can't wait to see how responsive this might be.
warning, the start says the code is available at the end, 3 mins later he says you have to subscribe and mail him for the source,,just get the wiz5100 shield and read the examples all of which are open source and switching leds will seem pretty simple
@mikemargo - Yes! I did say you need to subscribe. But...I have given the code to tons of people who have not subscribed. If you want the code, I would be more than happy to give it to you. Just ask. You'd be surprised how far politeness will get you on the internet. I know I was! The reason I want people to subscribe is so I can start a small tech community. I am in the process of setting up forums and a blog right now! Thanks for your concern though! Happy YouTubing!
Hi, well i am working in some project like this to the university, and i am having some kind of troubles with the part that you solve, the comunicacion via serial port from a webpage using PHP, so please , could you hepl me with the source code, thanks a
This has been flagged as spam show
i need the codes for ardiuno with gps-gprs to connect with my web page if you can send me code i will be thanks my emil eng.mmk@hotmail.com
5maiseh 3 weeks ago
nice job men, i want the code too ;)
jesusmbrc 2 months ago
Could you help me with your code? I'm already following your channel. I really apreciate if you helpe me with this code to study as a sample.
cb4603 4 months ago
@cb4603 I actually didn't write the code but if you have questions I might be able to help.
djrock9000 4 months ago
where can i see the code? im tryin to send an enter key through php serial for a php serial to gsm modem comm... i need help.
kitho13 5 months ago
@kitho13 On my blog site. Its missionduke(dot)com/arduino-projects/
djrock9000 5 months ago
Very cool! I like what you do.
sjaungere 9 months ago
@sjaungere Thanks I like doing it. I love electronics and technology.
djrock9000 9 months ago
@djrock 9000 - thanks
wire54321 10 months ago
How do i set the com port?
I am running a windows xp and my Arduino com port is 5
where do i set the COM port and what code do i use to set it?
thanks,
Wire54321
wire54321 10 months ago
@wire54321 - Search for the line
$serial->deviceSet("/dev/tty.usbserial-A7006QCP");
and change to
$serial->deviceSet("COM5");
This should help.
djrock9000 10 months ago
well im about to do the same but ill make a qr code(2d barcode) for the php site and make a circut to connect it as a remote for my tv or anything else
emlygo 1 year ago
@emlygo Sounds interesting. How are you planning on implementing the QR code? Will you be using a camera phone or something? Sounds like a neat project.
djrock9000 1 year ago
great. hi im new to this i have a question does the circuit needs to be connected to the computer?
bhyltng 1 year ago
@bhyltng In this case yes it does. Now if you were to hook up an ethernet shield it would not need to be directly connected to the computer. But that is a completely different project too.
djrock9000 1 year ago
This has been flagged as spam show
Please can you send me the source code for the project. Thank you. I will be using a Linux box (running Ubuntu Karmic Koala) with a built in serial port and Apache web server... I hope that this hardware/OS functions with you software!
Zenophilia 1 year ago
Please can you send me the source code for the project. Thank you. I will be using a Linux box (running Ubuntu Karmic Koala) with a built in serial port and Apache web server... I hope that this hardware/OS functions with you software!
Zenophilia 1 year ago
@Zenophilia - Hello. I have the source code posted in .zip files on my blog site. Visit:
missionduke(DOT)com/arduino-projects/
djrock9000 1 year ago
Hi!
First-thanks for the code!
For everyone that have "strange" url when they click on command, or < in the links-you need to enable "short open tag" in php.ini or replace short php tags in the code.
For me-code is working perfect by Serial Monitor, but it has problems with WEB GUI. (13pin LED is blinking on every command).
After adding 5V fix, LED just turn on and stay on, on every GUI command. Any ideas?
Tnx again for sharing.
Winsucker 1 year ago
Winsucker 1 year ago
@Winsucker - Yeah I found that adding the +4v on the reset pin helps a lot with it trying to reset.
djrock9000 1 year ago
@djrock9000 - I mean +5v...Oops!
djrock9000 1 year ago
Can you tell me why only the "turn the GREEN LED on" link works for me?
KINDanon 1 year ago
Can you tell me why only the "turn green light on" link works for me?
KINDanon 1 year ago
@KINDanon Have you modified any of the PHP code other than the port settings in your PHP code? If not, and you have the correct port settings in the PHP code it should be working. I have noticed that I need to keep the Arduino's serial monitor running in order for everything to continue to work. Are you on PC or Mac? Also, have you modified the Arduino Sketch? The PHP code works by sending a string of one character and a new line each time through the serial port. You can view by using terminal.
djrock9000 1 year ago
@djrock9000 Strange... Sending commands through the Arduino terminal works perfectly. Sending the exact same commands through the PHP script doesn't work. I checked with a serial sniffer. jbcse.com/screenshots/phpvsarduino.png
KINDanon 1 year ago
@KINDanon I have a possible fix coming here in a few minutes. I have a short video on it.
djrock9000 1 year ago
The arduino alone works with the sketch. However, I haven't been successful at sending signal from the PHP page. I was wondering if you could help me to set up com ports (Mac or Windows) on the PHP script to make it work.
Thanks in advance!
georgeflacker 1 year ago
@georgeflacker Sorry I didn't get back to you sooner. The COM port in the PHP script is the one I used in my setup and would only work in my situation. So in your case, to find which port your Arduino is on, open your Arduino coding software and in the menu Tools -> Serial Port there will be a list of ports copy exactly the name of the port you use and input it into the PHP code where it says
/dev/tty.usbserial-A7006QCP
You may have to try all of the items.
Let me know if this works.
djrock9000 1 year ago
@djrock9000 I have a possible fix coming for your problem. Its a short video.
djrock9000 1 year ago
@georgeflacker Are you using a Mac or PC with windows or linux/unix? Then I can help a little better. :)
djrock9000 1 year ago
@djrock9000 I first tried on PC and then Tried on on a friend's Mac, but still no luck.
georgeflacker 1 year ago
How yo doing man. I set up XAMPP localhost on my computer to give this a try. However when I click on GREEN LED ON or any other link I get this as a response.
Is there something I am missing in the XAMPP settings?:
Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster.
Error 403
127.0.0.1
georgeflacker 1 year ago
@georgeflacker - Are you using OSX, Linux, or Windows? Try connecting the Arduino and opening the Arduino coding software with the project loaded and using the "Serial Monitor" send the commands manually to the Arduino that way and let me know if they make it to the Arduino.
djrock9000 1 year ago
@djrock9000 Right. Let me fire it up and see what happens. BTW I'm running XAMPP on Windows XP
georgeflacker 1 year ago
@djrock9000 I just loaded the sketch to the arduino. It works like a champ.
0 -> LED13 ON
1 -> LED 13 OFF
2 -> LED 12 ON
3 -> LED 12 OFF
I am running on windows. Looked at the PHP code and the COM port is setup for Mac. Any ideas?
georgeflacker 1 year ago
I can't get the links to work correctly. I've loaded the sketch and everything works fine from the serial monitor but when I try to click a link I'm getting "You dont have permission...". Any help! Please!
purpulhaze 2 years ago
@purpulhaze - There could be many things wrong. Try keeping the Arduino monitor open while you try the buttons. Second, did you replace the code that specifies your serial device with the correct one? You will find this setting in the PHP code you visit to control the Arduino. Let me know how it works for you.
djrock9000 2 years ago
Yeah mine is COM4. Not sure what else I'm missing here.
purpulhaze 2 years ago
Are you using a USB to Serial device or anything similar. Are you using a Mac or PC. The code should work with both. I have not tried the code on a PC though. Just on a Mac.
djrock9000 2 years ago
This is a perfect example for my project. My goal is to use mouseover events on an HTML table to drive the Arduino. I can easily post these client side mouseovers to the server code you are showing here. Can't wait to see how responsive this might be.
nekengren9 2 years ago
This has been flagged as spam show
Could you please send me the source code for "The Arduino Serial Control Package"
ricodmir 2 years ago
Could you please send me the source code.
Thanks!
jckzsu 2 years ago
@jckzsu There the address on the video. Just have to read it. Cheers!
georgeflacker 1 year ago
Hi , Could you please send me the code. i am trying to connect PHP and arduino in a project...Thnks
amberkrishan 2 years ago
warning, the start says the code is available at the end, 3 mins later he says you have to subscribe and mail him for the source,,just get the wiz5100 shield and read the examples all of which are open source and switching leds will seem pretty simple
mikemargo 2 years ago
@mikemargo - Yes! I did say you need to subscribe. But...I have given the code to tons of people who have not subscribed. If you want the code, I would be more than happy to give it to you. Just ask. You'd be surprised how far politeness will get you on the internet. I know I was! The reason I want people to subscribe is so I can start a small tech community. I am in the process of setting up forums and a blog right now! Thanks for your concern though! Happy YouTubing!
djrock9000 2 years ago
hey !! really nice stuff .. ive been breaking my head for weeks over this .. can u please help me out and send me the code for the above ..
thanks .
ryanrocque 2 years ago
Hi, well i am working in some project like this to the university, and i am having some kind of troubles with the part that you solve, the comunicacion via serial port from a webpage using PHP, so please , could you hepl me with the source code, thanks a
lot
darkdragon1983 2 years ago