An awesome project to control your media keys through micro:bit buttons and gesture control!
View Demo
·
Report Bug
This controller connects the BBC Micro:bit with a windows pc and acts like a media controller. It has the following functions
- Play: Ability to play/pause music, videos etc.
- Mute: Ability to mute/unmute system volume
- Next: Acts as the next button on a keyboard
- Previous: Acts as the previous button on a keyboard
- Volume Up: Increases system volume
- Volume Down: Decreases system volume
This project uses the following software and languages
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Here is the list of all the prerequisites you would need to install on your system in order to run this device
- Node.js v10.15.3
https://nodejs.org/en/download/
- npm
https://www.npmjs.com/get-npm
- Python
https://www.python.org/downloads/
- Additional build tools are required to be able to run media keys on windows. Run these commands from an
administrative shell to install software dependencies:
Note: You need to install windows build tools version 4.0 or higher
npm install --global --production windows-build-tools
npm install -g node-gyp
-
Add all dependencies using npm
npm install
-
Connect your micro:bit to the computer using a USB stick
-
Run port file to check what port your micro:bit is connected to
node port.js
-
Run node server to start communicating with your micro:bit
node server.js
Note: You still need to deploy the hex file to your micro:bit. These steps only install the server. Please go through the deployment below to start using your micro:bit.
Copy the Micro:bit Music Controller hex file to your micro:bit and Enjoy!
Check out the demo on youtube here - View Demo
Below is a list of all controls and gestures for each function
-
Next:
Tilt your micro:bit to the right to go to next track
If you ware playing any music on Spotify/Windows it will play the next track and show the below LEDs on successful change
-
Previous:
Tilt your micro:bit to the left to go to next track
If you ware playing any music on Spotify/Windows it will play the previous track and show the below LEDs on successful change
-
Volume Up:
Tilt your micro:bit upwards to increase volume
This gesture will increase system volume and show a plus sign on micro:bit
-
Volume Down:
Tilt your micro:bit downwards to decrease volume
This gesture will reduce system volume and show a minus sign on micro:bit
- Jay Kumar - Complete Development - jaykch.com
This project is licensed under the MIT License - see the LICENSE.md file for details
- Serialport - Library for serial communication to micro:bit
- Robotjs - Library to simulate key-presses