Wednesday, December 10, 2014

Preparing to Code ~ Using eTextile

While millions of students all over the world are learning to code during Hour of Code week,  I'm brushing up on my coding, too.  I've set a goal to learn to code using e-Textile and to also come up with a strategy to introduce coding to students through eTextile projects.  It's my belief that this will reach a different group of students than traditional coding curriculum.  MOTIVATION is the first step in learning anything.  For some,  making a turtle move across the screen or having "Hello World" flash on your screen does not provide the motivation to learn the idiosyncrasies of coding.   eTextiles get students who learn with their hands involved in the end results of their code first.  They can visualize their project, and start building it right away.  As it starts to look like their project, their mind imagines endless possibilities for what the code could do (if they only knew how).  I think this will work, we'll see.  I welcome all comments, suggestions, help tips -- especially from computer science teachers.  The terms I use might not be as precise as the ones you would use. I don't want to cause misconception, so please add your feedback in the comments.
 
First, I'm  going to provide a series of post that describe my understanding of the code of my current
eTextile  project  (A Christmas hat).  Then I'm going to follow up with what I hope are some projects that are targeted at leading students through some important coding concepts.

The steps leading up to this post included

1) Set up the Lilypad so it can communicate with your computer. 
I  chose to use the Lilypad ProtoSnap Board from Sparkfun.  Here are  some great directions for hooking it up to your computer. The trickiest part was to make sure I had the right drivers for my computer. One suggestion I have is to use two Lilypad boards.  I took the suggestion of my friend, Dayle Payne, and used two boards. One for prototyping and one for building.



2) Play around with some cookie cutter code that produced the desired results on my LilyPad protoboard. 

No sewing.. just playing with other peoples' code and seeing if I could get it to make lights blink and music play on my LilyPad.  Do NOT snap the components apart. By plugging the LilyPad development board directly into your computer intact, you KNOW that all the pieces are properly connected and you can focus on seeing that your code workds.  (No faulty wiring to worry about).  Also, don't worry about changing any of the code yet.  Just see if you can load up some sample Ardiuno code.  I'll create a whole separate blog post with some of my favorite GET STARTED CODE SNIPPETS for beginners.  Including some challenges for tweaking the code to get different results. 


3) Planning a design for the Christmas hat LEDs.
I started with a battery, some alligator clips,  jewelry wire and 3 green LED's and played around with getting the pom pom to light up. I learned that twisting together the leads from the 3 LEDs into one would create a parallel circuit.








Encouraged by my initial success of creating a basic circuit, I was inspired to expand my design with some sewable LEDs. I used LOTS of alligator clips and safety pins to come up with a design where the LEDs would be sprinkled around the hat.   This stage required me to go deeper with my understanding of parallel and serial circuits.




5) Sketch out your circuit design on paper.

Alligator clips are great, BUT  they are all insulated and you don't need to worry about 'shorts'.  As soon as I started to sketch out my design, I realized that my design was quite complex.  How was I going to stitch all the positive and negative leads back to the Lilyboard without creating a short.   I had no idea how to strategize this.  It was like a huge puzzle piece and I kept staring at it and started to feel that it was impossible.

I had two choices.  Simplify the design, or move forward and work through the puzzle and deal with the issues as they came up (knowing darn well there would be issues).  My husband's tip to do all the positive leads first helped.  Your positive leads have more constraints. Your goal is to get them from POINT A to POINT B without crossing.  The negative leads don't all have to make it back to the Lilypad board.  You just have to find a way back to another negative trace, and as long as you can avoid those positive traces, you're good.  So that part of the puzzle has several possible solutions.  And if you get really stuck,  you can always come up with a way to add a little insulation (more on that later).

 I moved forward and came up with a rough sketch of the positive and negative traces.



 6.  Start sewing. 

Finally I could avoid it no more.  Out came the conductive thread, the needle and the beeswax (to keep the thread from tangling so much).   My husband gave the advice to start planning and sewing the positive traces first.  It was great advice.  I also used a green marker to keep track of my negative traces.  I, also, used alligator clips to connect each LED's negative trace and my freshly sewed positive trace to a test battery.  This switched  LilyPad battery holder worked great for this.












7.  Jump for Joy

And if all goes right,  when you sew your last LED, and turn the switch on your battery to on, and all the LEDs LIGHT UP,  I assure you you will squeal and jump for joy!  And voila, you now have EXTREMELY HIGH MOTIVATION to Learn to Code!


Next Post ~  Learning to CODE!






No comments: