I have an application where I would like to use an Arduino. The Arduino needs digital I/O and analog inputs. I would write a program to run in the Arduino that accepts commands from the PC and then sends back data upon request. There would be a dedicated program on the PC to handle that end. I have thought of two possibilities for the communication: Ethernet and serial. I do not know which would be easiest. I would appreciate any thoughts on this.
In my opinion serial is much easier than any of the network stuff for wired communication.
The serial input basics tutorial is a good intro to serial comms on Arduino.
There would be a dedicated program on the PC to handle that end.
What language would you use for that?
This Simple Python - Arduino demo may be of interest.
The Python code should work on Windows if you edit it to use the Windows style of COM ports.
...R
Serial is easier. As long as you can have the PC close to the Arduino.
Thank you all for the quick responses. I also was thinking that serial would be easier, but I was not sure. The PC will be quite close to the Arduino. Right now I am thinking of using PureBasic in the PC. It looks like it would be quite easy to create a GUI as well as handle the serial comms.
k3pto:
Thank you all for the quick responses. I also was thinking that serial would be easier, but I was not sure. The PC will be quite close to the Arduino. Right now I am thinking of using PureBasic in the PC. It looks like it would be quite easy to create a GUI as well as handle the serial comms.
Remember to allow time for the Arduino to reset after your PC opens the serial port.
Paul
Paul_KD7HB:
Remember to allow time for the Arduino to reset after your PC opens the serial port.
Or break the "RESET-EN" link (and fit a jumper to it).
Hi,
Serial comms and a IDE called Processing.
Processing will give you a GUI interface.
google arduino and processing
Tom...
Look up Firmata.
Paul_KD7HB:
Remember to allow time for the Arduino to reset after your PC opens the serial port.
Paul__B:
Or break the "RESET-EN" link (and fit a jumper to it).
If you open the port correctly (without activating DTR), there is no need for that. E.g. RealTerm has that option and it's easy to implement in C# (and C++ as well if not mistaken, not sure if I tried).