Lex DreitserAlbert SchweitzerJavair Ratliff
Published © GPL3+

Drift Visualizer

An IoT solution to hack drifting. Gameification built around proximity sensors. Leaderboards by location. Drift into the Future!

IntermediateWork in progress3,264
Drift Visualizer

Things used in this project

Hardware components

Esquilo Air
Esquilo Air
×1
Grove Shield with LCD RGB Display
×4
VERRADO ELECTRIC DRIFT TRIKE
×1

Story

Read more

Code

E-light Esqilo Code

C/C++
This code fires the gamification and e light strings
el <- [ GPIO(4), GPIO(5), GPIO(6), GPIO(7) ];
for (local i = 0; i < 4; i++) {
    el[i].low();
    el[i].highdrive(true);
    el[i].output();
}

function setEL(num)
{
    if (num > 4)
        return;
    for (local i = 0 ; i < num; i++)
        el[i ].high();
   // for (local i = num + 1; i = 4; i++)
     //   el[i - 1].low();
}

LCD RGB Code Ver 0.9

C/C++
This is the code in progress on Saturday night.
LCD_ADDR <- (0x7c >> 1);

RGB_ADDR <- (0xc4 >> 1);
LCD_2LINE <- 0x08;

REG_RED   <- 0x04;
REG_GREEN <- 0x03;
REG_BLUE  <- 0x02;

i2c <- I2C(0);

function setReg(addr, value)
{
    i2c.address(RGB_ADDR);
    i2c.write8(addr, value);
}

function setRgb(red, green, blue)
{
    setReg(REG_RED, red);
    setReg(REG_GREEN, green);
    setReg(REG_BLUE, blue);
}

setReg(0, 0);
setReg(1, 0);
setReg(0x08, 0xAA);     // all led control by pwm

setRgb(0, 100, 200);

while(true) {
    delay(200);
    setRgb(100, 0, 0);
    local red = (rand().tofloat() / RAND_MAX) * 255.0;
    local green = (rand().tofloat() / RAND_MAX) * 255.0;
    local blue = (rand().tofloat() / RAND_MAX) * 255.0;
    setRgb(red, green, blue);
}

Credits

Lex Dreitser

Lex Dreitser

12 projects • 38 followers
Tech Lead - IA - LAMP Expert w/ SEM SEO UX UI Ecom content focus. API guru. IoT Modern Roboticist. Friend.
Albert Schweitzer

Albert Schweitzer

6 projects • 5 followers
Javair Ratliff

Javair Ratliff

4 projects • 2 followers

Comments

Add projectSign up / Login