#makered Ugly Sweater success!!

Well, that wasn’t so hard. ūüôā ¬†I followed this excellent Adafruit tutorial.

And here’s the behind the scenes:

IMG_20141214_112548583_HDR
Connecting the neopixel: – to ground; + to vbatt; D10 to –>
Adafruit Flora
Connecting the Flora VBATT, D6, & GND
IMG_20141214_140912986
Underside of shirt

Some weird things about the code. ¬†The RGB didn’t seem to be working properly. ¬†I have v. 1 neopixels and red should be (255,0,0) but it’s (0,255,0). I thought it might be because they were wired for GRB, but green was not (255,0,0). It was (0,0,255). ¬†Since I got it to work, I didn’t spend much time making it perfect. So, just FYI, this is not normal.

And here’s the code:

#include <Adafruit_NeoPixel.h>

#define PIN 10

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic ‘v1’ (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(3, PIN, NEO_RGB + NEO_KHZ400);

void setup() {
strip.begin();
strip.show(); // Initialize all pixels to ‘off’
}

void loop() {
// Some example procedures showing how to display to the pixels:
colorWipe(strip.Color(0, 255, 0), 50); // Red
colorWipe(strip.Color(0, 0, 255), 50); // Green
colorWipe(strip.Color(255, 255, 255), 50); // white

}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}

Blogging the #makered Ugly Sweater build: Step 1, materials

IMG_20141213_140651434I’ve challenged myself and the #makered chat folks to build an ugly sweater for Tuesday’s #makered chat. ¬†I’m hoping I can knock this out in a couple of hours, so you’ll see more on this later today. ¬†First things first, you need to gather materials. ¬†For this project, I’m using the following:

  1. Long-sleeved Christmas themed shirt (not as ugly as I’d hoped, but hey, it will do.)
  2. Flora GPS kit.¬†I probably won’t use the GPS module, but will use the Neopixels
  3. Conductive thread
  4. Scissors
  5. Needles
  6. Battery pack
IMG_20141214_104911260
Materials for ugly sweater project
IMG_20141214_104918187
The Flora in last year’s Christmas project

Things I wish I had:

  1. Sensors
  2. Speaker

Here’s my plan of action:

Using alligator clips, connect 3 neopixels and program the Flora to have the 3 lights blink in a pattern, perhaps with delay time. ¬†Once I have the connections and programming worked out, I will arrange the lights and begin sewing them onto the shirt. ¬†My plan is to put the Flora on the underside and the lights on the front. ¬†That’s a little more challenging from a sewing standpoint, so we’ll see how that works out. ¬†I’m not the greatest of seamstresses. ¬†Check back in a couple of hours to see the progress.

Limited success

The jump start mostly worked. ¬†I started by trying to fix my light-up origami garden. ¬†I checked my connections, ran to radio shack for some batteries, but still nothing. ¬†I lack a multimeter at home, so I can’t tell if current is actually circulating, which would mean that I just need more power, or if there’s no current getting to the LEDs at all. ¬†So it’s on my agenda today to get one. ¬†I ordered one for school while I was at it since I’d been borrowing one. ¬†Hooray!

Testing the Tilt SensorSo I moved on to an Arduino project. ¬†I’m often inspired by my pets. ¬†You might recall last year, I made a GPS tracker for the cat (which, you know, didn’t make it onto the cat, but it still worked). ¬†I thought I might find a way to track the comings and goings of the animals through the dog door that connects the kitchen to the basement. ¬†The door is primarily for the cat, who can then take the door from the basement to the outdoors. ¬†The dog can’t reach the outside door. ¬†I originally thought I’d use a light sensor, but decided the values I got out of it didn’t vary enough to tell when an animal crossed its path. ¬†Plus, there’s the issue of the values changing at night. ¬†I decided on a tilt sensor, which is simply on or off. ¬†When the door goes up when an animal pushes on it, it should record that it’s on. ¬†Simple.

I needed a way to store the data, and not having an SD Card shield around, I googled a bit and found that there’s a bit of memory on the Arduino itself to write to. ¬†It’s only 512 bytes, though, not enough to record comings and goings throughout the day. ¬†But I did prove it could work. ¬†So that’s something!

Today, I’m headed to MicroCenter to get the SD Shield and some other bits and pieces to finish out the project.

Jim Tiffin pointed out to me that Little Bits partnered with IFTT (one of my favorite services) to automate this whole process by writing to a Google Spreadsheet. ¬†That’s great, but it’s a little less DIY than I want. ¬†I think of some of those automated Internet of Things produces (WeMo comes to mind) as great ways to start and to conceptualize how these things work, but they’re limited. They’ll only do what they were built to do. ¬†And for most, you can’t get to the coding underneath at all. ¬†It’s all been done for you.

Using something like an Arduino instead reveals all the layers underneath that. ¬†Just understanding the limits of onboard memory is hugely important. ¬†Most of us take memory for granted now since it’s so cheap and plentiful. ¬†It wasn’t always that way, and there are still applications where saving memory is important. ¬†Yeah, I’m starting to sound like one of those “back in my day . . . we walked both ways to school uphill and in the snow” people. ¬†But every time I do something like this, I’m reminded of how cool the technology is that I use every day, and how amazing it is that we got here at all. ¬†Surely that’s a lesson worth teaching.

Cat Tracking Project Update

So I’ve successfully logged my gps data. ¬†It took some figuring out how to take my data file and translate the data into something human readable, but I found a nifty online tool to do it. ¬†I’m going to work on coding some of this myself, but I couldn’t find any libraries that would work. ¬†But here’s my test:

View GPS Path Test in a larger map

 

Some things to note. ¬†Hooking up the battery wasn’t hard except that there are 2 on switches, one on the board itself and one on the battery case. I’m planning to make a snug pocket to hold the battery case, probably out of felt, which I have a lot of lying around. ¬†Here are some pictures from the project.

sewn on

stitching

the layout

on switch

Cat Tracking Begins

So, I finally got around to starting my Cat Tracking project that’s supposed to help me learn some of this Arduino stuff. ¬†I took a workshop at The Hacktory, which was helpful. ¬†Thankfully, there are millions of tutorials and sample code online. ¬†Mostly, I’m just tweaking code to make it do what I want. ¬†I spent maybe 45 minutes yesterday getting everything up and running. ¬†Here are the results:

Ready to start

All the materials are laid out and ready to go.

All connected

Hooked up properly.

Flora gps

Hanging out the window to get a GPS signal.

Success capturing gps data

Success!

floragps

 

Putting coordinates on Google Map–pretty accurate!

Some issues I encountered:

1. I had to install the Adafruit GPS libraries. ¬†I tried to do it the automated way, but ended up having to do it manually, which isn’t a huge deal, but it took me 10-15 minutes to sort that out. (This tutorial was really helpful.)

2. I had the wrong Serial port option selected for a while. ¬†I usually use a tty option. ¬†Flora requires a cu option (usually usb). My program wouldn’t even compile until I got this right.

My next steps are to store the GPS data that the Flora outputs and then translate it into Google map data to create a visible path. ¬†I’ve seen tutorials for this so I don’t think it will be too hard. ¬†Then I’ll test it on myself. ¬†Then I think I’ll be ready to sew the Flora into the little bandana I have for my cat. ¬†Getting my cat to wear said bandana is going to be the hard part. ūüôā

Learning from the Hacker Movement

Last year, I ran a little mini-course for middle school that drew from the Hacker/Maker movement. ¬†Don’t know what that it? ¬†It’s when people take some parts, material that they have lying around or can buy from places like Radio Shack, JoAnn Fabrics, the local hardware store, and they build something cool. ¬†My course involved making fabric-base things that had lights and wiring in them, something that developed out of this movement, but which has now gone somewhat mainstream. ¬†If you saw the Black-Eyed Peas outfits during the Super Bowl, well, that’s the same concept.

Honestly, it’s those ideas that fire me up, and make me think, “Hey, that might get kids excited.” ¬†Recently, I started following a blog where a woman posts videos, pictures and posts of her homemade robots, which are based on the Arduino platform, an open-source board that’s been used in many cool applications–including sewing the LilyPad version into fabric! ¬†Through that site, I found this site that has Mac-based apps for working with Arduino–so cool.

Honestly, I’d love to teach a course that’s basically a Make course. ¬†Each student would plan a project, design it, program it, and maybe head to a Maker Faire to show it off. ¬†Standard educational practice doesn’t quite allow for this, but hey, I might be crazy enough to try it. ¬†I smell a senior project!

Enhanced by Zemanta

Computing Creatively

Yesterday, I had the wonderful opportunity to attend a reunion of the workshop I attended at MIT this past summer on Creative Computing.  A lot came out of that original workshop for me.  I adopted Scratch for my 8th grade technology classes.  Inspired by the fabric-oriented high-low tech lab, I am doing a soft-circuit project with middle schoolers as part of a special project week we have in the spring.  I also solidfied much of my basic knowledge about programming and because of that, was able to forge ahead to learn more complex programming concepts.  So, it was a very productive 3 days that have had a lasting impact.

In a single day, I got almost as much out as I did before.¬† One thing that was nice about this go around was that I now had actually been in my classroom so I knew more about what I was looking for, what questions to ask, etc.¬† The advice people offered made more sense than it did back in July when I hadn’t even started my position yet.¬† Now, I’m ready to explore¬† a wide variety of things, including using Pico boards with Scratch and using Scratch in my Upper School animation class, something I was inclined to do before, but after seeing some animations demonstrated yesterday, I am now thoroughly convinced.¬† I’m thinking about using Pico boards with the soft-circuit project I’m doing with the middle schoolers and may explore using them next year in 8th grade, especially for students who have some experience with Scratch.¬† And I saw some really cool projects from non-computer science classes that have inspired me to plan a workshop/demo on Scratch that highlights some things that Scratch might be used for outside of CS/Technology classes.

Besides all the great Scratch info, I also got some ideas for arduino boards as one of the graduate students there pointed out a programming environment for them¬†that is “drag-and-drop.”¬† And I found out about a project–which I ran into spontaneously again this morning–where one can build blocks for Scratch, essentially taking it to another level.

And, of course, it was really fun to see people I’d seen this summer, including another Laura with whom I did not get a chance to talk much last time and with whom I have a lot in common.¬† She is three years ahead of me in a similar position to mine, so it was lovely to get some advice from her and to see where I might be in a few years’ time.

The last week or so has been really productive for me as I’ve worked on several different projects and got many plans in place.¬† Going to this reunion really helped keep that productivity streak going.