Robotics‎ > ‎

Smart Home

Funding
In the fall of 2016 I was awarded a grant by the Mat-Su Schools Foundation to turn a doll house into a demo for a smart home (see attachments below).

Currently, we are using the W5500 Ethernet Shield from Seeed Studio on top of an Arduino Uno. To use Seeed Studio's Ethernet Shield, you must swap out some files within the ethernet shield library within your Arduino IDE. See the WIZ_Ethernet_Library GitHub page for instructions.

Our current proof of concept code below simply increments a counter on the Ubidots website. Next steps include creating a control panel on Ubidots and using that to control our Mini Skinny NeoPixels that we've taped to the doll house.
#include <Ethernet.h>
#include <SPI.h>
#include <UbidotsEthernet.h>
#define ID  "put variable ID here"  // Put here your Ubidots variable ID
#define TOKEN  "put token here"  // Put here your Ubidots TOKEN

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
// Set the static IP address to use if the DHCP fails to assign
IPAddress ip(192, 168, 0, 177);

Ubidots client(TOKEN);
int counter = 0;

void setup() {
  Serial.begin(9600);
  // start the Ethernet connection:
  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to configure Ethernet using DHCP");
    // try to congifure using IP address instead of DHCP:
    Ethernet.begin(mac, ip);
  }
  // give the Ethernet shield a second to initialize:
  delay(1000);
}

void loop() {
  client.add(ID, counter);
  client.sendAll();
  delay(1000);
  counter++;
}

Ċ
Michael Backus,
Jan 7, 2017, 12:49 PM
Ċ
Michael Backus,
Jan 7, 2017, 12:48 PM
Comments