Skip to content

About

One-day hack turning a Bluetooth (HC-06 serial) RC car into a gamepad-controlled toy via a small Node/Express server.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

hack-bluetooth-car

A quick one-day hack to remote-control my son's Bluetooth RC car from a gamepad in the browser, instead of its original remote.

Archived — a one-day hack from January 2018, not maintained or generalized beyond this specific car.

How it works

  • index.js: a small Express server that opens a serial connection to the car's HC-06 Bluetooth-serial module and writes wheel-power bytes on a 50ms loop. Exposes GET /move/:left,:right to set left/right wheel power.
  • client/: a static page that reads the browser Gamepad API, converts joystick input into differential-drive wheel values, shows a live SVG direction/power indicator, and posts moves to the server.
  • bt-*-poc.js, serial-poc.js, bt-car-notes.md: throwaway proof-of-concept scripts and notes from exploring different Bluetooth/serial Node libraries before settling on serialport.

Tech

Node.js + Express + serialport on the server; plain JS/HTML/SVG + jQuery (webpack-bundled) on the client, using gamepad-api-mappings for Gamepad API support.

Run

npm install
node index.js

Before it'll work on your car

Two values in this repo are specific to the physical car this was built for, and need to be changed for any other one:

  • The serial device path is hardcoded in index.js as /dev/tty.HC-06-DevB (a macOS path — adjust for your platform/device).
  • bt-car-notes.md records this particular HC-06 module's own Bluetooth address (71-a9-01-12-c4-a5) from pairing — it's the toy's module address, not a secret, but it won't match a different car.

License

MIT (per package.json; no separate LICENSE file is included).

About

One-day hack turning a Bluetooth (HC-06 serial) RC car into a gamepad-controlled toy via a small Node/Express server.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages