May 10: networking and communications

This week we had to design and build a wired or wireless network connecting at least two processors.

Working with Arduino Uno and the bluetooth sh-hc08 module

I decided to work with the Arduino IDE and the bluetooth sh-hc08 module for my first steps. We are getting closer to the final project so I thought it will be better if I start to work on my electronic network that I want to have at the end. It includes a bluetooth module (which I later changed to WIFI), a Adafruit NeoPixel Digital RGB LED Strip and a speaker as a sound output. I started with setting everything up in Arduino. You need to install the Adafruit NeoPixel library in Arduino to got the leds working. For communicating with the bluetooth I downloaded a Serial bluetooth terminal. After some fiddling and debugging I got the connection to work that when I type "0" on my bluetooth terminal it sends the connection to the Arduino and gives a visual light and sound output at the same time.

Foto von mir

Processing for sound output

I thought whats the best option to get a .mp3 or .wav sound output on my speaker so I tried to use Processing combined with Arduino IDE to get it working. For that you need to download the Minim Sound Library to integrate real sounds in Arduino. I only realized after I tried that processing only gives the sound output on your computer. And that Arduino only can receive 8Bit Sound data if it doesn't have a SD-Card Shield for mp3 output. On this step I stopped with working on Processing and tought its a better idea to have my sound output for my final project directly over my smartphone speakers. At least I made my own soundplayer in processing which is also quite cool ;)

Foto von mir

Designing and making my PCB board

I made my PCB in Eagle which uses an ESP8266-01 as a microcontroller and decided after I tried it with my Neopixel Strip to use the much bigger and nicer Adafruit Neopixel Ring to give me the different light output i want. They will be a perfect fit for my upper magnet. For programming I first flashed the ESP8266-01 with the nodemcu tool to use the internal microcontroller from the wifi module. I decided to go that route so my electronic components are as light and small as possible. Then I installed the ESP8266 library in Arduino and started to set up a Wifi Web Server to connect my ESP8266-01 to my Wifi Network. Then I included a json script form weather underground which gives me all the informations that I want over a IP adress.

Important note:
For flash/programm mode the module pins GPIO0-GND (LOW) CH_PD-VCC (HIGH).
For work mode the module pins GPIO0-VCC (HIGH) CH_PD-VCC (HIGH).
For reset mode just connect and disconnect the VCC of the module while being connect.

For next week I try to include more informations over the .json script and set up a nicer page to see my output.

Fablab Fablab Fablab Fablab Fablab Fablab

Click here to download all the files.