I need to program an application for my school. It needs to scan a
barcode on a pass, compare it to a database and then display a color
(fullscreen) signalling if the student is or isn’t allowed at a party.
Now I’m looking for a toolkit of some sort to wait for a signal from the
barcode scanner (which works just like a keyboard) and then display a
fullscreen signalcolor. Any ideas?
If it works just like a keyboard, you should be able to get the input
with gets(). If your scanner dies or something happens, you then have
a fallback mechanism as well.
Depending on how fancy the display solution should be, you could
display yes/no in colored ascii (easiest solution), write some html
that’s loaded in a browser that keeps refreshing, or use a GUI toolkit
(tcl/tk, gtk, qt, etc.) to display the result. If you use a GUI, you’d
probably want to replace the gets() call with a text field that has an
on_change() or equivalent trigger.
Sounds like a fun project, good luck!