Smart LED holiday Bow Tie with Neopixel Jewel and Feather Huzzah esp8266

This year I wanted something geek-ish for the holiday seasons, so I created a smart led bow tie which shows animations in all possible RGB variations and can be controlled with your smartphone.

For this project I got my inspiration from Adafruit’s Tony Dicola tutorial “MicroPython Smart Holiday Lights“. It holds all the information you need to know for this project. Definitely check it out.

The hardware for this project consists of my favorite IoT board the Feather Huzzah, NeoPixel Jewel (7 LED’s), a flat powerbank and of course, a really neat bow tie. The one I sacrificed was a Tommy Hilfiger one.

First I soldered the electrical wires on the Neopixel Jewel, than, and this is the reason the Jewel is great for this kinds of projects, I sewed it on my bow tie. Next, I soldered the other end of the three wires to the prepared Feather Huzzah.

Preparing the Feather Huzzah ESP8266 board is really easy if you follow this tutorial or my previous post [dutch].

The code I used is written in MicroPython and part in HTML. You can find it here. You just have to change the static configuration in the main MicroPython code to the correct values. In my case I only changed the number of pixels (leds). This is also the place for more advanced programmers to change or add more animations. In the HTML file I added some more colors. Basically, you can vary infinitely.

Meet de watertemperatuur met een DS18B20 temperatuur sensor en een Arduino Uno

Een simpele badwater-thermometer die door middel van 3 LED’s aangeeft of het badwater op de juiste temperatuur is (voor baby’s 36-38 graden Celsius). De blauwe LED staat voor te koud, de rode LED voor te warm en als de groene LED brandt dan is het water op de juiste temperatuur.

De temperatuur sensor is een DS18B20 waterbestendige sensor met een nauwkeurigheid van 0.5 C. Meer info over dit product op de website van Adafruit.

Installeer in de Arduino IDE de bibliotheek van OneWire én Dallas Temperature Control Arduino.

De code:

// Include the libraries we need
#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

// arrays to hold device address
DeviceAddress insideThermometer;

 * Setup function. Here we do the basics
void setup(void)
 // start serial port
 Serial.println("Dallas Temperature IC Control Library Demo");

// locate devices on the bus
 Serial.print("Locating devices...");
 Serial.print("Found ");
 Serial.print(sensors.getDeviceCount(), DEC);
 Serial.println(" devices.");

// report parasite power requirements
 Serial.print("Parasite power is: "); 
 if (sensors.isParasitePowerMode()) Serial.println("ON");
 else Serial.println("OFF");

// Method 1:
 // Search for devices on the bus and assign based on an index. Ideally,
 // you would do this to initially discover addresses on the bus and then 
 // use those addresses and manually assign them (see above) once you know 
 // the devices on your bus (and assuming they don't change).
 if (!sensors.getAddress(insideThermometer, 0)) Serial.println("Unable to find address for Device 0"); 

// show the addresses we found on the bus
 Serial.print("Device 0 Address: ");

// set the resolution to 9 bit (Each Dallas/Maxim device is capable of several different resolutions)
 sensors.setResolution(insideThermometer, 9);
 Serial.print("Device 0 Resolution: ");
 Serial.print(sensors.getResolution(insideThermometer), DEC); 

//initialise LED pins
 for(int pinNumber = 3; pinNumber < 6; pinNumber++){
 pinMode(pinNumber, OUTPUT);
 digitalWrite(pinNumber, LOW);

// function to print the temperature for a device
void printTemperature(DeviceAddress deviceAddress)
// method 2 - faster
 float tempC = sensors.getTempC(deviceAddress);
 Serial.print("Temperatuur: ");

 * Main function. It will request the tempC from the sensors and display on Serial.
void loop(void)
 // call sensors.requestTemperatures() to issue a global temperature 
 // request to all devices on the bus
 //Serial.print("Requesting temperatures...");
 sensors.requestTemperatures(); // Send the command to get temperatures
 // It responds almost immediately. Let's print out the data
 printTemperature(insideThermometer); // Use a simple function to print out the data

float tempC = sensors.getTempC(insideThermometer);
 if(tempC < 36.00){
 digitalWrite(3, LOW);
 digitalWrite(4, LOW);
 digitalWrite(5, HIGH);
 } else if(tempC >= 36.00 && tempC <= 38.00){
 digitalWrite(3, LOW);
 digitalWrite(4, HIGH);
 digitalWrite(5, LOW);
 } else if(tempC > 38.00){
 digitalWrite(3, HIGH);
 digitalWrite(4, LOW);
 digitalWrite(5, LOW);

// function to print a device address
void printAddress(DeviceAddress deviceAddress)
 for (uint8_t i = 0; i < 8; i++)
 if (deviceAddress[i] < 16) Serial.print("0");
 Serial.print(deviceAddress[i], HEX);

MicroPython installeren op Huzzah Feather ESP8266

Tutorial voor het installeren van MicroPython op de Huzzah Feather (speciale uitvoering van de ESP8266 microboard). MicroPython is een versie gebaseerd op Python bedoeld voor IoT devices zoals microcontrollers. MicroPython heeft dezelfde basis functionaliteit als Python, maar dan in vereenvoudigde vorm.



De Huzzah Feather draait standaard op C++ (de taal van Arduino). Je moet de hardware eerst flashen met een firmware versie van MicroPython op
Installeer de firmware met pip op Python 2.7.

sudo easy_install pip

sudo pip install esptool

Vervolgens moet je controleren of je de CP210x USB to UART Bridge VCP Driver hebt geïnstalleerd, anders hier downloaden: Hiermee maak je een seriële verbinding

Flash de Huzzah: --port /dev/cu.SLAB_USBtoUART erase_flash.

Let op dat de bestandslocatie /dev/cu.SLAB_USBtoUART anders kan zijn. Zoek eerst op wat je seriële port is door in terminal de commando ls /dev/cu.* in te voeren (met USB aangesloten).

Start het flashen met: --port /dev/cu.SLAB_USBtoUART --baud 460800 write_flash --flash_size=8m 0 

Let op dat hier /dev/cu.SLAB_USBtoUART de locatie van het .bin bestand anders kan zijn.
USB seriele verbinding REPL

Open de verbinding in Terminal met:

 screen /dev/cu.SLAB_USBtoUART 115200

Stop de sessie met ctrl-a dan k dan y

Gebruikt ctrl-c om de >>> prompt te krijgen (als je die niet te zien krijgt)
Nu is alles klaar om code te kloppen, begin maar met print(“Hello World”)

Wifi verbinding WebREPL

[EDIT] As of the latest 1.8.6 MicroPython releases the WebREPL is not enabled by default and must be switched on with a one time command run through the serial port (screen).

import webrepl_setup

You will be prompted to enable or disable the WebREPL, and to set a password. Enter your choices (enabled) for both prompts then press y when prompted to save and reboot.

The ESSID is of the form MicroPython-xxxxxx where the x’s are replaced with part of the MAC address of your device (so will be the same everytime, and most likely different for all ESP8266 chips). The password for the WiFi is micropythoN (note the upper-case N). Its IP address will be once you connect to its network. WiFi configuration will be discussed in more detail later in the tutorial.

Je kan zelf een server maken of voor de luie mensen onder ons naar gaan en connecten met ws:// (wel wifi verbinding met de AP van de HUZZAH maken!)
Tips en Trucks:

  • Ctrl-E = speciale knip en plak modus om grote stukken tekst te knippen en te plakken.
  • Ctrl-A on a blank line will enter raw REPL mode. This is like a permanent paste mode, except that characters are not echoed back.
  • Ctrl-B on a blank like goes to normal REPL mode.
  • Ctrl-C cancels any input, or interrupts the currently running code.
  • Ctrl-D on a blank line will do a soft reset.

Wifi van AP naar IF Access WebREPL From Other WiFi Networks

Ok, we hebben gezien dat je kunt connecten door van de Huzzah een AP te maken. Niet handig als je tegelijkertijd ook wil internet.

Start een seriële screen sessie en voer het volgende in:

import network
wlan = network.WLAN(network.STA_IF)
wlan.connect('ssid', 'password')

Controleer de verbinding met wlan.ifconfig() (Hier zie je ook het ip-adres van de board)
Goed om te onthouden is dat de HUZZAH de internetgegevens onthoudt. Je zou ervoor kunnen kiezen om de board een vast ip adres te geven.

Ga nu naar vul het juiste ip-adres in en je kunt los. (Let op dat je op hetzelfde wifi netwerk zit.)

Smart Doorbell project with Adafruit Feather HUZZAH ESP8266

My doorbell is nothing more than a simple pushbutton. So if I wire a microcontroller to my doorbell, I just have to figure out some simple code that executed the following: if the doorbell is pushed, then send a push notification to my iPhone. So I need a doorbell, gladly my house is provided with one, a microcontroller (Feather HUZZAH), some wiring, a push notification service (Pushover) and at last some code.


  • Adafruit Feather HUZZAH (cheap, simple and WiFi onboard!)
  • Wires
  • Breadboard
  • Resistor 10K ohm
  • LED
  • Doorbell including wires


  • Arduino IDE (from
  • Basic Button tutorial from
  • Pushover Library for ESP8266 (Github)
  • Pushover API – Pushover has no monthly subscription fees and users will always be able to receive unlimited messages by making a one-time license purchase ($ 4,99) for our Android, iOS, or Desktop apps.


  1. IN PROGRESSConnect Wires: 3.3V to + and GND to – on the breadboard.
  2. IN PROGRESS: Upload the code to the Feather via Arduino IDE – beware of the settings!

Example code:

#include "Pushover.h"

void setup() {
WiFi.begin("myNetwork", "secureWPAKii");
while (WiFi.status() != WL_CONNECTED) delay(50);

Pushover po = Pushover("SecureAppToken","UserToken");
Serial.println(po.send()); //should return 1 on success

void loop() {

 Turns on and off a light emitting diode(LED) connected to digital
 pin 13, when pressing a pushbutton attached to pin 2.

 The circuit:
 * LED attached from pin 13 to ground
 * pushbutton attached to pin 2 from +5V
 * 10K resistor attached to pin 2 from ground

 * Note: on most Arduinos there is already an LED on the board
 attached to pin 13.

 created 2005
 by DojoDave <>
 modified 30 Aug 2011
 by Tom Igoe

 This example code is in the public domain.

// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);