Close

Accessorize!

A project log for VoiceBox

Adding a Flask web interface (and other stuff) to the Google AIY Voice Kit.

tmTM 08/18/2018 at 16:170 Comments

I've really enjoyed having VoiceBox on my desk. I've had RaspberryPis configured for specific tasks, like OctoPrint or OSMC, running for years, but this is the most use I've ever got out of a Pi as a development platform. One drawback of the enclosure is that the GPIO pins are hard to get to, making the addition of new gadgets fiddly: I'm running out of side-wall real estate anyway.

My solution is to connect the peripherals to esp8266 modules and to have VoiceBox control them via a web interface. My first Hackaday project, ESP8266 Retro Browser, used the ESP-01 module as a wireless modem, controlled by an Arduino Mega 2560 sending AT commends over a serial link. Thankfully, things have moved on since 2014, and we no longer have to slave an 80MHz 32-bit microcontroller to a 16MHz 8-bit AVR.

To program the esp8266 directly using the Arduino IDE (Integrated Development Environment) we first have to download an up-to-date copy of the Arduino software, run the downloaded installer (arduino-1.8.5-windows.exe in my case), click yes (repeatedly) to install USB and COM port divers, then yes again when prompted by Windows Firewall, to allow access to the internet. 

We then need to add support for the esp8266 to our newly installed Arduino IDE. Following the instructions on the ESP8266 Core project's github page, fire up the Arduino IDE using the desktop link. Select <file><preferences> and under "Additional Boards Manager URLs" enter the address of the esp8266 configuration file: http://arduino.esp8266.com/stable/package_esp8266com_index.json.

The above step just tells the IDE where to look for additional, non-Arduino, configuration files. To actually add support for the board, go to <Tools><Board:><Boards Manager>, scroll down and select "esp8266 by ESP8266 Community" and click <Install>.

One more thing we'll need to add to the IDE for wiLight, the Adafruit Neopixel library. Go to <Sketch><Include Library><Manage Libraries..>. Enter Neopixel in the search box and select "Adafruit Neopixel by Adafruit". Click <Install> to add the library.

I'll make sure my newly installed IDE works and use it to tart up the code for my first peripheral: "wiLight", before publishing a write-up.

Discussions