This page has information about my electronics projects using the Arduino microcontroller.

Lava Shoes

A pressure sensor in the heel of the shoes controls the number of LEDs that light up. I used these shoes for my "The floor is lava" Halloween costume. This project was inspired by these firewalker-led-sneakers.

video1 video2

The lights are LED strips controlled by an Arduino Flora using the NeoPixels library. The flora probably isn't the best microcontroller for this project, but I had them on hand, and they worked great.

The project is powered by a 3.7V 2500mA Lithium battery that lasted all day without fading color. I tested a 1200mAh current battery and it also worked fine. I bought a small microUSB charger board that worked well with the battery.

The project reads the sensorValue from a velostat with a wire on each side. As pressure is applied, the velostat changes conductivity. These values from the sensor dance around, so they get smoothed out with by only adding 10% of the new value to the old. (value = value * 0.9 + newValue * 0.1;)

The lava colors are stored in an array as just red. To make yellow sparks, green LEDs randomly light up and fade out.

materials: a pair of shoes duct tape Adafruit FLORA - Wearable electronic platform: Arduino-compatible ALITOVE 16.4FT 300 Pixels WS2812B Programmable Addressable LED Strip velostat: ADAFRUIT INDUSTRIES 1361 Accessory Type:Conductive Sheet thin non-insulated copper wire Adafruit 328 Battery, Lithium Ion Polymer, 3.7V, 2500mAh Adafruit Micro Lipo w/MicroUSB Jack - USB LiIon/LiPoly charger Soldering required

code Github - lavashoes.ino #include <Adafruit_NeoPixel.h> const int analogInPin = A11; // A11 is called #12 on the Flora const int NUM_LEDS = 30; const int PIN = 9; const int WAIT = 10; // adjust SENSITIVITY first, then adjust LED_OFFSET until no LEDs light up with no pressure const int SENSITIVITY = 160; // smaller means less lights, bigger means more lights const int LED_OFFSET = 56; // adjust this to remove LEDs that stay lit up after changing sensitivity Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800); int sensorValue = 0; float stripLength = 0; int color[NUM_LEDS][3]; void setup() { // Serial.begin(9600); digitalWrite(analogInPin, HIGH); strip.begin(); strip.show(); // set up colors array as red for (uint16_t i = 0; i < NUM_LEDS; i++) { color[i][0] = 255; color[i][1] = 0; color[i][2] = 0; } } void loop() { // read the analog in value: sensorValue = analogRead(analogInPin); // Serial.print("sensor = " ); // Serial.println(sensorValue); // smooth the sensorValue and scale to number of LEDs stripLength = stripLength * 0.9 + (SENSITIVITY * NUM_LEDS / sensorValue - LED_OFFSET) * 0.1; // stripLength = NUM_LEDS;//light up full strip for testing // green spark for (uint16_t i = 0; i < NUM_LEDS; i++) { if (random(400) == 0 ) { color[i][1] = 125; } else if (color[i][1] > 1) { //green fade out color[i][1] -= 2; } else { color[i][1] = 0; } } //light up LEDs up to stripLength for (uint16_t i = 0; i < stripLength; i++) { strip.setPixelColor(i, color[i][0], color[i][1], color[i][2]); } //turn off the rest of the LEDs for (uint16_t i = stripLength; i < NUM_LEDS; i++) { strip.setPixelColor(i, 0, 0, 0); } strip.show(); delay(WAIT); }

Tron: Lightcycles

This project reproduces the tron lightcycles game. Each player controls a line of color that moves through the grid. If a player hits a location that is already lit up they die. The players will move 4x faster if the joysticks are pressed in.

After building the project I mounted it on plexiglass with screws and hotglue.

video1

The game state is stored in a 2D array of 16 x 16. The array is checked to see if a player will collide after each move.

The 16 x 16 LED matrix is organized in a zig zag pattern. I wrote a function that converts to the zigzag pattern. The NeoPixel library is used to send the final signal to light up each LED.

more pictures:

materials: Arduino Uno microcontroller flexible 16 x 16 NeoPixel RGB LED Matrix 2 Arduino Joy Sticks small breadboard jumper wires (male to female and male to male)