Added: 2 years ago
From: djrock9000
Views: 16,493
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (51)

Sign In or Sign Up now to post a comment!
  • nice job men, i want the code too ;)

  • 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 I actually didn't write the code but if you have questions I might be able to help.

  • 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 On my blog site. Its missionduke(dot)com/arduino-pr­ojects/

  • Very cool! I like what you do.

  • @sjaungere Thanks I like doing it. I love electronics and technology.

  • @djrock 9000 - thanks

  • 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 - Search for the line

    $serial->deviceSet("/dev/tty.u­sbserial-A7006QCP");

    and change to

    $serial->deviceSet("COM5");

    This should help.

  • 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.

  • great. hi im new to this i have a question does the circuit needs to be connected to the computer?

  • @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!

  • @Zenophilia - Hello. I have the source code posted in .zip files on my blog site. Visit:

    missionduke(DOT)com/arduino-pr­ojects/

  • 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 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.
  • @Winsucker - Yeah I found that adding the +4v on the reset pin helps a lot with it trying to reset.

  • @djrock9000 - I mean +5v...Oops!

  • Can you tell me why only the "turn the GREEN LED on" link works for me?

  • Can you tell me why only the "turn green light on" link works for me?

  • @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/phpvsard­uino.png

  • @KINDanon I have a possible fix coming here in a few minutes. I have a short video on it.

  • 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 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 I have a possible fix coming for your problem. Its a short video.

  • @georgeflacker Are you using a Mac or PC with windows or linux/unix? Then I can help a little better. :)

  • @djrock9000 I first tried on PC and then Tried on on a friend's Mac, but still no luck.

  • 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 - 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 Right. Let me fire it up and see what happens. BTW I'm running XAMPP on Windows XP

  • @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?

  • 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.

  • Yeah mine is COM4. Not sure what else I'm missing here.

  • 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.

  • Could you please send me the source code.

    Thanks!

  • @jckzsu There the address on the video. Just have to read it. Cheers!

  • Hi , Could you please send me the code. i am trying to connect PHP and arduino in a project...Thnks

  • 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!

  • 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 .

  • 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

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more