Hi All,
I am looking to use an Arduino board (I have purchased the Arduino Uno) to provide a 'tactile' focus control for a Thermal imaging camera. This camera is controlled via RS422 and is usually controlled via a software GUI. This setup isn't very user friendly, so I have decided to make a system using a potentiometer, Arduino and a TTL to RS422 converter.
I have used the 'ReadAnalogueVoltage' example code to display the voltage level of the Potentiometer and the 'AnalogueReadSerial' example to display the potentiometer state.
My question is, is it possible to modify either of these codes so the Arduino monitors the state of the Potentiometer, then to do an action when the values increase and then a different action when the values decrease. Essentially I am looking to have the system work in the following steps:
Potentiometer is twisted Clockwise, Voltage or State increases,
Arduino detects the increase and sends a message (focus FAR) to the camera via the TTL output and a TTL to RS422 converter (connected externally)
Potentiometer is twisted anti-clockwise, Voltage or state decreases,
Arduino detects the decrease and sends a message (focus NEAR) to the camera via the TTL output and a TTL to RS422 converter (connected externally)
Is this even possible? Any help will be greatly appreciated!