What would be the best way to send char's and strings to a serial port?
My problem is that i would like to send commands to a robotic arm that ive played about with a few months ago. At the moment the electronics teacher is using QBASIC to work it... I used to love QBASIC but I don't have a Linux equivalent and to be really honest I don't want one (BASIC == S...L...O...O...O...W...W...). In his current program he's opening the serial port and then using the print statement to send the strings to the robotic arm. How would I do this on Linux in c?
Would I use the file handling commands and open /dev/S0 (what ever the Comm ports are called under Linux) and then use fprintf(serial_port, "command")??? Would i have any problems doing this f5rom a normal user account on my system or would I need to be root?
It would be nice if anyone could give me some example code or give me the address of a good web site on the subject:). I'm Not so hot on file handling in c so even some examples of this would be nice.
Thanx for the help :)
Dennis Dryden
********************************************************************** IMPORTANT: This email and its attachments are intended for the addressee only and may be confidential. If they have come to you in error you must take no action based on them nor must you copy or show them to anyone; please telephone us immediately.
The contents of this email and attachments represent the views of the sender and are not necessarily the representative of the views of The College of West Anglia **********************************************************************