0

i'm a newbie with RPi and i'm still discovering its features. I've installed tornado web server on RPi and connected the pi with arduino board. the server just receives a character (represents a command) and forward it to arduino over serial. my question is: Is there any way or program for windows i can use to send this character command to the web server on RPi?

2 Answers 2

0

You can use PHP to do this. Program it in such a way that you can send GET requests to the webpage (i.e. http://raspberrypi:80/arduinocontrol.php?char=x), then it forwards your character to the Arduino.

Of course, I assume you have already worked out the Raspberry Pi to Arduino communication step already, since your question merely asks 'how can I send characters to my web server?'

1
  • thx alot! it worked :D
    – DieDen
    Commented Feb 20, 2014 at 21:29
0

You can try using Node-RED. With Node-RED, you can send command to your Arduino through the web, by email or by Twitter.

Look at this tutorial on how to get Node-RED installed. I would recommend starting off with a fresh image of Raspbian. There's a bit of setup involved.

The tutorial doesn't explain everything on what you need to do to get your work accomplished. You'll have to do some poking around yourself, but this is the surest way to do it. I'd love to help you with more specific instructions. However, I do not have an Arduino near me right now.

2
  • thanks for your response but my issue is not with the arduino :) the arduino is running and connected to RPi which itself runs a webserver, i just needed to send a character to Raspberry pi so it would forward to arduino over serial and react in specific way to this character (like blinking a led for example). I did some searching and googling and i guess i'd have to write a code using web sockets to send the character to Raspberry pi
    – DieDen
    Commented Feb 18, 2014 at 10:44
  • Node-RED is a server that runs on the Raspberry Pi. Once installed, it sets up a web server and it can talk to the Arduino over a serial connection. You can then tell Node-RED through your browser to inject a character into the serial connection with the Arduino.
    – G Ragib
    Commented Feb 20, 2014 at 0:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.