Photocoupler Sample
This application demonstrates the isolated input reading function of the module. It uses Arduino IDE's Serial Monitor and IoT Node's onboard LED to display input states.
To run the example:
Open the IoT_Node_Photocoupler sketch from the examples menu.
Select Turta IoT Node from the Tools > Board menu.
Select your device's COM port from Tools > Port menu.
Open Serial Monitor from Tools > Serial Monitor.
Select 115.200 baud from the Serial Monitor's status bar.
Upload the code to your device.
Sample Code
Result
After the application is uploaded to the device, it writes input state to the Serial Monitor if the state is changed. The onboard LED is lit if any of the input channels are high. The example output should be like this:
The application runs forever until you clear it from memory.
Last updated