Skip to main content

A project to use the microbit's accelerometer to control your mouse cursor, using a pico as a relay since micro:bit don't work very well with mac and etc.

Project description

diyController

This project enables mouse control using a micro:bit and a Raspberry Pi Pico, transmitting accelerometer data over WiFi to a laptop, which interprets the data as mouse movements.

How It Works

  1. Micro:bit

    • Reads accelerometer data (X, Y, Z axes).
    • Sends data via serial to the Raspberry Pi Pico, over pins 0 and 1.
  2. Raspberry Pi Pico

    • Receives accelerometer data from the micro:bit over GP0 and GP1.
    • Connects to WiFi and transmits the data to the laptop using a network protocol (e.g., UDP/TCP/WebSocket).
  3. Laptop

    • Runs a script or application that listens for incoming data from the Pico.
    • Interprets the accelerometer data to move the mouse cursor accordingly.

Setup

  1. Micro:bits

    • Flash code to read and send accelerometer data.
  2. Raspberry Pi Pico

    • Connect to WiFi.
    • Flash code to receive data from micro:bit and send it to the laptop.
  3. Laptop

    • Run a listener script (e.g., Python) to receive data and control the mouse.

Requirements

  • BBC micro:bit
  • Raspberry Pi Pico with WiFi (e.g., Pico W)
  • Laptop (Windows, macOS, or Linux)
  • Micro USB cables
  • Python (for laptop listener script)
  • Required libraries: pyserial, pynput, socket

Example Workflow

  1. Move the micro:bit to generate accelerometer data.
  2. Data is sent to the Pico, which forwards it over WiFi.
  3. The laptop receives the data and moves the mouse cursor based on the accelerometer readings.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diycontroller-0.1.0.tar.gz (758.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diycontroller-0.1.0-py3-none-any.whl (761.2 kB view details)

Uploaded Python 3

File details

Details for the file diycontroller-0.1.0.tar.gz.

File metadata

  • Download URL: diycontroller-0.1.0.tar.gz
  • Upload date:
  • Size: 758.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for diycontroller-0.1.0.tar.gz
Algorithm Hash digest
SHA256 edf37962388e67025eea4442bd5faa35d51b3de1e97f544b7bc38d2cb85cf418
MD5 4a68ce440953dfbe29aad3c299fc06dd
BLAKE2b-256 055c2f7fb6832d6a153118337ef11f27d82c2655942d69bc31571c35fcc757a8

See more details on using hashes here.

File details

Details for the file diycontroller-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: diycontroller-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 761.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0

File hashes

Hashes for diycontroller-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4829cc288b54891b619bb69637c4282af730fc7616ed6891658c9443d179c811
MD5 bb0a9700407e921c4ac195082f99ef0c
BLAKE2b-256 606f4c808e1c19dd3be11ec7773c3c45d7b595654672cff612bcb6829681307a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page