Overview
The sheer number of Olympic events is staggering (46!). How do you keep track of them all? The MacroPad is the perfect organizer for checking in on each sport and scrolling through the different Olympics channels.
In this project you'll be able to (from a browser):
- View live and past Olympic events from 6 different channels/sources
- Check the schedules and results of all 46 Olympic events (individually and at a glance)
- View the medal count by country in real time
- Switch between tabs of all the channels, results, schedules etc.
- Navigate up and down pages
- Close tabs
All with a couple of clickity clackity keyboard clicks on an Adafruit MacroPad!
What's a MacroPad?
It's a speedy little microcontroller with lots of GPIO pins and a 64 times more RAM than the Apollo Guidance Computer. The MacroPad can be powered by either CircuitPython or Arduino - complete with 12 buttons, an OLED display, a speaker, and a rotary encoder. Read about it here if you'd like more details.
For the scope of this guide, we're going to focus on the application of the MacroPad as a hotkeys shortcut to make your Olympic viewing experience a 10 out of 10. This project is based on a tutorial called MACROPAD Hotkeys which shows you how to turn your MacroPad into a keyboard shortcut device for your computer. Please read through that guide before continuing here.
Parts
You can buy a kit with all the parts with Kailh Red keys and clear keycaps or build your own custom configuration:
- or -
Page last edited March 08, 2024
Text editor powered by tinymce.
Project Code
As stated earlier, this project is based off the MACROPAD Hotkeys guide. Once you have read through that guide you are ready to add the files from this guide.
# SPDX-FileCopyrightText: 2021 Isaac Wellish for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# MACROPAD Olympic Hotkeys main page
# pylint: disable=line-too-long
from adafruit_hid.keycode import Keycode # REQUIRED if using Keycode.* values
app = { # REQUIRED dict, must be named 'app'
'name' : 'Olympics Home', # Application name
'macros' : [ # List of button macros...
# COLOR LABEL KEY SEQUENCE
# 1st row ----------
(0x004000, '< Tab', [Keycode.CONTROL, Keycode.SHIFT, Keycode.TAB]),
(0x004000, 'Tab >', [Keycode.CONTROL, Keycode.TAB]),
(0x400000, 'Up', [Keycode.SHIFT, ' ']), # Scroll up
# 2nd row ----------
# Full schedule in new tab
(0x3F3F3F, 'Sched', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/olympic-schedule.htm\n']),
# Medal standings in new tab
(0x404000 , 'Medals', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://olympics.com/tokyo-2020/olympic-games/en/results/all-sports/medal-standings.htm\n']),
(0x400000, 'Down', ' '), # Scroll down
# 3rd row ----------
# Peacock streaming service Olympics home in new tab
(0x000040, 'PC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://www.peacocktv.com/watch/2020-tokyo-olympics\n']),
# NBC channel in new tab
(0x000040, 'NBC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://www.usanetwork.com/live?brand=cnbc&callsign=nbc\n']),
# Olympics youtube channel in new tab
(0x000040 , 'YT', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://www.youtube.com/channel/UCTl3QQTvqHFjurroKxexy2Q\n']),
# 4th row ----------
# CNBC in new tab
(0x000040, 'CNBC', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://www.usanetwork.com/live?brand=nbc&callsign=cnbc\n']),
# USA in new tab
(0x000040, 'USA', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://www.usanetwork.com/live?brand=usa&callsign=usa_east\n']),
# NBCSN in new tab
(0x000040, 'NBCSN', [Keycode.COMMAND, 't', -Keycode.COMMAND,
'https://www.usanetwork.com/live?brand=nbc-sports&callsign=nbcsn\n']),
# Encoder button ---
(0x000000, '', [Keycode.COMMAND, 'w']) # Close window/tab
]
}
Download the entire project code from above and save the specified files in your macros folder on your CIRCUITPY drive.
Make sure to delete any other unwanted files in this folder. The macros folder on your CIRCUITPY drive should look like this.
Mac or Windows?
There are two folders of macros code in this project. One for Mac users and one for Windows users.
Page last edited March 08, 2024
Text editor powered by tinymce.
Using the Olympic Hotkeys
Once you have the code running, it's time to take it on the field and put it into action!
Browsers
You are welcome to use any browser you would like with the project. Make sure you have one open before pressing keys.
Commands
- Tap on any key that's associated with a website (Sched, Medals, NBC, etc.), and that site will open up in a new tab on your browser
- Close any tab by pressing down on the rotary encoder
- Navigate between tabs by tapping the
Tabkeys - Navigate up and down web pages by tapping the
upanddownkeys. - Scroll through the different macros pages to view all different sports and go back home by turning the rotary encoder
There are 6 websites/channels with various live and past Olympic events in this project:
- NBC (Olympics "primetime" channel - Live only)
- CNBC (Live only)
- NBCSN (NBC sports - Live only)
- USA (Live only)
- Peacock streaming service (Live and past events)
- The Olympics official YouTube channel (Past events)
You will have to sign into each service before being able to view that channel's content. For all the live only channels (NBC, CNBC, NBCSN, and USA) you will only have to sign in once to the USA website as all these channels can be accessed through USA.
Page last edited March 08, 2024
Text editor powered by tinymce.