PLC-connected Temperature Monitor
This example uses an impAccelerator™ Fielbus Gateway, the Electric Imp Modbus Library, a Click Programmable Logic Controller (PLC) and a the
10
Project description
Temperature PLC
This example uses an impAccelerator™ Fielbus Gateway, the Electric Imp Modbus Library, a Click Programmable Logic Controller (PLC) and a thermistor to monitor temperature. The thermistor is connected to an analog input on the PLC. The Fielbus Gateway polls this analog input and sends the temperature reading to IBM Watson and Dweet.io.
Hardware
- impAccelerator Fielbus Gateway
- C0-02DD1-D Click PLC
- Pump
- Thermistor
- Power Supply
Software Dependencies
- Electric Imp Modbus Library
- Electric Imp IBMWatson Library
- Electric Imp Dweetio Library
Device Code
The Fielbus Gateway’s imp005 polls the PLC for temperature readings and sends them to the agent.
Agent Code
The agent sends the temperature readings to IBM Watson and Dweet.io.
Note Dweet.io uses the imp005’s device ID as a unique identifier. IBM Watson requires an account and access keys to push data to it. The keys have been removed from this example code, and so you will have sign up for IBM Watson and paste its access keys into the appropriate variables before the agent can push data to it.
