March 29, 2024, 01:57:22 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Serial / Printer Port Programming  (Read 4266 times)

Offline wdeguzman

  • New Member
  • Posts: 1
Serial / Printer Port Programming
« on: June 03, 2005, 03:28:57 AM »
The Story:
A project was presented to me and it involves Web Programming, Kernel Tweaking and A Kiosk Interface.. its all good..

and all of a sudden.... my friend told me.. "Ahh also.. we need to control 7 lights to go on and off and that should be controlled by your system".....

All Hell Breaks Loose!

The Question:
1) Is C the right tool for the job? (i dont want to go.. ASM on LINUX   :oops:  )
2) My Guess is to control the on and off switch via Printer Port.
3) Can any1 point me into some sort of a hardware/software/code that would do such thing?


Tnx.

Offline siddharth_god

  • New Member
  • Posts: 1
Terminal Programming in C
« Reply #1 on: August 30, 2005, 12:28:17 PM »
Hi,
  First of all for your job i.e. using printer port from C program does not involves ASM so do not worry. Just try running search on google for serial port programming +c +linux and you will find tutorials containing how to use serial/parallel port using termios.h in linux under C.
   I have used that functions for implementations of MODBUS protocol on serial port and it works fine.  :D
Have fun  :P