abetoo
Published © GPL3+

Abetoo IoT

An IoT communication framework.

BeginnerProtip1,807
Abetoo IoT

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1

Software apps and online services

Abetoo IoT Framework

Story

Read more

Schematics

Generic arduino board

Code

Arduino ESP8266 base code

Arduino
Basic skeleton of an Abetoo IoT communication arduino project.
#include "abtoo.h"
 
int ledPin = 13; // GPIO13
char* ssid = "myhomessid";
char* password = "mywifipassword";
int h = LOW;
 
AbetooIno abtoino;
 
void messageReceived(String message)
{
 Serial.println(message);
 h = h^1;
 digitalWrite(ledPin, h?HIGH:LOW);
 
}
 
void setup() {
 Serial.begin(9600);
 delay(10);
  
 pinMode(ledPin, OUTPUT);
 digitalWrite(ledPin, LOW);
  
 // Connect to WiFi network
 Serial.println();
 Serial.println();
 Serial.print("Connecting to ");
 Serial.println(ssid);
  
 WiFi.begin(ssid, password);
  
 while (WiFi.status() != WL_CONNECTED) {
 delay(500);
 Serial.print(".");
 }
 Serial.println("");
 Serial.println("WiFi connected");
 
 String uuid = "uudi1";
 String channel = "-TbVO-rqdA0iWg6-gWh0eeQ636243460528994051"
 "#735acf9cd6eda96e66ee3858496dca59d750aff1";
 int heartbeat = 1; //minutes
 abtoino.init(uuid, channel, heartbeat, messageReceived);
}
 
void loop()
{
 abtoino.abetooloop();
}

Credits

abetoo

abetoo

0 projects • 7 followers
Software and Hardware Development

Comments