The best tools to make your project dreams come true

Login or Signup
USD


By Adafruit Industries

Labo RC Car Action Lights

Courtesy of Adafruit

The Nintendo Labo RC Toy-Con is simple, but a lot of fun to play with. Let's make it even better with motion-triggered lights courtesy of Circuit Playground Express.

Image1

This modification only uses a little bit of double-sided tape to keep the battery secure, so it's easily reversible if you decide to remove it or make changes.

What You'll Need

Image2

Software

The first thing we need to do is install the project code. This code will use the Circuit Playground Express's built-in accelerometer to sense vibration and then light up the built-in Neopixel LEDs.

Upload the Code

Image3

Connect the Circuit Playground Express to your computer with a micro USB cable.  You should see a drive named "CIRCUITPY" appear on your computer.

Image4

You'll need to have the Neopixel library installed on your Circuit Playground Express in order to run this project's CircuitPython code. Follow the steps on this page to install the CircuitPython library bundle.

Install the CircuitPython Library Bundle

Copy the following code, paste it into a plain text file or code editor such as Mu. Save the file as "code.py" to the CIRCUITPY drive.

Copy Code
import board
import neopixel
from adafruit_circuitplayground.express import cpx

pixels = neopixel.NeoPixel(board.NEOPIXEL, 10, brightness=0.1, auto_write=True)
pixels.fill(0)

while True:

x, y, z = cpx.acceleration # read acceleromter
r, g, b = 0, 0, 0

if abs(x) > 4.0:
r = 255
if abs(y) > 2.0:
g = 255
if z > -6.0 or z < -12.0:
b = 255

pixels.fill((r, g, b))

After the file saves, your Circuit Playground Express should reboot and start running the action light code.

Test It

To make sure everything is working, disconnect the Circuit Playground Express from your computer and connect the LiPo battery.

Image5

Try shaking the Circuit Playground around a bit.  If it flashes different colors - the code is working!

Installation

Mounting the Circuit playground and Battery is easy.  We'll use tape to mount the battery, and the Circuit Playground will be held in by the RC Car's cardboard tabs.

Mount the Circuit Playground Express

Image6a

image6b

Image6c

Turn the RC Car upside down and slide the edges of the Circuit Playground Express under two large cardboard tabs. Keep the USB jack pointed toward the car's 'antenna' as seen in the photo above.

Mount the Battery

image7a

image7b

Apply a small piece of double-sided tape to the battery and press it into place at the front edge of the car's underside.

Image8

Connect the battery to the Circuit Playground and turn the car right side up again. That's it - installation is complete :)

Use It!

Image9

Install the Joy-Cons on the RC Car and boot up your Switch. Start up the Labo Variety Pack cartridge, enter RC Car Play mode, and take your new tricked-out ride for a test drive …

Image10

When you're done using the car, don't forget to disconnect the battery from the Circuit Playground. This will help preserve battery life. Have fun & drive safe :)

RELATED GUIDES

Hammer Time Mini Golf Hazard with Crickit

DIY Circuit Playground Shields

Pro Trinket Keyboard

AdaBox 008

Key Parts and Components

Add all Digi-Key Parts to Cart
  • 1528-1839-ND
  • 1528-2280-ND
  • TL510-ND