Skip to content

Latest commit

 

History

History
 
 

FieldbusGateway_TempPLC

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

Software Dependencies

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.