Reads signals from the test bench (PLC) every time the trigger pin is activated by the same PCL and sends them to the remote server. It is divided in 7 files just for the sake of readability:
-
Initialize the ethernet module.
-
Read MAC address from the RTC.
-
Check if the device is online.
-
Simple implementation of a finite state machine.
-
Transition between offline, connecting, connected and active states:
-
offline. Device is not connected to the network.
-
disconnected. Remote server is not responding UDP messages.
-
connected. Device is waiting for the PLC's trigger.
-
active. Device send TCP message to remote server and awaits response.
-
Pin setup.
-
Monitor trigger pin used by PLC.
-
Read inputs from PLC.
-
Write result to output pins.
-
Initialize LCD screen.
-
Centralize messages displayed.
-
Control brightness changes.
-
Send TCP message to remote server.
-
Awaits remote server response.
-
Initialize UDP client.
-
"Ping" remote server.
- Install Arduino IDE (https://www.arduino.cc/en/software)
< Version used during development is 1.8.15 >
-
Copy content in libraries directory to the Arduino directory (My Documents\Arduino\libraries)
-
More Documentation in oficial GitHub page
- Click Here --> Industruino