-
Amarino Continued
04/03/2015 at 19:36 • 0 commentsMy first objective was to have the neopixels display the time sent by my phone. To do this, I used the skeleton plugin project and Android calendar class to send h:m:s values to the Amarino app, which forwarded them to the arduino. Initially I only had the plugin send h:m values in 1 minute intervals, but found that the plugin would stop running. To solve this and increase the accuracy of the time from +/- 1 min to +/- 1s the time is now sent every second. Whether this has an impact on battery life is yet to be seen.
Sending phone notifications was more challenging to set up. I figured tasker can do a good job of reacting to phone notifications, and it's much easier to edit notification actions than if it were coded in an app. The best way of implementing tasker into Amarino would have been by creating a tasker plugin, but my java skills are nearly non-existent. Instead, I am using tasker to broadcast intents over shell script. Figuring out how to do this and include the 'extras' needed for amarino to process the intents took forever, and involved a lot of trial and error. If anyone's interested I can make a 'how-to' including the script tasker needs.
-
Getting Started with Amarino
04/03/2015 at 19:03 • 0 commentsThe next step was to figure out how the data would be sent from my phone to the watch. Nothing available on the play store provided the functionality I needed, and it looked like I was going to have to write an app from scratch for my particular needs. Luckily, Amarino, (http://www.amarino-toolkit.net/index.php) an app created 4 years ago and probably not updated since, looked very promising. Through the use of plugins and the arduino library, it provides access to phone events. There are a couple plugins included that can send accelerometer data, incoming call status, etc. Developing plugins is also pretty easy, although a few modifications were necessary to migrate the 4 yr old plugin skeleton project to Android Studio. The Arduino library also took a little modifying so it worked with the Flora. Since you can have multiple plugins sending data at the same time, each receives a char flag. On the arduino side, the receiver function is running in the main loop, and data sent with a specific flag will trigger a corresponding function, and that function then processes the data array.
-
Adding Bluetooth
04/03/2015 at 18:33 • 0 commentsFinally, after over a month of waiting, my HC-06 bluetooth module came in from China. For once it truly was 'plug and play', using the Serial1 interface for data transmission over the tx/rx pins. There are a couple apps on the play store that allow you to use your phone as a bluetooth Serial interface and it took under 10 minutes to have my phone controlling various neopixel animations. BLE would have been even nicer, but for 4$ and almost no setup necessary, I can't complain about the HC-06.
Picture shows the BT module sandwiched between the neopixel and Flora. I didn't want to cover the 32u4 chip because of the heat issues I was still having at the time.
-
Flora + Neopixel woes
04/03/2015 at 17:57 • 0 commentsHad a bit of a rough start when testing some example sketches with the neopixel ring. After about a minute, the signal starts experiencing interference and the lights flicker and go white. I noticed that the chip on the flora was getting very hot as well. Putting my finger on the chip to draw heat away would stop the flickering, and a few seconds after removing my finger the flickering would start again. Weird. Neopixels don't like when the data and Vin voltages are far apart, and I figured that the 3.3v logic and 5v Vin may have been causing issues, but even when connected to a LiPo I had the same issues. Re-soldering and using different wires had no effect either. In the end, I think it was the Flora. I also had issues with the board not reading any analog or digital inputs on any pin but D9.
Here's a video showing the problem. Flickering starts around 0:35s. https://youtu.be/YVfH80Bu0JE
-
Initial testing with Flora
04/03/2015 at 17:35 • 0 commentsThis project was initially only supposed to be an Adafruit Flora with a band of neopixels strapped on the back. There are a few problems with this approach though. Firstly, the flora can't keep track of time when it's off. The NeoGeo watch solves this by locking to gps satellites to get the current time. Without any external source, the board would have to be reprogrammed on the fly, or have a method of setting the time via button input. Secondly, the clock on the atmel328 chip is not all that accurate. This can be solved by adding extra hardware, but I didn't have the space for that.
Instead, I decided to connect the flora to my phone. This allowed the watch to always display the precise time nearly immediately when turned on and maintain the correct time, no matter how long it stayed on. It also unlocked a huge range of potential uses for the watch to interact with data from my phone.