Hardware for input / output to external devices

I have a potential client who wants to use a database-based application, either Java or Python, running MySQL or PostgreSQL, but we need to get input from an external machine, so every time this external computer closes the microswitch, the value in the database decreases and is displayed in the application.

In addition, when this value in the database reaches zero, we want to turn on the light on the external machine until the operator does something in the graphical interface, and then we want to turn off the light.

My client solution is to connect the microswitch to one of the keys on the keyboard and just do not use this key for anything else (he suggested the F12 button) and control the light by playing the sound file on the left edge of the channel to start it, and the right channel to stop him.

It seems a little crappy to me, especially the wires going to the keyboard - and not just crappy, but also a potential source of hardware problems if the operator accidentally pulls out the wire. I would prefer something that either got into the USB port, or perhaps into the internal card, just to conduct wiring on the back and from the operator. But since the customer hopes to sell a lot of them, he wants to keep the price.

I understand that this is not strictly "programming", but it is a solution to the problem in the program that I am writing. So I ask you: is there a cheap hardware device that will do what I want?

+3
source share
6 answers

Cheap hardware device: Arduino

, , , ( ++). USB Serial , . , , , - . .

: , . arduino.

: Arduino .

+4

, , FTDI , UB232R, 20 . CTS ( , , 10K) .

, , , USB . ( , / ), , UB232R DIP8) , , , , - , , CTS-.

: , RTS. , , .

+3

... - (RS-232 UART) ? , , "" ( PP) , , .

, .., . : http://www.interfacebus.com/Design_Connector_Parallel_PC_Port.html

, , USB .

+2

USB- UART. USB (RS232 - ). COM- tty linux

8 . , .

, , . , , , , .

+2

http://www.awce.com/gp3.htm - VB, ++, Java, Linux .. .. .

+1

GPIO , Advantech ADAM.

, ADAM 6050 . TCP/IP modbus ( ).

RS-485 $110 - /OEM. .

" ", , / - / .

, , , , , .

0

Source: https://habr.com/ru/post/1711176/


All Articles