I wanted a project to have two keys that mute/unmute microphone and turn on and off camera on Zoom with a LED to show if it's both are on or not. I spotted this project:
I thought it suited my needs and would help me learn about microcontrollers so naievely bought the the parts needed. However, I couldn't find a guide for this project anywhere. This was frustrating at first given my very limited knowledge of microcontrollers, CircuitPython (python in general), arduninos etc. I was lost and didn't know where to start. In retrospect however, this has been a great learning experience.
I'll use this project to document my findings so should anyone else have the same issues I faced you have some of the information needed all in one place.
- To have a two keys that are seperate from my main keyboard that: a. toggle mute b. toggle video
- To have the mac tell the leds on the keyboard whether zoom is using the camera/microphone and be red if not and green if so.
I'm a frontend software engineer with little, too no knowledge of python, know that you use any code or guidance at your own risk. Given my software experience I am very good at searching for information and debugging. Use this project as a resource not a step by step guide, this is meant to be a learning experience for you also, have fun and experiment for yourself you will likely find things that can be improved. If you do PLEASE TELL ME!
This project requires soldering experience, at least, I can't find the parts used that come pre-soldered.
- Breadboard
- Jumper cables
- USB-C Cable
- NeoKey Socket Breakout x 2 - https://www.adafruit.com/product/4978
- Cherry Mx Keyboard Switch of your choice x 2 - I used Cherry Mx Blues but I wish I had used Cherry Mx Black. You can use anything with a Kailh socket
- QtPy - There's lots of varients I used this one - https://www.adafruit.com/product/4600
Solder the header pins on to your QtPy and two NeoKey Sockets push your switches into the sockets
Starting on the top:
** QT PY **
- GND Pin -> GND Rail
- 3v Pin -> POWER Rail
- A1 Pin -> NeoKey 2 - A Pin
- A2 Pin -> NeoKey 1 - A Pin
- A3 Pin -> NeoKey 1 - I Pin
** NeoKey 1 ** Make sure the orientation of the NeoKey is the correct: + - 0 A C on top, NeoPixel on the bottom
- Positive Pin -> POWER Rail
- Minus Pin -> GND Rail
- O Pin -> NeoKey 2 - I Pin
- C Pin -> GND Rail
** NeoKey 2 **
- Positive Pin -> POWER Rail
- Minus Pin -> GND Rail
- C Pin -> GND Rail
Now you have set all that up plug it into your computer. I followed this guide Welcome to CircuitPython to setup CircuitPython. As I'm a webdev by day I'm alergic to development outside of vscode so instead of using the Mu IDE that the guide suggests I used the Circuit Python Extension in VSCode
I had an issue with dragging and dropping libraries in to the due to the limited storage space on the QT PY so I had to use cp -X
or cp -RX
in terminal on mac as the GUI Copy and Paste / move copies something called Extended Attributes (I don't know what they are either).
- Add the libraries listed in code.py to the lib directory on the qtpy
- Copy code.py to the root level of the qtpy make sure there is no other file like code copy.py or main.py ect.
- Check the lights are correct (closest to the QTPY red furthest green)
- Open zoom
- Click zoom.us next to the apple logo then preferences or COMMAND + , on the keyboard
- Click "Keyboard Shortcuts"
- Find "Mute/Unmute My Audio"
- Click the shortcut
- Press the NeoKey you want to be assigned to microphone
- Click the checkbox to Enable Global Shortcut
- Find Start/Stop Video
- Repeat steps 8,9,10 using the other neokey
(Note: I used COMMAND + CONTROL + SHIFT + A and COMMAND + CONTROL + SHIFT + S you can change these shortcuts in code.py look for "# Change these to what ever suits your use case" )
- Figure out microphone recognition doesn't look like these a record in the syslogs unfortuately
- Create a driver script to install the node portion of this project.