This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| FACTS P1AM Example Series #2 - Web Server Analog Input | |
| This example uses the P1AM-ETH shield to create a webserver that displays the input values of a P1-04ADL02 to a webpage. | |
| You can visit this webpage by entering it's IP address in a browser. the default address is 192.168.1.177. | |
| This page will display the readings of all 4 channels in volts and in counts. | |
| You can find information on the P1-04ADL-2 and other modules here: https://facts-engineering.github.io/modules/P1-04ADL-2/P1-04ADL-2.html | |
| The analog input module we used is the P1-04ADL-2, though you can easily use any analog or discrete module as long as you tweak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* FACTS P1AM Example Series #1 - MQTT Call and Response | |
| * | |
| * This example uses an MQTT broker to update the outputs of a P1-08TRS | |
| * to the inputs of a P1-08SIM. You can easily switch these out for any | |
| * discrete input or output module. | |
| * | |
| * I used shiftr.io for this example. This is a free MQTT broker that provides | |
| * nice visualisation and is great for testing. If you want to use a different broker, | |
| * just update the broker string to the proper URL and update any login credentials | |
| * |