Week 13 - Interface and Application Programming


The week where Kellie had to confront her fear of coding from multiple directions.


I have a fairly good understanding of what a code is doing once it is already written, but ask me to write a code from scratch and I become paralyzed....


I had initially wanted to make an app through React Native. So I spent a few hours getting all set up to do so. I downloaded all the necessary software and followed the directions to a 't'.


It seems like I have everything all set up to start, but alas there is more to go. I've started using shells and terminals which was another scary item for me. Fortunately, React Native stepped me through everything. I enjoyed playing with the different example codes that were provided. I learned how to take a screen and budget room on it, change colors, text, and so on. Still a bunch of code that I couldn't write myself but I figured any interaction with code would be a step towards me becoming comfortable with writing and using it. Special shout out to the atom symbol, that made my night.


Moving on to getting a user interface was downloading Android Studio. This allowed me to see what changes I was making, but on my phone through an app called Expo. I really started to see how all the code was changing things.


The QR code made transitioning between codes very simple. Once both my phone and laptop were connected to the same WiFi I was able to do live updates in real time. This made seeing the little changes and alterations significantly easier.


What I Ended Up Doing


Ultimately I did not use React Native, but instead Processing. It was simple and allowed me to really work Belle's Accelerometer Board into the app. Initially I wanted to create a maze game, but I decided to go with something a bit more artsy.

With some minor changes in the Arduino code, and a writing of a new code for the interface, I was able to create a color mixer using accelerometer data!


There was a slight obstacle when only providing 3 items to the string, the B or z-axis data was always held low, but by adding a fourth item to the array, the code worked beautifully. Please see the codes below. The first is the code for the data collection, transition to RGB, and transfer. While the second controls the actual app and user interface.