Wednesday, October 29, 2014

Halloween with Arduino

Arduino Halloween from Duxbury Free Library on Vimeo.

It wasn't easy but we were able to accomplish our 2 Halloween projects: an LED pumpkin and a talking motion sensor skull.  I'll go over each and things that we learned (aka what they sometimes to forget to tell you in the directions). Special thanks to Kevin Osborn for coming down to provide his expertise for the skull.  Also worth noting, also has great tutorials for beginner Arduino. This subscription is offered free of charge in our library and also if you are a librarian through the MBLC.

We started with the hardest one first, THE TALKING SKULL (Advanced)
*If you are just starting out I suggest doing the entire SIK CODE GUIDE book (comes with the Sparkfun Inventor's Kit) and if you're not ready to throw it out the window then try the Pumpkin*

Items required:
PIR Motion Sensor   $9.95
Sparkfun Inventors Kit  $99.95
Sparkfun MP3 Shield  $39.95
microsd card and micro SD reader (to put mp3s on it from computer) $18.99
Soldering gun
skull  $8.99
9v battery and 9V Barrel Jack Adapter (to run the program without the computer) $2.95
speakers or headphones
mp3 sound


VIEW OF MP3 SHIELD. THIS SITS DIRECTLY ON TOP OF THE ARDUINO (with 9V Jack of Arduino and speaker jack of the shield aligned)

Wire Connections:


PR SENSOR WHITE TO ANALOG 0 ON SHIELD  (All analog outputs are free)



AV SERVO WHITE TO DIGITAL PIN 10 ON SHIELD (This pin isn't being used by the MP3 shield but some are so you have to see the Sparkfun online tutorial if you want to hook up a button or LED)



Here's a dropbox link to our code: Hallowscream with 2 mp3s to try. Kevin O. wrote this using a modified code of his INSTANT PARTY.

It also comes with a button and LED coding that we didn't use. This way you would have to press the button before you activated the motion sensor.

If you hook this up the same way we did, and use the code. It will work. Make sure to name your mp3 tracks track001.mp3, track002.mp3 and so on.

I recorded my Happy Halloween in Garageband for MAC (use Audacity for PC) but there are plenty of free sites to download spooky sounds.

Things we learned:

You have to solder the header pins onto the mp3 shield. This is a one time thing but it is a must for the connections to work properly. Be careful when putting the headers in because a pin could get bent easily.

The PR Sensor's wires don't match standard protocol. red= positive White=ground, black= input. We changed the wire colors during hookup so it matched standard red= +, black= ground, white=input.

It is really hard to program multiple outputs (ie: servo motor, motion sensor, LEDs) and getting them all to work in relation to each other without a solid knowledge of arduino coding. It's like a deep rabbit hole where many things can go wrong.  Also not every code is equal, some people write great side notes in their code so it's easy to change things up, some don't.


Items required:
Sparkfun inventor's kit $99.95
SIK Code Guide Project 4 (included in kit)
Pumpkin $1.00
large LEDs
9v battery and 9V Barrel Jack Adapter (to run the program without the computer) $2.95
 extra wire
electrical tape

Rather than hooking up the LEDs directly to the breadboard (see traditional instructions below where yellow circles indicate the LED placement)

I cut some wires and stripped the rubber off inserting one end of the positive (RED) and negative (BLACK) wire to match the yellow positive and negative circles indicated {ONE WIRE C3 (+RED), C4(-BLACK) to PUMPKIN LED, NEXT WIRE C5 (+) C6 (-) to PUMPKIN LED and so on} . The other side of the wire was brought to the pumpkin and connected to the the positive and negative leads of the LEDs (remember the positive lead on the LED is longer than the negative) Think of it like an extension cord so the LEDs could be moved to the pumpkin and still powered by the breadboard.


This project will allow up to 8 LEDs. I didn't need to put all the resistors and wires in place since I only used 5 LEDs but it was nice to have the option to pick and choose where to put the extension wires on the breadboard. It tended to get hairy in there. If there is no wire, nothing lights and no code needs to be changed. (The less code changing THE BETTER).

Just remember where you put your extension wires affects the order of the lights. C3's Wire being first LED in the order to blink.

Highlighted Yellow was wire connections rather than LEDs. White circles indicated placement on breadboard. 


The Arduino has been the hardest thing we have done yet in STEM. It's important to truly understand the projects in the book that comes with the Sparkfun Inventor's Kit (SIK CODE GUIDE) and experiment with code that gives copious notes on each part before trying an off book project. 

Tuesday, October 21, 2014

The Power and Challenge of Arduino

Working with the Arduino microprocessor platform is challenging. It teaches many lessons to teens and adults alike that are worth listening to.  Precision matters. Reading the fine print and following directions pays off. Learning how things work and how to diagnose an error takes time and can be boring anf frustrating. It helps to collaborate and ask others what they think.

We're learning to take the code and run with it. If the piezo buzzer is playing Monster Mash, what else can it play? How do we change its tune? If the LCD screen says, "Hello world," how can we change that to say a different message? How do we adjust the code to do what we want it to do?

Adding sound and sensory shields to our Arduinos is a big step and we are still working out the details and complications of them. But we are not stopping at the introductory stages. We are pushing ourselves to learn more about how things work and why. We are constantly surprised by how patient our teens are and how willing they are to hang in there for the long haul.

It's not enough to be a user or a consumer. We want to be the makers and creators.

Saturday, October 18, 2014

Halloween with littleBits

We had a great time in the children's room this week making Halloween decorations for our Tinkering Thursday class for grades 4 & 5 using littleBits.  Besides the littleBits, this program cost $7 in Halloween decorations at the local dollar store.  We are fortunate to have littleBits deluxe kits as well as base kits to mix and match.  
The most important thing to have extra is: 
*blue power bits and batteries (since a 9V battery can only power so many bits at once and you can't add extra power circuits onto your original).  
*orange wire bits (to extend their led lights or buzzers off of the circuit bases).

I began the one hour class by opening the kits and having kids experiment with all the bits available, towards the 20 minute mark I showed them all the decorations they had to work with and they began thinking about how they could design circuits that went with it.This is where the orange wire bits came in handy . 
 One thing I wish is that we could hang these on the walls. The littleBits bases with the circuits are too heavy (not to mention we can't tape anything to the walls with any adhesive strength to it) but we made do on our display table. What I found the most interesting about this program is I only had 5 kids sign up, only one of them being a girl. With our huge after school population, I just came out of the room and said "Who wants to help make Halloween decorations for the children's room?" and immediately 4 other girls jumped in. I'm curious if I said "Who wants to build circuits?" if it would have elicited the same response. We have to think about how we approach our marketing to kids especially those that label themselves "not really into science" (like the younger version of ME).  What if I just labeled these as craft programs? Food for thought.

littlebits for Halloween from Duxbury Free Library on Vimeo.

Thursday, October 9, 2014

DIY Club: Stop Motion Month

Just in time for the release of the new movie The Boxtrolls, done entirely in claymation stop motion, we finished up a month long after school Lego stop motion program on Tuesdays for students in Gr. 6-8. Ellen thought it would be a good idea to talk about the structure of the program and some tips we have learned along the way.

Material Must Haves:
iStopMotion ($5.99), iMovie ($9.99), and DropBox (free) app
Bins of Legos and figures

*Note: This can also be done though the camera in a phone or tablet (regular camera phone app that comes free) and downloaded into iMove for a Mac or Windows Movie Maker for a PC (bearing in mind you have laptops or free computers handy) if you are on a shoestring budget. It's just less streamlined that way.  The key to stopmotion is FRAMES PER SECOND which can be changed in any of these editing programs as long as the students have taken enough photos.

Preparation Tip: Make sure to separate out weapons, costumes, and Lego figures before the kids come in to save time.  I stored all of it in a pencil case.  If you have any choice for Lego figures, I prefer the ones with 2 faces (usually happy or sad) that the kids can change with a turn of the head. It makes things more expressive.
Preparation Tip: If you have any budge left, buy Lego bases. They are much easier to use than to cobble together Legos for a makeshift base. Bases range from 4.99 to 14.99 each.

Other props that would be nice to have on hand:
colored paper and printed backgrounds
clear fishing line (for making things fly in the air)
cotton balls (for making explosions)
lots of masking tape (to tape the bases down to prevent moving and various other things)
felt/sheets (to cover tables and walls for a less distracting background)
sharpies (to write "THE END" and various other notes on paper) If you can getting kids to storyboard their ideas and shots first it would be ideal but I've never been successful at it.
clay (for blood, ooze, water or just to use to make models)
stands for ipads (we used our book display holders)
Small cardboard boxes (for stacking-the iPad has a limited zoom so it's challenging setting up shots without something to change camera heights. We have these awesome cardboard blocks that kids use in our children's room that have been re purposed for backgrounds and camera stands during shooting). 

Week 1 & 2: Set Design & Picture Taking  (1.5 hrs per session for 3 hours total)

Shooting Tip:Take 3 consecutive pictures for every time you make one stop motion move.  This will slow down your movie immensely and people will be able to notice all the details. This also adds time in if you want to add dialogue later. This can also be accomplished after the fact by tapping on the wrench for each picture in iStopmotion and pressing the "Duplicate Frame button"  or by changing the frames per second in the upper corner gear button.

Shooting Tip: Watch out for shadows, people moving in your backgrounds, random hands in shots, etc.  If you can get a group together, have one person in charge of moving each Lego figure. They can make one move say all set and another person can be in charge of the camera.  That way each person knows if they have moved the Lego or not. There is a "ghosting feature" on the iStopmotion app that helps and is worth the $5.99 in itself. This shows a blurry marker of the last movement shot once the Lego is moved. It's like a place marker.

Week 3: Editing and Film Debut (1.5 hrs)

We edit through iMovie on the iPad which is very limiting but easy to manage since we're already on the iPads.  One of the best features of the iPad version is that students in the class can make their own sound effects in addition to the library that is included. iMovie for the computer allows more options for adding text and film transitioning.

Our class was working nearly to the wire so we were unable to present them on the projector for their big debut but I emailed everyone their own files through our DropBox account right from the iPads.  Make sure you have a good wireless connection otherwise this part takes some time. Each iPad needs to be signed into a DropBox account. We have one for the library. DropBox allows you to share specific folders while keeping your personal/work files private. 

Structure Tip: What's interesting about the class is to see all the different styles of the students. Some spent the entire month doing one very long film (it was nice to have extra iPads on hand for them to be able to shoot multiple scenes at the same time), while others worked alone on one different story each time. I usually prepare for everyone to have their own iPad but many wanted to work in groups with varied success. Not everyone can be the director!

When we started editing some went with their own dialogue while others didn't want any sound effects at all so finishing times varied. Be prepared with something else to do during downtime. Research some awesome stop motion videos that are kid friendly that can be shown in the background. I'm a big fan of this epic Halo battle but use your judgement on the violence factor.  Another talented stop motion filmaker on youTube is Michael Hickox  I've played these videos before and during sessions (not near their shooting areas though because it affects the light) for inspiration. (video training tutorials) has a detailed stop motion tips and tricks class if you want to sign up for 2 weeks through MBLC.

Class extensions: SLJ  (School Library Journal) just covered Lego Story Starter packs to promote literacy which includes computer software, Lego figures galore, and a spinner to help stories get started. These can easily be integrated into stop motion class along with Lego WeDo Kits to add robotics (something the kids wouldn't have to move on their own to convey motion). I think we could devote an entire summer reading program to Legos and still keep the momentum going (think Building theme of 2017!).

In the meantime, enjoy our internet film debut:

DIY Club Stop Motion from Duxbury Free Library on Vimeo.

Monday, October 6, 2014

Halloween Circuitry Projects

In the YA & Children's department, we are gearing up for Halloween using Arduino and littleBits. How cool would it be to do homemade Halloween interactive props? Every year we say that we want to do a Haunted House and this is our first step in the right direction.

littleBits just released some Halloween inspired projects: creepy picture frames, pumpkins, & EL wire wearables using the Deluxe kits. We will be using these as a baseline for ideas in our Tinkering Thursday Halloween projects on October 16th. My hope is that they could be put on display until Halloween (if they aren't too scary).

As an advanced project for the middle school DIY Club, we are going to be using the Sparkfun Arduino Inventors Kit to go through the manual for 2 weeks practicing breadboard circuitry and preset Arduino programming. They have a great easy to understand manual with detailed pictures for beginners. From there, we have researched Halloween based projects for further exploration to include a talking skeleton and LED pumpkin. Here is our additional experimental materials (- a pumpkin and a skeleton).

2 - $5.90 - PRT-09518 - 9V to Barrel Jack Adapter  ($2.95 ea.)
4 - $2.00 - PRT-09280 - Arduino Stackable Header - 6 Pin  ($0.50 ea.)
4 - $2.00 - PRT-09279 - Arduino Stackable Header - 8 Pin  ($0.50 ea.)
2 - $79.90 - DEV-10628 - MP3 Player Shield  ($39.95 ea.)
2 - $1.90 - COM-10722 - Thin Speaker  ($0.95 ea.)
2 - $3.90 - COM-09151 - Speaker - 0.5W (8 ohm)  ($1.95 ea.)
2 - $57.90 - COM-10747 - PowerSwitch Tail II  ($28.95 ea.)
10 - $17.60 - ROB-11696 - Hobby Motor - Gear  ($1.76 ea.)
2 - $19.90 - SEN-08630 - PIR Motion Sensor  ($9.95 ea.)
2 - $5.90 - PRT-10512 - 9V Battery Holder  ($2.95 ea.)

A few things to keep in mind:
How is the Arduino powered? We thought we'd try 9v batteries and a powerswitch tail.
WAV or MP3 sound shield? Either shield works, depending on the Arduino board you have, but most of the popular music is mp3 format.  You also need a memory card: SD or mini SD depending on the shield.
All motion sensors are not equal. PIR motion sensor or range? We still don't know!

Happy Halloween Makers. Wish us luck. Pictures to follow!

Wednesday, October 1, 2014

The value of interns and volunteers

This fall we have been lucky to have the benefit of a Simmons School of Library and Information Science intern, Anne Lundregan, working with us on our Digital Media Lab Makerspace.

Everyone wins: she gets academic credit for working with us and developing some programming on her own to test out on our patrons, and we get a commited 10 hours/week professional-in-training to help us develop our new initiative.

Now we are planning to develop a structured volunteer program centered on our Digital Media Lab (DML). It's always tricky to figure out how to use volunteers and how to give them enough buy-in to make a reliable commitment.

Our circulation volunteers are very reliable and seem to know they are much appreciated. They tend to be retired folks who have daytime hours to offer, which is so helpful. With Makerspaces, the expertise we are looking for may come in the form of working people whose availability is much more constrained. Though they may not work on Saturdays, who wants to give up that precious time when errands must be run, appointments made, and healthy relaxation is required? But if we can get them excited about being able to participate in things beyond the scope of their jobs or individual lives, maybe that will be enough. Learning new skills, playing with powerful creeative tools, helping others achieve a level of competence and comfort with new technology - these are the enticements we can offer.

We have some emails in to the Duxbury High School Creative Imaging teacher as well as the Tech Department to offer ourselves to students who need community service credit for National Honor Society. We're hoping to be a good place for collaboration with the schools on this.