Our complete COVID-19 dataset is a collection of the COVID-19 data maintained by Our World in Data. It is updated daily and includes data on confirmed cases, deaths, hospitalizations, and testing, as well as other variables of potential interest.
I wanted to create a simple project using Adafruit’s new QT Py microcontroller and CircuitPython. I decided to make a simple mute button for video conference tools since I spend a lot of my work hours in meetings using either Microsoft Teams or Zoom. There have been many of these made since the start of the pandemic, including the PyRuler version featured in an Adafruit learn guide, but I wanted to make a smaller single button version that could work with multiple applications.
I followed Noé Ruiz (@ecken) Layer by Layer tutorial below to make a circular SnapFit case to hold my project (STL/Fusion360 Files). There are several things that could be improved in this design, but it is a start. The Fusion360 file has User Parameters if you want to change the diameter or the height of the enclosure. I printed my enclosure using semi transparent PETG to enable the user to easily see the color of the onboard neopixle. This is helpful for knowing what application/shortcut is active.
Wiring
The fritzing schematic is below. Please note that the button I used didn’t have a NC connector, but I couldn’t find a similar part in the fritzing library.
Code
Below is the code for this project. Modify the controller_buttons variable to add or remove applications and shortcuts. The current code is made to work using Microsoft Teams and Zoom on a Mac. The keycode for each application/shortcut would need to be modified if you are using Windows or Linux. The color updates the neopixle on the QT Py to allow the user to know which application/shortcut is active. I used purple for Teams and blue for zoom.
The strip_xattr.sh script is very helpful if you run into problems copying the required library files over to the QT Py on a Mac. For more information about this issue see the Adafruit Forum post from user aaaidan.
Use
Plug it into your computer.
Press the button to activate the active application’s keyboard shortcut
In order to change the keyboard shortcut that is active, hold down the button until the onboard neopixel changes colors
Please note that the led on the arcade button is currently set to toggle every time it is pressed. It is up to the user to manually sync it to there current application if they want to use it as an indicator if they are currently muted or not. Comment out the every line that has button_led if you want to use a button that doesn’t have an LED on it. Also, the Teams or Zoom windows has to be in focus for the button to work.
I noticed that my QT Py was constantly resetting/not working while I was working on this project. It turns out that Cura was trying to “talk” to the QT Py and this was preventing it from working. Everything worked as expected once I closed Cura and reset the QT Py. I found this Github issue related to other CircuitPython boards that were having this same issue.
We collect, cross-check, and publish COVID-19 data from 56 US states and territories in three main areas: testing, patient outcomes, and, via The COVID Racial Data Tracker, racial and ethnic demographic information. We compile these numbers to provide the most complete picture we can assemble of the US COVID-19 testing effort and the outbreak’s effects on the people and communities it strikes.
cd ~ wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/adafruit-pitft.sh chmod +x adafruit-pitft.sh sudo ./adafruit-pitft.sh
For the 3.5″ PiTFT select #4
If you want the HDMI port on top like I do select #3
Would you like the console to appear on the PiTFT display?No
Would you like the HDMI display to mirror to the PiTFT display?Yes
Step 7: Uninstall Lightdm window manager
sudo dpkg -r --force-depends lightdm
Step 8: Install OctoPi-TFT
cd ~ wget https://github.com/darksid3r/OctoPrint-TFT/releases/download/1.1/octoprint-tft_stretch_1.1.git91fa718-1_armhf.deb sudo dpkg -i octoprint-tft_stretch_1.1.git91fa718-1_armhf.deb
Step 9: Edit OctoPi-TFT Configuration File
Edit you configuration file.
sudo vi /etc/octoprint-tft-environment
This is what mine looks like. You will need to change the OCTOPRINT_APIKEY to match yours. It can be found on the settings page in OctoPrint. I also removed the comments from here so it is easier to read.
You can disregard this step if everything is working as expected. My display resolution wasn’t correct so I had to change the last line of the /boot/config.txt file from hdmi_cvt=720 480 60 1 0 0 0 to hdmi_cvt=480 320 60 1 0 0 0.
sudo vi /boot/config.txt sudo reboot
Resources
I used these resources to put together this tutorial.
I have been doing audio editing for side project at work. These are long form audio recordings of an hour or more. I am using Adobe Audition to do my editing. After doing several of these, I noticed that I use two main functions frequently.
‘Silence’
‘Ripple Cut’ -> ‘ Time Selection in All Tracks’
The ripple cut function either used a significant number of mouse clicks or keyboard shortcuts that required both hands. There are probably a few different potential solutions to this problem. I could have changed the keyboard shortcuts to something else, but I wanted this to be easy to use and I wanted to be able to use it on any computer.
I modified the the Trinket IO Demo code. I removed some stuff that I didn’t need and had to make sure that holding down a key was treated the exact same as a single key press.
Results
The first button is used for play/pause, the second button is used to do the ripple cut and the third button is used to do the silencing. This tool has made it so much easier to edit audio content.
Update – 18 April 2020
If you liked this, check out this much more detailed project by Glen Akins (@bikerglen)
I built a single ESC key keyboard for all those people with touchbar Macs. https://t.co/Shy225mIRY
My interest was peaked when I saw the Raspberry Pi upgrade option under the possible upgrades/mods you could do to the Ender 3.
Let’s face it, we can’t be around to supervise our 3D printer 100 percent of the time. That’s why OctoPrint has become the standard for makers who want to monitor and control their 3D printer remotely. To run this terrific web interface, you need to purchase a Raspberry Pi board.
OctoPrint will allow you to control and observe your Creality Ender 3 from within a web browser. It’s 100 percent open source, which has led to a plethora of unique plugins created by the vast community. On the browser, you can watch prints through an embedded webcam feed, control print temperatures, obtain feedback on current print status, and even start and pause your printer no matter where you are.
I had an extra Raspberry Pi laying around and decided to give it a shot. The software that runs on the Pi is called OctoPrint. Installation and configuration is very straight forward and there are lots of help documents and tutorial videos. I am not going to get into any of the setup in this post, but below is the video that I found most helpful.
I am currently using a simple USB webcam for the OctoPi. I want to upgrade it to use a mounted Raspberry Pi camera so that it follows the printer head. The video below is a time lapse that was captured using OctoPrint of the mount and case for the Pi camera being 3D printed.
Video 3D print of camera holder for Pi Camera and ender
PyPortal is a microcontroller that can be programmed using CircuitPython. It has a touchscreen and can be used as a emulate a keyboard and mouse. For this project, we will create a touchscreen with icons that will allow us to launch applications when pressed.
Design: discussions how the touchscreen image and layout are created.
Shortcuts: Create Keyboard Shortcuts to Launch Applications in macOS ( Windows)
Code: CircuitPython code to be added to you PyPortal
The PyPortal initializes rendering a background image that is .BMP (bitmap image). So I created a template background image that I could insert icons into using Adobe Illustrator. Using this file, I copied and pasted my icons on to the location I wanted and then deleted the while squares underneath.
In order to detect button presses we need to know the boundaries for each icon. The image below shows the pixel length to each border.
Annotated background icon image.
Columns are organized from left to right, from A to D. Rows are organized from top to bottom, from 1 to 3. Please see the below table.
A
B
C
D
1
A1
B1
C1
D1
2
A2
B2
C2
D2
3
A3
B3
C3
D3
We need to know this information in order to determine if an icon is pressed. A touch event returns an (x,y) point with (0,0) being the top left corner. All icons in column B can only be pressed if the x of the touch event is between 97.5 and 147.5. Likewise, all icons in row 1 can only be pressed if the y of the touch event is between 100 and 150. Therefore, if the touch event returns (100,130), then the icon located at B2 has been pressed.
PyPortal running with custom icon background BMP image file
Shortcuts
The easiest way to launch applications using CircuitPython is by sending keyboard commands to your computer. In order to accomplish this on a macOS we need to create these keyboard shortcuts. This is fairly trivial on windows.
Launch Automator on your mac
Create a new “Quick Action”
File -> New -> “Quick Action” -> Choose
Under actions search for “Launch Application”
Drag “Launch Application” into the window
From the drop down list select the application that you want to open
Switch the “Workflow Receives” drop down to “no input”
Save your quick action
Either CONTROL+S or File -> Save
Close Automator
Create the keyboard shortcut to activate the “Quick Action” you created
Go to Settings -> Keyboard
Click on the Shortcuts tab
Select Services
Scroll to the General section near the bottom.
Highlight the “Quick Action” you created and click the Add Shortcut button.
Press the keyboard keys that you want to set the shortcut to.
I used “ALT+CONTROL+SHIFT+COMMAND+[FIRST LETTER OF APP]” for each of my shortcuts. I did this because I knew there would be no other shortcuts using this combination.
Code
The code has comments throughout and they should explain everything. If you have questions please feel free to email me or DM me on twitter. You will need to copy the below code as code.py in the root of your PyPortal as well as you BMP icon file. Please update the below code with your keyboard shortcuts and the name of your BMP icon file.
In an old episode on Hak5, Wess Tobler (@Dankiswess) did segment on making a MAME bar top arcade cabinet. This segment inspired me to make my own MAME (Multiple Arcade Machine Emulator) arcade cabinet, so I began doing research on different MAME cabinet designs. Bartop Arcade had many different designs and templates for bar top arcades. Below is the design and template that I based my MAME cabinet off of.
Build Phase
Items need for the build phase:
1 – 4’x8’x5/8″ MDF sheet
Box of screws
LCD Monitor (I used a 19″ LCD that I had lying around)
A computer (I choose to use my existing Windows 7 tower)
Table saw
Drill with a 1 1/2″ drill bit.
For the build phase I used the template that I found from Bartop Arcade and cut out each piece. I decided against having a slide out drawer, so I had to make some slight modifications. Below is a picture of the cabinet about 90% into the build phase.
After cutting and assembling the exterior of the cabinet, I had to wire all the buttons. Once that was done it was onto the software configuration.
Software Configuration
A lot of research went into deciding exactly how the software side of this project would be configured. I was initially set on using MALA as my front-end, but then I found Hyperspin.
Not only was Hyperspin a superior looking front-end, it would allow me to run many different emulators including a NES and SNES emulator. Hyperspin does most of its configuration through GUIs and XML files. Below is a image of the cabinet 90% complete running PAC-MAN.
Hyperspin also allowed for configuring other applications to open from within it. I configured it to run Aussie Juke as one of the emulators. Also, after reading a comment by Moonlit on episode five of TheNewTech.tv, I decided to modify the registry entry for explorer.exe to boot to Hyperspin. HKEY_Current_User\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell
Final Thoughts
There are several things I have to do to complete this project. First, I need to finish the marquee. The marquee will end up being a Cylon eye covered by a tinted plexiglass. Second, I need to mount the PC hardware inside the cabinet.