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
-
Micro:bit
- Reads accelerometer data (X, Y, Z axes).
- Sends data via serial to the Raspberry Pi Pico, over pins 0 and 1.
-
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).
-
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
-
Micro:bits
- Flash code to read and send accelerometer data.
-
Raspberry Pi Pico
- Connect to WiFi.
- Flash code to receive data from micro:bit and send it to the laptop.
-
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
- Move the micro:bit to generate accelerometer data.
- Data is sent to the Pico, which forwards it over WiFi.
- The laptop receives the data and moves the mouse cursor based on the accelerometer readings.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edf37962388e67025eea4442bd5faa35d51b3de1e97f544b7bc38d2cb85cf418
|
|
| MD5 |
4a68ce440953dfbe29aad3c299fc06dd
|
|
| BLAKE2b-256 |
055c2f7fb6832d6a153118337ef11f27d82c2655942d69bc31571c35fcc757a8
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4829cc288b54891b619bb69637c4282af730fc7616ed6891658c9443d179c811
|
|
| MD5 |
bb0a9700407e921c4ac195082f99ef0c
|
|
| BLAKE2b-256 |
606f4c808e1c19dd3be11ec7773c3c45d7b595654672cff612bcb6829681307a
|