The TTC Shirt

Concept

For those of you who don’t have smart phones, are you sick of waiting for the TTC not knowing when the next bus or streetcar will come? If there was a way for other people of letting you know would you be interested? The TTC shirt solves this problem by broadcasting when the next TTC vehicle will arrive at a specific stop. Much like the Next Vehicle Arrival Information boards in the subways and at some TTC stops, the TTC Shirt will provide that information except it will be worn by someone. There is no way the TTC will be able to install these boards at every bus or streetcar stop, so why not engage the community in helping solve this problem? People can make their own shirts by following instructions or they can buy a patch with the LED’s and sew it onto their own piece of clothing. If many people start wearing this shirt, we’ll be able to get this information to more people without costing the TTC a dime.

 

Circuit

The first thing I started off with was designing the circuit. I decided to layout the circuit in layers. I also wanted to make the shirt modular so instead of sewing the LED’s directly onto a shirt I decided to make it a patch with a smaller removable patch for the Arduino, bluetooth and battery power supply. That way the entire patch is washable and you can put it on different pieces of clothing. Here are the components:

15 x super bright LilyPad LEDs
conductive thread
1 x Arduino mini pro (5V)
1 x LilyPad Lithium power charger (5V output)
1 x bluetooth mate silver
1 x 3.7V 800mAH Lithium Ion battery
17 x snap buttons
black cloth

Overall Circuit:

Circuit diagram showing all components

Small Removable Patch Circuit:

Circuit diagram showing top and bottom side of small removable patch with Arduino, bluetooth module and power supply

Main Patch Circuit:

Top layer (side up) of main patch - LED's

Top layer (side down) of main patch - ground connections

Bottom layer (side down) of main patch - signal connections

 

 

 

 

 

 

 

 

 

 

 

 

Process

For the first paper prototype please see my previous blog entry (http://blog.ocad.ca/wordpress/gdes3b16-fw201202-01/2012/11/the-ttc-shirt-proposal/). I wanted to use the minimum number of LED’s to create a matrix that would still be legible. I decided on a 5×3 LED matrix and to make sure that it would be legible I did some mock up of numbers:

 

 

 

 

 

 

 

 

 

 

 

 

The next thing I did was layout my fabric for the small removable patch and start sewing on the Arduino and the snap the buttons which would act as connectors to the main patch:

 

 

 

 

 

 

I then took a piece of fabric and screen printed the words “THE NEXT TTC VEHICLE IS IN… MIN”. After that I sewed on the LED’s and the ground connections:

 

 

 

 

 

 

 

 

 

 

 

On another piece of fabric I sewed on the signal connections:

 

 

 

 

 

 

 

 

 

And finally I sewed the two main pieces of fabric together and sewed on velcro strips along the sides and put together the small removable patch as well:

 

 

 

 

 

 

 

 

 

 

 

The final result is this:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Here is a short video of the shirt changing numbers and displaying a text message:

For the shirt to display TTC data, an internet connection is required. For now, I used a bluetooth mate silver to connect the arduino and a laptop wirelessly. I then used Processing to extract the next vehicle arrival information from the internet and then have it sent to the arduino. The entire circuit is powered by a 3.7V Lithium Ion battery.

Improvements

If I had more time, instead of conductive thread, I would have used laser cut conductive fabric. Currently the conductive thread is not reliable and the LED’s are intermittently lighting up. I believe conductive fabric would have produced a more stable connection.

Code

Processing Code:

import controlP5.*;
ControlP5 cP5;
ControlFont ButtonFont;
String StopValue = “6850”;
String TextValue = “HELLO”;
//Textfield StopNumber;

import processing.serial.*;

Serial port;
PImage backgroundImg;
int VehicleWaitTime;
int DelayTimer;
int DelayValue;
int Mode = 0;

final int TTCMode = 0;
final int TextMode = 1;
final int NotifyMode = 2;
final int FlashTime = 500;
boolean TextSent = false;
int lastTime;

float n;

//LED [] LEDsOff = new LED [15];

void setup() {

// set up serial port
PFont font = createFont(“arial”,81,true);
ButtonFont = new ControlFont(createFont(“arial”,60),60);
//ButtonFont.setSmooth(true);
lastTime = millis();
cP5 = new ControlP5(this);

cP5.addTextfield(“StopNumber”)
.setPosition(111,341)
.setSize(768,119)
.setFont(font)
.setFocus(true)
.setColor(color(255,255,255))
.setText(StopValue);
;
/*cP5.addBang(“submit”)
.setPosition(40, 300)
.setSize(280, 40)
.setTriggerEvent(Bang.RELEASE)
.setLabel(“Submit”)
;*/
cP5.addButton(“Submit”)
.setPosition(111,518)
.setSize(239,95)
//.setFont(font)
.setValue(0)
;
cP5.addButton(“Text”)
.setPosition(401, 518)
.setSize(239,95)
.setValue(0)
;

cP5.addButton(“Notify”)
.setPosition(693, 518)
.setSize(239,95)
.setValue(0)
;

cP5.controller(“Submit”).captionLabel().setControlFont(ButtonFont);
cP5.controller(“Submit”).captionLabel().setControlFontSize(60);
cP5.controller(“Text”).captionLabel().setControlFont(ButtonFont);
cP5.controller(“Text”).captionLabel().setControlFontSize(60);
cP5.controller(“Notify”).captionLabel().setControlFont(ButtonFont);
cP5.controller(“Notify”).captionLabel().setControlFontSize(60);

//controlP5.setFocus(true);
//controlP5.setColor(color(255,255,255));

println(“Available serial ports:”);
println(Serial.list());

port = new Serial(this, Serial.list()[6], 115200);

size (1280, 800);
backgroundImg = loadImage(“background.png”);

DelayTimer = millis();
DelayValue = 1000;
//LEDPlace = new LED;
//int k = 0;

}

void draw() {
//imageMode (CORNER);
image(backgroundImg, 0, 0);

if (Mode == TTCMode) {
VehicleWaitTime = CheckWaitTime(StopValue, VehicleWaitTime);

// station ID 6850 is for 501 Queen Westbound at Shaw street
println(“Time: ” + VehicleWaitTime);
println(“Stop Number: ” + StopValue);
if (VehicleWaitTime > 9) {

port.write(” “);
} else {

port.write(VehicleWaitTime);
}
} else if(Mode == TextMode) {
//port.write(“HELLO”);
if (TextSent == true) {
port.write(” “);
port.write(TextValue);
println(“Text mode”);
TextSent = false;
port.write(” “);
}
} else if(Mode == NotifyMode) {
//port.write(” “);
if (millis() – lastTime >= FlashTime) {
port.write(TextValue);
println(“Notify mode”);
lastTime = millis();
}
}
//port.write(25);

/*for (int i = 0; i <=14; i ++) {
LEDsOff[i].display();
}*/

}

public void controlEvent(ControlEvent theEvent) {
println(theEvent.getController().getName());

}

public void Submit(int theValue) {

StopValue = cP5.get(Textfield.class, “StopNumber”).getText();
println(“a button event from Submit: “+StopValue);
Mode = TTCMode;
}

public void Text(int theValue) {
TextValue = cP5.get(Textfield.class, “StopNumber”).getText();
println(“a button event from Text: ” + TextValue);
Mode = TextMode;
TextSent = true;
}

public void Notify(int theValue) {
TextValue = “!”;
Mode = NotifyMode;
//TextSent = true;
}

int CheckWaitTime(String StopID, int LastValue) {
// The URL for the XML document

// using XML to get data
String url = “http://webservices.nextbus.com/service/publicXMLFeed?command=predictions&a=ttc&stopId=” + StopID;
XML xml;
int WaitTime = 0;
// Load the XML document
if ((millis() – DelayTimer) < DelayValue) {
xml = loadXML(url);
//XML NextVehicle = xml.getChild(“predictions”).getChild(“direction”).getChild(“prediction”);
XML[] NextVehicle = xml.getChildren(“predictions”);

for (int i = 0; i <= NextVehicle.length-1; i++) {
String NoPrediction = NextVehicle[i].getString(“dirTitleBecauseNoPredictions”);
print(“Counter: ” + i + ” “);
println(“XML String: ” + NoPrediction);
if (NoPrediction == null) {
XML NextVehicle2 = NextVehicle[i].getChild(“direction”).getChild(“prediction”);
WaitTime = NextVehicle2.getInt(“minutes”);
}
//WaitTime = 10;
}

//println(NextVehicle[1].getContent());

//XML NextVehicle2 = NextVehicle[1].getChild(“direction”).getChild(“prediction”);
//println(NextVehicles);

//XML Vehicles [];
//NumberOfCars = NextVehicles.getChildCount();
//Vehicles = NextVehicles.getChildren();
//println(Vehicles);

return WaitTime;
} else {
DelayTimer = millis();
WaitTime = LastValue;
return WaitTime;

}
}
//maps numbers to data

Arduino Code:

//Pin Numbers
const int LED0 = A1;
const int LED1 = A2;
const int LED2 = 2;
const int LED3 = 13;
const int LED4 = A0;
const int LED5 = 3;
const int LED6 = 11;
const int LED7 = 12;
const int LED8 = 4;
const int LED9 = 9;
const int LED10 = 10;
const int LED11 = 5;
const int LED12 = 7;
const int LED13 = 8;
const int LED14 = 6;
const int VibePin = A3;

unsigned long StartTimer;
unsigned long EndTimer;
unsigned long PresentTime;
int DelayValue;

boolean Changed = false;
byte PreviousCommand = 0;

void setup() {

Serial.begin(115200);
//set up pins
for (int i = LED2; i <= LED7; i++) {
pinMode(i, OUTPUT);
LEDOff(i);
}

pinMode (LED0, OUTPUT);
LEDOff(LED0);
pinMode (LED1, OUTPUT);
LEDOff(LED1);
pinMode (LED4, OUTPUT);
LEDOff(LED4);
pinMode (VibePin, OUTPUT);
LEDOff(VibePin);

DelayValue = 500;
}

void loop() {

byte Number;
if (Serial.available()) {
Number = Serial.read();
if (Number >=0 && Number <= 32) {
if (Number != PreviousCommand) {
DisplayOff(true);
}
DisplayNumber(Number);
} else if (Number == 33) {
DisplayNumber(Number);
} else {
DisplayNumber(Number);
delay(500);
DisplayOff(true);
}
}
//DisplayNumber(35);
}
void LEDOn (int PinNumber) {
digitalWrite(PinNumber, HIGH);
}

void LEDOff (int PinNumber) {
digitalWrite(PinNumber, LOW);
}

void DisplayOff (boolean Delay) {
LEDOff(LED0);
LEDOff(LED1);
LEDOff(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOff(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOff(LED13);
LEDOff(LED14);
if (Delay == true) {
delay(200);
}
}

void Row1On() {
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);
}

void Row1Off() {
LEDOff(LED12);
LEDOff(LED13);
LEDOff(LED14);
}

void Row2On() {
LEDOn(LED9);
LEDOn(LED10);
LEDOn(LED11);
}

void Row2Off() {
LEDOff(LED9);
LEDOff(LED10);
LEDOff(LED11);
}
void Row3On() {
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
}

void Row3Off() {
LEDOff(LED6);
LEDOff(LED7);
LEDOff(LED8);
}

void Row4On() {
LEDOn(LED3);
LEDOn(LED4);
LEDOn(LED5);
}

void Row4Off() {
LEDOff(LED3);
LEDOff(LED4);
LEDOff(LED5);
}

void Row5On() {
LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
}

void Row5Off() {
LEDOff(LED0);
LEDOff(LED1);
LEDOff(LED2);
}

void FlashPattern() {
DisplayOff(false);
Row1On();
delay(15);
Row2On();
delay(15);
Row3On();
delay(15);
Row4On();
delay(15);
Row5On();
delay(15);
Row5Off();
delay(15);
Row4Off();
delay(15);
Row3Off();
delay(15);
Row2Off();
delay(15);
Row1Off();
delay(15);
}

void DisplayNumber (byte Number) {
//DisplayOff();
switch (Number) {
case 0:

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);
//StartTimer = millis();
//Serial.println(“Start:” + StartTimer);
//EndTimer = StartTimer + DelayValue;
//Serial.println(“End:” + EndTimer);
//Serial.println(“present: ” + millis());
//println(StartTimer);
//if ((StartTimer + DelayValue) < millis()) {
//Serial.println(“Vibe On”);
LEDOn(VibePin);
//} else {
//Serial.println(“Vibe Off”);
// LEDOff(VibePin);
//}
PreviousCommand = 0;
break;

case 1:

LEDOff(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOff(LED3);
LEDOn(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOn(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 1;
break;

case 2:

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 2;
break;

case 3:

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 3;

break;
case 4:

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 4;
break;
case 5:
LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 5;
break;
case 6:

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 6;
break;
case 7:

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOff(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 7;
break;
case 8:
LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 8;
break;
case 9:

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 9;
break;

case 65: //A

LEDOff(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 65;
break;
case 66: //B

LEDOn(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 66;
break;
case 67: //C

LEDOff(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 67;
break;
case 68: //D

LEDOn(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 68;
break;
case 69: //E

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 69;
break;
case 70: //F

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 70;
break;
case 71: //G

LEDOff(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 71;
break;
case 72: //H

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 72;
break;
case 73: //I

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOn(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOn(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 73;
break;
case 74: //J

LEDOff(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOff(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 74;
break;
case 75: //K

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 75;
break;
case 76: //L

LEDOn(LED0);
LEDOff(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 76;
break;
case 77: //M

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOn(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 77;
break;
case 78: //N

LEDOn(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 78;
break;
case 79: //O

LEDOff(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 79;
break;
case 80: //P

LEDOn(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 80;
break;
case 81: //Q

LEDOff(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOn(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 81;
break;
case 82: //R

LEDOn(LED0);
LEDOn(LED1);
LEDOff(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 82;
break;
case 83: //S

LEDOff(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOn(LED6);
LEDOn(LED7);
LEDOn(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 83;
break;
case 84: //T

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOn(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOn(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 84;
break;
case 85: //U

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 85;
break;
case 86: //V

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOn(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 86;
break;
case 87: //W

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOn(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOn(LED6);
LEDOff(LED7);
LEDOn(LED8);
LEDOn(LED9);
LEDOn(LED10);
LEDOn(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 87;
break;
case 88://X

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOff(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 88;
break;
case 89://Y

LEDOn(LED0);
LEDOff(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOn(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOn(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOn(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 89;
break;
case 90://Z

LEDOn(LED0);
LEDOn(LED1);
LEDOn(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOn(LED5);
LEDOff(LED6);
LEDOn(LED7);
LEDOff(LED8);
LEDOn(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOn(LED12);
LEDOn(LED13);
LEDOn(LED14);

LEDOff(VibePin);
PreviousCommand = 90;
break;
case 32://space

LEDOff(LED0);
LEDOff(LED1);
LEDOff(LED2);
LEDOff(LED3);
LEDOff(LED4);
LEDOff(LED5);
LEDOff(LED6);
LEDOff(LED7);
LEDOff(LED8);
LEDOff(LED9);
LEDOff(LED10);
LEDOff(LED11);
LEDOff(LED12);
LEDOff(LED13);
LEDOff(LED14);

LEDOff(VibePin);
PreviousCommand = 32;
delay(500);
break;
case 33://”!”

FlashPattern();
PreviousCommand = 32;
//delay(500);
break;

if (Number != 33) {
delay (1000);
}

}
}

1 comment to The TTC Shirt