Showing posts with label LEDs. Show all posts
Showing posts with label LEDs. Show all posts

Thursday, December 8, 2016

Artwork Brought to Life with Photon Sensor Data (#IoT)


Art Brought to Life with Photon Sensor Data


I'm making progress toward my goal of creating a wifi-connected book that uses data to help tell a story.  As a test of concept, I created a Thing HTTP app and a "React" app in ThingSpeak to trigger a Particle function (on one Photon) based upon readings from a Photocell (attached to a second Photon).  To get started, I created a ThingSpeak channel and a Particle web hook by following this tutorial.

Once I created the web hook and connected my Photon to a light sensor, the Photon started logging the data on ThingSpeak.  In order to make the data more useful, I modified the Photon code in the tutorial by adding the following lines to the loop, just above the line containing the Write API key for the ThingSpeak Channel.)

value = map(value, 0, 4096, 0, 255); //maps values
value = constrain(value, 0, 255); //constrains values between 0 and 255.  


Next, I uploaded this code to a second Photon, connecting the Photon to a paper circuit using alligator clips. Lastly, I created the ThingHTTP and React apps.


The React app allowed me to set up a trigger related to the data.  I set it up so that a reaction happens any time the sensor picks up a value of 150 or greater (when it's cloudy or dark and the resistance increases) or 50 and under (when it's bright or sunny) . The ThingHTTP app allowed me to post an HTTP request to Particle, triggering the Particle function that illuminates the owl's eyes and the candle flame.



I later added LEDs to simulate falling snow.




Friday, April 22, 2016

E-textile Fun: Sound Reactive Hat

Flora Sound Reactive Hat

I just put the finishing touches on a sound reactive hat that uses a Flora, a tiny microphone, and surface mountable RGB LEDs. This project is an adaptation of Lina Wassong's Sound Reactive Equalizer Skirt, shared on Instructables under a Creative Commons (CC BY NC SA) license. This is a perfect party hat.




Lessons Learned:

1.  I love Adafruit silicone stranded-core wire!
2.  Soldering RBG LEDs is tedious.
3.  A glue gun is a great tool for strengthening solder joints and diffusing light.
4.  Hand held rivet pliers may be harder to work with than standard spot setters.

I used a leather punch and a hand rivet fastener.

The Flora and a microphone are hidden inside the hat.

I went a little crazy with the glue gun!

Friday, December 18, 2015

Running Neopixels on an ATtiny85

ATtiny85 controlling sewable neopixels
Today, I am learning how to use an ATtiny85 to program sewable neopixels, with the goal of moving toward using surface-mounted RGB LEDs in paper circuitry.  The reason that this is so exciting is because the ATtiny85 is an inexpensive, low-profile chip, making it useful for notebook hacking and art projects!  If I can figure out how to make this entire process happen on a Chromebook, it would be a huge breakthrough for classroom instruction.


At the time I was working on this project, there was still one step that required the use of a PC: the process of burning a boot loader/ changing the fuse timing on the ATtiny85.  To use neopixels, the ATtiny85 needs to run on an 8 Mhz internal clock, rather than the default of 1 Mhz. As of 11 January 2016, this issue has been fixed, making it incredibly easy to do this type of thing with students using Chromebooks!

Once I converted the chip to 8 Mhz, I was able to use CodeBender and a Chromebook to program it with neopixel sample code (with only a couple of small tweaks).

My next step was to see if I could apply this new learning to building a paper circuit with copper tape and surface mounted RGB LEDs.  The photos demonstrate a prototype using the surface mounted RGB LEDs soldered to wire!

Since I was able to get the LEDs to do what I wanted with wire, I am 100% convinced that this can be replicated with copper tape!  Stay tuned!



ATtiny85 controlling SMD RGB LEDs






















Updated 19 Dec 15:
I've created my first paper circuit with neopixels!  To learn more, visit BlingtheBook.blogspot.com.