Thursday, November 24, 2016

Project Progress (Week 11 Reflection)

Here is a link to the standards I've selected for my experimental bookbinding project.  My ultimate goal is to create a wifi-connected book, using a Photon microcontroller, that I'll begin constructing in January.

This week, I continued to experiment with code by adding a function that makes an LED flicker like a candle or fireplace.  This function will only be called when a light sensor registers that it's cloudy or dark outside.

Here are a couple screenshots of the Arduino code that I adapted for use on my Photon.  The thing I'm most proud of is that I figured out how to apply a For Loop in the Particle function I created that allows an LED to flicker for a reasonable amount of time--enough to get a point across--without flickering non-stop.  I've since merged the code written below into the larger program that I've been working on.




I've also been experimenting with conductive fabrics and tapes this week, to find a material that might be useful for a book hinge.  Although I had some mixed results, I'm not entirely certain that I'll be able to solder copper tape to the fabric without it scorching.

Lastly, I've begun experimenting with Inkscape, in an attempt to start brainstorming what my wooden covers might end up looking like.

The following image was my first attempt, but I've already discovered some problems with the design.


Monday, November 14, 2016

More Merging of Code: (Week 10 Reflection)

This week, I've continued my exploration of the Photon, as I prepare to implement my Capstone project next trimester.  I am happy to report that I have a working prototype that merges all of the functions that I've been working on and writing about in prior posts.  I'm not finished by any stretch of the imagination, but I have proven to myself that the concept in my mind can work!


Merging all of the functions into one program took considerable time, experimentation, and trouble-shooting. After several failures, and many hours of work, I took a paper copy of my code to a cafe and attempted to debug it.  Surprisingly, this worked, even though I wasn't sitting anywhere near a computer.  Not being near the computer helped me to be more clear about what I was trying to do and helped me hone in on potential problem areas.

Debugging in a Cafe

My next step is to work on finding a smaller servo that will work with my Photon.




Wednesday, November 9, 2016

Merging Programs on Photon: Week 9 Reflection

This week I spent time experimenting with code and playing around with If Then Than That (IFTTT), which recently changed its set-up. My goal was to start merging programs on my Photon. So far, I've got a servo and NeoPixels running in one program, but I'd still like to add in code for a buzzer and LEDs that will be triggered by a light sensor. (This is a cross-post from my personal blog.)

My most exciting breakthrough was figuring out how to use IFTTT's "New Tweet From Search" feature, which makes it possible to trigger a web request by filtering a search in Twitter. In the case of my experiment, I created Applets, formerly referred to by IFTTT to as recipes, that can control the colors of NeoPixels connected to my Photon, in much the same way that CheerLights work!

This could provide an interesting way to interact with a wifi-connected book. A reader could send a tweet to change the color of LEDs in the book or scan a QR code to achieve the same effect, by triggering a Maker Event (also set up in IFTTT). While I'd already figured out how to do this with my own Tweets, I now know how to allow other peoples' tweets to interact with my Photon. My next step is to add code to the program so that a musical function is called in response to data received on a light sensor.


My next step is to add music to this program and trigger an event from data, such as readings from a light sensor or motion detector.

Tuesday, November 1, 2016

BBC Microbit: Week 8 Reflection

This week, another open exploration week, I unboxed my BBC Microbit and played around with some of the coding exercises for Python.  I really like the way that I can practice different coding languages, such as JavaScript and Python with one device!  My favorite lesson so far was this one, where I was able to connect a speaker to my Microbit with alligator clips and play music.  I attempted to complete the Dalek Poetry activity, but I couldn't get it work.




Paper Circuit Triggered Microbit
I also couldn't get the Bluetooth feature to work on my device (I just learned that it's not compatible with Python yet), so the process of uploading the code was a bit cumbersome.
Instead of using the Microsoft iPad app as I'd planned,  I ended up having to drag and drop the code from the downloads folder on my PC onto the device, as if it were a flash drive. Aside from that minor annoyance, it was a fun way to get instant gratification while playing with code.

I found an animated book making project that allowed me to tweak some code to create different animations on my Microbit that were triggered by copper traces in a book touching different pin configurations.  It works in principle, as you can see in the video below.


Here are a couple of screenshots.


I'm running a little short on time this week, so this is where my exploration needs to stop for now. Next time I play with this, I'm going to check out a few of these lessons.  I think that everyone learning the basics of coding should have a Microbit, because you can immediately practice physical coding.