Skip to content

Latest commit

 

History

History
105 lines (76 loc) · 4.6 KB

README.md

File metadata and controls

105 lines (76 loc) · 4.6 KB

Mozilla IoT NeoPixel Demo

Table of Contents

1) Hardware

1.1) Hardware Requirements

1.2) Hardware Setup

The Arduino is connected via a 5v level shifter. In case you are using the Sensors Mezzanine, It has its own level shifter built in.

  • Arduino/Sensors Mezzanine - 96Boards CE
Arduino/Sensors Mezzanine 5v <-Level Shifter-> 1.8v 96Boards CE
GND GND
SDA I2C0_SDA
SCL I2C0_SCL
  • Neopixel - Arduino/Sensors Mezzanine
Arduino/Sensors Mezzanine Neopixels
GND GND
5v 5v
D6 DI

2) Software

2.1) Prerequisites

  • Make sure the latest Debian is installed on both the 96Boards CE device. You will be able to find the instructions on the documentation section of our website.
  • In the case of Dragonboard410c you also have the option to install Fedora
  • Install the Arduino IDE on your host system.

2.2) Gateway Setup

  • Connect your Gateway device to your home Wifi network. You can do it from the terminal using $ nmtui
  • Follow the Gateway installation Guide over at Mozilla-IoT GitHub Repository.
  • Setup thing-url-adapter addon:
  $ cd ~/.mozilla-iot/addons/
  $ git clone https://github.com/mozilla-iot/thing-url-adapter
  $ cd thing-url-adapter
  $ ./package.sh
  $ cp thing-url-adapter-*.tgz ../
  $ cd ~/gateway
  $ npm start

2.3) Arduino or Sensors Mezzanine Setup

  • Setup adafruit neopixel library
  • In case of Arduino, simply use the IDE to flash the src/neo.ino file.
  • For the SeeedStudio Sensors Mezzanine follow this guide to setup and flash using the Arduino IDE.

2.4) Setup WebThings

  • Make sure everything is setup as show here.
  • Connect your Things device to your home Wifi network. You can do it from the terminal using $ nmtui
  • Install WebThings Python module: $ pip3 install webthing
  • Note down the IP address: $ ip addres
  • Run the Python code in src/things.py: $ python3 things.py

2.5) Connecting the Gateway to the WebThings Application

  • Click the '+' to add a new Things device.

  • You will see a new device called "My Lamp" show up.

    • If it doesn't show up, use the "Add by URL" option with the following address http://<things ip address>/8888

  • After that you will be able to see the "My Lamp" device on the home page.

  • Click the star next to the "My Thing" icon to expand it and fully expose the options.

3) Demo Video Featured in OpenHours

Demo