Week 4: ServoVane

Resources:

Overview: This week, I wanted to do a project that focused on parsing data out of an API and doing something with it. I decided weather would be the Path Of Least Resistance due to the fact that everyone has a weather project out there somewhere, and the documentation for weather APIs is pretty solid. I also wanted to explore some of Adafruit’s Feather Wings.

System: For this project I wanted to stay away from BaaS providers. You can do a version of this mashing up IFFTT and Adafruit/IO or the like, but I wanted to instead combine all my parsing / data grabbing / behaviour into one board. The Feather is just an ESP2866 on a breakout. Which means it has the ability to do TCP calls, UDP, act as a wee little web server, or just be a gateway. You can drill down into the functionality using various libraries that are compatible with Arduino. For this set up I decided to parse some JSON directly from the Weather Underground API. The servos themselves run on a repeating timer, for a set amount of time. So they are not on constantly. After which they stop, the feather hits a delay mode for a while until grabbing the next weather conditions and triggering the routine all over again.

Components: Adafruit Feather Huzzah, PWM Servo FeatherWing, 5v 2a Power Supply, 5V power supply (USB port, but could be a plug in), 7 micro servos

Things I Experimented With: Parsing, Libraries, Mapping, Timing, APIs

Things I learned: There’s some library conflicts with the ESP8266WiFi and Wire.h, in so far that you need to declare the PWM before you start doing any pin setting logic. It could be a timer issue (but the PWM board apparently has its own timer), or it could be a bit of a pin mash. I should have been using a 5v 10a power supply, but I didn’t, so that might have also contributed to some funny behaviour. I also need some extra barrel jack adaptors in various sizes.

Of Note: You need little delays for the ESP2866 to be able to process JSON. If you don’t have them, it can sometimes just not grab things.

Future Iterations: The sounds servos make is pretty nice/annoying. I think working more with the timing and figuring out how to make something like this more of an audio piece might be fun. Working more on system timing and run time.

Week 1: Heartbeater

Heartbeater was a pretty straightforward idea: Make a small IoT based notifier to tell you what someone else’s heartbeat is. It was a way to get reacquainted with some IoT services, and experiment with mapping data. However, there ended up being a lot of troubleshooting. I didn’t get a chance to start on an enclosure, but did get to a proof of tech stage.

System: In the end I made a basic BLE based heartbeat reader out of a feather that someone could carry with them, and a wifi notifier on the other end that could remain stationary in someone’s home. I had considered making them both ble, but ran into some issues.

Things I Experimented With: Lightbluebeans, Xcode, Particle Dev, Adafruit ble library.

Components: Bluefruit Feather 32u4, Particle Photon, 1 vibrating haptic motor, 1 neopixel ring, 1 jst connector, 220ohm resistor, 1 NPN based transistor, 1 diode, 2 lipo batteries, 1 pulse sensor.

Things I learned: IoT tools are very inconsistent. I’ve used Adafruit I/O before, and I like it for simple things. In this case, I had originally thought of making both devices strictly wifi, but then thought “no the pulse sensor should be a carry item” and switched to a BLE > Phone setup. The beans, while great to use, don’t have an out of the can phone > BaaS provider, so I first tried rolling my own iOS app (its been a while), but fell into an Apple update spiral (it wanted me to update everything). Bluefruit Connect LE ended up being what I used to get the UART data to I/O, but its not consistent across devices (ie: MQTT service wasn’t in the ipad app). So I switch the notifier back to just wifi. I experimented putting things on a Feather protoboard, but had some issues w/ pins. So i flipped back to the photon. This project probably could have gone smoother if I had plotted out my system a bit better.

Future Versions: I think I would try again to roll my own iOS app and using two smaller beans on either end chatting through two phones, this would make them very portable. I might also consider a GMS breakout, which might be nicer.

Of Note: ble feathers do not have the 1v analog pin issue that the huzzah does. Bean currently has system issues in OSX with the virtual serial port, but a nice new command line tool. The particle command line tool is still my favourite. I find serial printing on the feather boards a bit of a pain sometimes. Pulse sensors are very inaccurate. The Huzzah issue I had had previously w/ the I/O library colliding with the Neopatterns Class seems to have been fixed by Adafruit.