Show current time by photoelectric sensor using Arduino Uno.
Arduino Unoを介した光電センサで現在時刻を表示する.
E3JK-RR12-C from OMRON
Wires
- Power supply (24-240V AC or DC) -> Blue & Brown
- Mode L
- Not Cut -> White to Gray, Cut -> White to Black
- Mode D
- Not Cut -> White to Black, Cut -> White to Gray
Install this program to use.
Wirings
- Arduino GND to Sensor White
- Arduino 2 pin to Sensor Black in Mode L (Gray if Mode D)
(Connecting GND to Gray or Black adn 2 pin to white also works.)
When the sensor is cut, Arduino send "1" to PC by serial communication. If not, nothing is sent.
There are two options to show (record) time.
- By signal from Arduino (photoelectric sensor)
- By button
[WIP] Chose port to communicate with Arduino