I have an Arduino Mega 2560.
What I want to do is connect it to a 3 pin sensor (optical with reciever and transmitter on same part).
I can't remember the color coding on the wiring, but I can find out during the week. The operation is as follows:
Solenoid opens a "shutter", and a PLC system can read it in milliseconds and display that on a small LCD display.
This "shutter" is something we/I can repair and when doing so, we need to set it to a good value, let's say around 190 - 200ms.
For this I need something to read it whilst the "shutter" unit is out of the machine and on the workbench. I have read some topics, but I'm unsure what code to use and where to connect the +, - and sensor reading cable. (Other than GND, and a free Digital pin connector).
Also, the sensor gets the reading from a metal piece with a cutout in the middle which is connected to a metal arm. This piece of metal is what can be adjusted.
And no, I do not know (as yet) if the sensor operates in 5 or 3 volts. But I can find out that as well.
The solenoid has it's own power, which is 24VDC, this will be operated by a toggle switch/button.
Did also read somewhere (not here) about a Google Play app called "Terminal". I need to be able to get the reading on the phone somehow - connected either via BlueTooth or USB (with OTG adapter).
Thanks in advance from a complete beginner
Roger

