The internet of Things, or IoT, is a system of interrelated computing devices, mechanical and digital machines, objects, animals or people that are provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.
A thing in the internet of things can be a person with a heart monitor implant, a farm animal with a biochip transponder, an automobile that has built-in sensors to alert the driver when tire pressure is low or any other natural or man-made object that can be assigned an Internet Protocol (IP) address and is able to transfer data over a network.
What is the Internet of Things? https://internetofthingsagenda.techtarget.com/definition/Internet-of-Things-IoT
IOT Examples: https://blog.particle.io/scientists-deploy-an-iot-network-to-battle-kilaueas-deadly-fumes/
Particle IOT for Good: https://www.particle.io/nonprofits/
An IoT dashboard is the user interface within an IoT platform that enables users to monitor and interact with connected devices though graphs, charts and other tools and UI elements.
Examples:
Thingspeak( https://thingspeak.com/ )
IFTT-If This, Then That (https://ifttt.com/ )
Ubidots https://ubidots.com/
Arduino Cloud IOT (https://docs.arduino.cc/cloud/iot-cloud )
Adafruit IOT Cloud ( https://io.adafruit.com/ )
Blynk IOT ( https://blynk.io/ )
Note: ESP 32 board is far less expensive than the Arduino Nano 33 IOT. However, it consumes more power, and can be difficult to upload code using Arduino Create on a Chromebook. When using a laptop, you need to make sure the Arduino Create Agent is running, and you may have to push the Boot button when uploading.
include <Wire.h>. //include I2C library
#include <Adafruit_GFX.h>
#include <Adafruit_Sensor.h>
#include "thingProperties.h"7
int LED = LED_BUILTIN;
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
//set up output pins
void setup() {
pinMode(LED, OUTPUT);
pinMode(6, OUTPUT);
// Initialize serial and wait for port to open:
Serial.begin(9600);
// This delay gives the chance to wait for a Serial Monitor without blocking if none is found
delay(1500);
// Defined in thingProperties.h
initProperties();
// Connect to Arduino IoT Cloud
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
setDebugMessageLevel(2);
ArduinoCloud.printDebugInfo();
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
Serial.println(F("SSD1306 allocation failed"));
for (;;);
}
}
void loop() {
ArduinoCloud.update();
moisture = analogRead(A0);
Serial.println(moisture);
light = analogRead(A1);
Serial.println(light);
int reading = analogRead(A2);
// Convert the reading into voltage:
float voltage = reading * 3.3;
voltage /=1024.0;
// Convert the voltage into the temperature in Celsius:
temperature = (voltage - 0.5)*100;
Serial.println(" degrees C");
Serial.println(temperature);
display.clearDisplay();
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0, 10);
display.println(moisture);
display.display();
display.println(temperature);
display.display();
display.println(light);
display.display();
delay(500);
}
void onPumpChange() {
// Do something
if (pump) {
digitalWrite(LED, HIGH);
digitalWrite(6, HIGH);
}
else {
digitalWrite(LED, LOW);
digitalWrite(6, LOW);
}
}