Light Up “Superhero” Yoga Mat

medemonstrating

Before I set out to make my yoga superhero mat, I did some research and found a burgeoning yogi/superhero movement. Check it out here! There’s a pose in yoga called “Superman” and yoga helps people find their superhero within.

yogamatinprogress

So first I had to write some code to make a yoga mat with velostat sensors that lights up. I took inspiration from these Firewalker LED sneakers and then made some adjustments so that the different pins corresponded to different velostat pads. You can see the prototype here.

Next, I started to build the mat. I soldered the LED strip on the flora board and used conductive thread to sew from the sensors to the flora board. The code I wrote is for three sensors, but I used two so that things wouldn’t get too messy.

I used conductive thread so that the mat could still easily be rolled up and transported.

closeup

Now when I do yoga, the mat changes colors when I move around. I could see that this would make yoga more fun for kids and might propose the idea to Headstand. I also think that this would make for a rad yoga dance party! MC Yogi would LOVE it.

Screen Shot 2013-10-07 at 9.37.33 PM

Check out the code and make your own light up superhero yoga mat!

#include <Adafruit_NeoPixel.h>

const int analogInPin = A9; // Analog input pin that the potentiometer is attached to
Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, 6, NEO_GRB + NEO_KHZ800);
int sensorValueR = 0; // value read from the pot

int sensorValueG = 0; // value read from the pot
int sensorValueB = 0; // value read from the pot

const int ledPin = 7;
void setup() {
Serial.begin(9600);
pinMode(9, INPUT);
digitalWrite(9, HIGH);
pinMode(12, INPUT);
digitalWrite(12, HIGH);
pinMode(10, INPUT);
digitalWrite(10, HIGH);
strip.begin();
strip.show();

}

void loop() {
sensorValueR = analogRead(analogInPin);
Serial.print(“sensorR = “);
Serial.print(sensorValueR);
sensorValueG = analogRead(11);
Serial.print(“sensorG = “);
Serial.print(sensorValueG);
sensorValueB = analogRead(10);
Serial.print(“sensorB = “);
Serial.println(sensorValueB);

int r=0, g=0, b=0;
if (sensorValueR > 55) {
r=20;
}

if (sensorValueG > 352){
g=20;
}
if (sensorValueB > 65) {
b=20;
}

colorWipe(strip.Color(r, g, b), 25);

}

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);
}
}

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s