Introduction: LED Skateboard

VIDEO: https://www.youtube.com/watch?v=ssGmpD3x5wc

This is a skateboard that combine with LED. I use LED stripe to stick around the skateboard so the skateboard looks more colorful, beautiful, and safe because the LED stripe on the skateboard will let people realize that so they will not accidentally bump the skateboard. This skateboard also has an ultrasonic sensor. When it sense something less than 1 meter the color of LED stripe will became red and blue.

Step 1: Step1:Material

The materials we need are skateboard, Arduino, Ultrasonic Sensor, Liquid crystal display(LCD), computer, LED stripe.

Step 2: Step2:program

Arduino is a platform that convert program into small devices.

The Arduino I used is "UNO"

This is the Arduino program that I wrote to control my LED stripe, ultrasonic sensor, and LCD:

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

#include <FastLED.h>

#define LED_PIN 7

#define NUM_LEDS 94

CRGB leds[NUM_LEDS];

int dis(int trigPin, int echoPin)

{

long duration; pinMode(trigPin, OUTPUT);

pinMode(echoPin, INPUT);

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

digitalWrite(trigPin, HIGH);

delayMicroseconds(20);

digitalWrite(trigPin, LOW);

duration = pulseIn(echoPin, HIGH);

duration = duration / 59;

if ((duration < 2) || (duration > 300)) return false;

return duration;

}

LiquidCrystal_I2C lcd_I2C_27(0x27,16,2);

void up(){

if(dis( 11 , 12 ) >=100 || dis( 11 , 12 ) <1){

lcd_I2C_27.setCursor(0.0 , 1.0) ;

lcd_I2C_27.print( "SAFE" );

for (int i = 0; i <= 46; i++) {

leds[i] = CRGB ( i+47,i+4, 0); FastLED.show(); delay(5);

}

for (int i = 47; i <= 93; i++) {

int p = 30;

if(i+1);

p + 2;

leds[i] = CRGB ( 0,i+150,p);

FastLED.show();

delay(5);

}

for (int i = 93; i >= 47; i--) { int m = 93 - i; leds[i] = CRGB ( m+20,0,m+150 );

FastLED.show();

delay(5);

}

for (int i = 46; i >= 0; i--) { int h = 46 - i; leds[i] = CRGB ( h+20,h+20,h+20 );

FastLED.show();

delay(5);

}

}

else {

lcd_I2C_27.setCursor(0.0 , 1.0) ; lcd_I2C_27.print( "NOT SAFE" );

for (int i = 0; i <= 46; i++) { leds[i] = CRGB ( 255,0, 0); FastLED.show(); delay(5);

}

for (int i = 47; i <= 93; i++) { leds[i] = CRGB ( 0,0,255);

FastLED.show();

delay(5);

}

for (int i = 93; i >= 47; i--) {

leds[i] = CRGB ( 255,0,0 );

FastLED.show();

delay(5);

}

for (int i = 46; i >= 0; i--) {

leds[i] = CRGB ( 0,0,255 );

FastLED.show();

delay(5);

}

}

}

void setup() {

Serial.begin(9600);

digitalWrite( 11 , LOW );

FastLED.addLeds(leds, NUM_LEDS);

lcd_I2C_27.init ();

lcd_I2C_27.backlight();

}

void loop() {

Serial.print(dis( 11 , 12 ));

Serial.print(" ");

Serial.println();

lcd_I2C_27.clear();

lcd_I2C_27.setCursor(0.0 , 0.0) ;

lcd_I2C_27.print( "distance:" );

lcd_I2C_27.setCursor(9.0 , 0.0) ;

lcd_I2C_27.print(dis( 11 , 12 ) );

delay(2000);

up();

}

Step 3: Step3:Assemble the Devices

This is the scheme of my circuit.

First step, connect GND and 5v to the breadboard.

Second, connect the LED stripe. The pin I used is 7

Third, connect the ultrasonic sensor to the motherboard and breadboard. Connect Trig to Pin 11, Echo to Pin 12.

Forth, Connect the LCD. (The second picture) Connect SDA to A4, SCL to A5.

Finally, insert the power.

Step 4: Step4:combination

After assembling the circuit, combine Arduino with the skateboard.

First, use LED stripe to stick around the skateboard.

Second, use hot glue gun to stable the Arduino, Breadboard, ultrasonic, and LCD on the skate board.

Step 5: Step5:DONE!!!

This is the appearance of the skateboard after making it. When the Ultrasonic sensor sense something the color will become red and blue.