Jonathon McCormackDeclan Ford
Published © CC BY-NC-ND

RC Cars for Light Painting - Sensory Intervention Project

Custom modded RC cars designed to create light paintings that map user input.

IntermediateShowcase (no instructions)680
RC Cars for Light Painting - Sensory Intervention Project

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
Ultrasonic Sensor - HC-SR04 (Generic)
Ultrasonic Sensor - HC-SR04 (Generic)
×1
Rechargeable Battery, Lithium Ion
Rechargeable Battery, Lithium Ion
×1
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
Adafruit NeoPixel Digital RGB LED Strip 144 LED, 1m White
×1

Software apps and online services

MakeCode
Microsoft MakeCode
Fusion 360
Autodesk Fusion 360

Story

Read more

Custom parts and enclosures

Frame

Main part of the CPX board mount

Front Support

Second part of the CPX board mount, made separate for ease of printing

Sensor Mount

Mounting bracket for the ultrasonic sensor

Sensor Mount Base

Base of the sensor mount designed to fit around part of the board frame.

Light Rim Bar

The bar that attaches the currently unused LED rims

Light Rim 1

One of the two unused rims

Light Rim 2

Second unused light rim

Schematics

Schematic

Code

Car Code

JavaScript
The code what makes the car lights go :v
let distance = 0
let value = 0
let newreading = 0
let strip = light.createStrip(pins.A1, 10)
strip.setBrightness(100)
input.setAccelerometerRange(AcceleratorRange.TwoG)
let reading = input.acceleration(Dimension.Y)
let sensitivity = 180
strip.setAll(0xffffff)
pause(1000)
forever(function () {
    newreading = input.acceleration(Dimension.Y)
    value = Math.abs(reading - newreading)
    console.logValue("value", value)
    if (value > sensitivity) {
        strip.setBrightness(255)
    } else {
        strip.setBrightness(20)
    }
    reading = newreading
})
loops.forever(function () {
    pins.A5.digitalWrite(false)
    control.waitMicros(2)
    pins.A5.digitalWrite(true)
    control.waitMicros(10)
    pins.A5.digitalWrite(false)
    distance = pins.A6.pulseIn(PulseValue.High) / 58
    if (distance >= 0 && distance <= 50) {
        strip.setAll(0xff8000)
        pause(3000)
    } else {
        strip.setAll(0xff0000)
    }
    console.logValue("distancecm", distance)
})

Credits

Jonathon McCormack

Jonathon McCormack

4 projects • 2 followers
Student and cosplayer/propmaker
Declan Ford

Declan Ford

4 projects • 0 followers

Comments