For communication with Arduino, this tutorial uses Orion Context Broker of the Fiware technologies. The Fiware platform includes open source software enablers that allow easy development of Smart Cities and IoT solutions. You may find more information on the following links:
The Orion Context Broker is an implementation of the Publish/Subscribe Context Broker GE, providing the NGSI9 and NGSI10 interfaces. This interface uses the REST-API to accept update and query commands for write and read operations. The following figure presents the schematic architecture of our tutorial, where Arduino sends NGSI notifications by the ESP8266 module to Orion Context Broker allowing applications subscriptions.
The next figure describes the NGSI structure of the entity types we use in our solution:
First Download and install Arduino IDE on URL: https://www.arduino.cc/en/Main/Software. After installing Arduino, open the IDE and click on the "Sketch" menu and then include Library > Manage Libraries to import library, using the library manager. Then the library manager will open, and you will search and install the library AltSoftSerial. AltSoftSerial emulates RX/TX into Arduino UNO.
Step 2Define the following temperature scheme with:
- NTC thermistor temperature sensor
- 10K resistor
The NTC thermistor temperature sensor sends data by Arduino analog port AO:
Add into scheme the module ESP8266 and Adapter:
- The line 17 of the source defines the emulation of RX/TX (AltSoftSerial ESP8266(8,9);)
- Modulo Connector RX0 => Arduino port 9
- Modulo Connector TX0 => Arduino port 8
- Modulo Connector VCC=> Arduino port VCC
- Modulo Connector GND=> Arduino port GND
Comments