# MacroPad 2FA TOTP Authentication Friend

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/103/509/medium800thumb/circuitpython_out.jpg?1626735965)

## What is TOTP?

Having 2 Factor Authentication ( **2FA** ) on all your accounts is a good way to keep your data more secure. With 2FA logins, not only is a username and password needed, but also a one-time-use code. There are a few different ways to get that code, such as by email, phone or SMS. But my favorite way is to do it is via a 'Google Authenticator' **T** ime-based **O** ne **T** ime **P** assword, also known as a **TOTP**.

Using an app on your phone like [Authy](https://authy.com/) or Authenticator, you set up a secret code given to you by the service, then every 30 seconds, a new code is generated for you. What's extra nice is that the Google Authenticator protocol is supported by just about _every_ service and phone/tablet.

Perfect for when you don't have your phone handy, or don't want to noodle with Authy all day. Plus it types it in for you!

## Why Use a MacroPad?

So a simple smartphone app could take care of all your TOTP needs. Why use a MacroPad? Maybe you don't have a smartphone, or don't have yours always handy near your PC. Also, by emulating a HID keyboard, the MacroPad can type in the code for you. So by having a MacroPad tethered to your PC via a USB cable, you'll have a TOTP device always at the ready.

There are also a few other guides that provide similar capabilities using different hardware platforms. Be sure to check them out as well:

- [PyPortal 2FA TOTP Authentication Friend](https://learn.adafruit.com/pyportal-2fa-totp-authentication-friend) - PyPortal based
- [CircuitPython 2FA TOTP Authentication Friend](https://learn.adafruit.com/circuitpython-totp-otp-2fa-authy-authenticator-friend) - Feather ESP8266 based

## Parts

The main item needed is an Adafruit MacroPad and associated parts. You can get all of these via a kit:

### Adafruit MacroPad RP2040 Starter Kit - 3x4 Keys + Encoder + OLED

[Adafruit MacroPad RP2040 Starter Kit - 3x4 Keys + Encoder + OLED](https://www.adafruit.com/product/5128)
Strap yourself in, we're launching in T-minus 10 seconds...Destination? A new Class M planet called MACROPAD! M here stands for Microcontroller because this 3x4 keyboard controller features the newest technology from the Raspberry Pi sector: say hello to the RP2040. It's a speedy...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5128)
[Related Guides to the Product](https://learn.adafruit.com/products/5128/guides)
![Video of a hand playing with a rainbow-glowing keypad.](https://cdn-shop.adafruit.com/product-videos/640x480/5128-08.jpg)

Or a la carte if you already have some of the items or what to customize things, like use different keebs.

### Adafruit MACROPAD RP2040 Bare Bones - 3x4 Keys + Encoder + OLED

[Adafruit MACROPAD RP2040 Bare Bones - 3x4 Keys + Encoder + OLED](https://www.adafruit.com/product/5100)
Strap yourself in, we're launching in T-minus 10 seconds...Destination? A new Class M planet called MACROPAD! M here, stands for Microcontroller because this 3x4 keyboard controller features the newest technology from the Raspberry Pi sector: say hello to the RP2040. It's a speedy...
In Stock
[Buy Now](https://www.adafruit.com/product/5100)
[Related Guides to the Product](https://learn.adafruit.com/products/5100/guides)
![Angled shot of MacroPad](https://cdn-shop.adafruit.com/640x480/5100-00.jpg)

### Adafruit MacroPad RP2040 Enclosure + Hardware Add-on Pack

[Adafruit MacroPad RP2040 Enclosure + Hardware Add-on Pack](https://www.adafruit.com/product/5103)
Dress up your Adafruit Macropad with PaintYourDragon's fabulous decorative silkscreen enclosure and hardware kit. You get the two custom PCBs that are cut to act as a protective bottom plate and and a mechanically-stabilizing keyboard plate.

Use the included M3 screws to attach the...

In Stock
[Buy Now](https://www.adafruit.com/product/5103)
[Related Guides to the Product](https://learn.adafruit.com/products/5103/guides)
![Top view of MacroPad add on pack](https://cdn-shop.adafruit.com/640x480/5103-06.jpg)

And, **if you go a la carte** , don't forget [keyswitches](https://www.adafruit.com/category/744) and [keycaps](https://www.adafruit.com/category/357).

A real-time clock (RTC) breakout is also needed to keep track of current time. Here are some options.

### Use STEMMA QT Breakout

Easiest is to use a STEMMA QT capable breakout:

### Adafruit PCF8523 Real Time Clock Breakout Board

[Adafruit PCF8523 Real Time Clock Breakout Board](https://www.adafruit.com/product/5189)
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for data-logging, clock-building, time stamping, timers, and alarms, etc. Equipped...

In Stock
[Buy Now](https://www.adafruit.com/product/5189)
[Related Guides to the Product](https://learn.adafruit.com/products/5189/guides)
![Angled shot of PCF8523 Real Time Clock Breakout Board.](https://cdn-shop.adafruit.com/640x480/5189-00.jpg)

### Adafruit DS3231 Precision RTC - STEMMA QT

[Adafruit DS3231 Precision RTC - STEMMA QT](https://www.adafruit.com/product/5188)
&nbsp;

The datasheet for the **DS3231** explains that this part is an "Extremely Accurate I²C-Integrated RTC/TCXO/Crystal". And, hey, it does exactly what it says on the tin! This **Real Time Clock (RTC)** is the most precise you can get in a...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5188)
[Related Guides to the Product](https://learn.adafruit.com/products/5188/guides)
![Angled shot of RTC breakout.](https://cdn-shop.adafruit.com/640x480/5188-05.jpg)

This will allow direct connection **without soldering** to the MacroPad using this STEMMA QT cable:

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.jpg)

### Use Older Style Breakout

These options also work fine. However, some soldering will be required on the headers pins.

### Adafruit PCF8523 Real Time Clock Assembled Breakout Board

[Adafruit PCF8523 Real Time Clock Assembled Breakout Board](https://www.adafruit.com/product/3295)
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc. Equipped...

In Stock
[Buy Now](https://www.adafruit.com/product/3295)
[Related Guides to the Product](https://learn.adafruit.com/products/3295/guides)
![Angled shot of RTC breakout board.](https://cdn-shop.adafruit.com/640x480/3295-11.jpg)

### Adafruit DS3231 Precision RTC Breakout

[Adafruit DS3231 Precision RTC Breakout](https://www.adafruit.com/product/3013)
The datasheet for the **DS3231** explains that this part is an "Extremely Accurate I²C-Integrated RTC/TCXO/Crystal". And, hey, it does exactly what it says on the tin! This **Real Time Clock (RTC)** is the most precise you can get in a small, low power...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3013)
[Related Guides to the Product](https://learn.adafruit.com/products/3013/guides)
![Angled Shot of the Adafruit DS3231 Precision RTC Breakout.](https://cdn-shop.adafruit.com/640x480/3013-06.jpg)

### Adafruit DS1307 Real Time Clock Assembled Breakout Board

[Adafruit DS1307 Real Time Clock Assembled Breakout Board](https://www.adafruit.com/product/3296)
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc. The **DS1307** is the most...

In Stock
[Buy Now](https://www.adafruit.com/product/3296)
[Related Guides to the Product](https://learn.adafruit.com/products/3296/guides)
![Angled shot of a Adafruit DS1307 Real Time Clock Assembled Breakout Board.](https://cdn-shop.adafruit.com/640x480/3296-03.jpg)

With male headers soldered on the RTC breakouts, this STEMMA QT cable can be used for connecting to the MacroPad:

### STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets

[STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets](https://www.adafruit.com/product/4397)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4397)
[Related Guides to the Product](https://learn.adafruit.com/products/4397/guides)
![Angled shot of JST SH 4-pin Cable with Premium Female Sockets.](https://cdn-shop.adafruit.com/640x480/4397-02.jpg)

### **Batteries Not Included**

These RTC breakouts all use the same CR1220 coin cell battery:

### CR1220 12mm Diameter - 3V Lithium Coin Cell Battery

[CR1220 12mm Diameter - 3V Lithium Coin Cell Battery](https://www.adafruit.com/product/380)
These are the highest quality & capacity batteries, the same as shipped with the iCufflinks,&nbsp;iNecklace, Datalogging and GPS Shields, GPS HAT, etc. One battery per order (you'll want one battery per cufflink or pendant.)  
  
Brand may vary but all battery brands are verified...

In Stock
[Buy Now](https://www.adafruit.com/product/380)
[Related Guides to the Product](https://learn.adafruit.com/products/380/guides)
![Angled shot of CR1220 12mm Diameter - 3V Lithium Coin Cell Battery - CR1220.](https://cdn-shop.adafruit.com/640x480/380-01.jpg)

## FAQ
##### **THIS IS NOT A QUESTION MORE OF A COMMENT. YOU ARE PROGRAMMING THE TOTP SECRET INTO THE FLASH OF THE MICROCONTROLLER AND ITS NOT ENCRYPTED OR PROTECTED AT ALL ANYONE COULD BREAK INTO YOUR APARTMENT, GO TO YOUR BEDROOM, LOOK ON YOUR DESK, FIND THIS AND THEN CONNECT IT UP TO THEIR HACKER LAPTOP TO GRAB YOUR SECRET KEY THEN IF THEY HAD YOUR USERNAME AND PASSWORD THEY WOULD BE ABLE TO LOG IN AS YOU AND THIS IS REALLY INSECURE ITS SO IRRESPONSIBLE TO CONSIDER PUBLISHING A PROJECT LIKE THIS BY THE WAY DID YOU SEE THAT SNOWDEN APP? MAYBE YOU CAN RUN THAT ON A PHONE SO YOU CAN WATCH YOUR DESK REMOTELY AND MAKE SURE NOBODY BROKE IN TO STEAL YOUR MACROPAD? OH WAIT YOU JUST SAID YOU DON'T HAVE A PHONE. OK I DONT KNOW WHAT MY QUESTION IS**

this project is probably not for you

# MacroPad 2FA TOTP Authentication Friend

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_macropad_rp2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/264/medium800/adafruit_products_MacroPad_boot_reset.jpg?1625068553)

Info: 

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# MacroPad 2FA TOTP Authentication Friend

## Project Code

Your project will use a specific set of CircuitPython libraries and the&nbsp; **code.py** &nbsp;file, along with a folder full of key configuration files. To get everything you need, click on the&nbsp; **Download Project Bundle** &nbsp;link below, and uncompress the .zip file.

Drag the contents of the uncompressed bundle directory onto your MACROPAD board's **CIRCUITPY** &nbsp;drive, replacing any existing files or directories with the same names, and adding any new ones that are necessary.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Macropad_2FA_TOTP/code.py

# MacroPad 2FA TOTP Authentication Friend

## RTC Setup

![](https://cdn-learn.adafruit.com/assets/assets/000/103/511/medium800/circuitpython_rtc_setup.jpg?1626736546)

As the name implies, **Time** -based One Time Passwords rely on **time**. For any internet connected device, this can be done fairly easy using a NTP service. However, the MacroPad does not have any wifi capabilities, so can not readily connect to the internet. To get around this, we will use an external time source, a Real Time Clock ( **RTC** ) device, directly connected to the MacroPad.

An RTC has a battery backup to maintain time tracking even when the rest of the system is powered down.

## Connecting RTC

In this guide we use a [PCF8523 RTC breakout](https://www.adafruit.com/product/3295). But you can use any other I2C RTC breakout, as long as it has a CircuitPython driver library. Follow the [assembly instructions in the PCF8523 guide](https://learn.adafruit.com/adafruit-pcf8523-real-time-clock/assembly) to solder on the header pins.

Once the header pins are soldered on, use [the STEMMA QT cable](https://www.adafruit.com/product/4397) and connect:

- **PCF8523 GND** to **STEMMA QT black** cable
- **PCF8523 VCC** to **STEMMA QT red** cable
- **PCF8523 SDA** to **STEMMA QT blue** cable
- **PCF8523 SCL** to **STEMMA QT yellow** cable

The SQW pin does not need to be connected.

## Setting the RTC

Use the **rtc\_setter.py** code below and edit the time values to be something many seconds into the future. Edit these lines:

```auto
# values to set
YEAR = 2021
MON = 1
DAY = 1
HOUR = 12
MIN = 23
SEC = 42
```

Copy the **rtc\_setter.py** code to your **CIRCUITPY** folder. Then, connect to the CircuitPython REPL and run the code as follows:

```auto
import rtc_setter
```

It will show the time you set and wait until you press ENTER to actually set the time.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/472/medium800/circuitpython_Screenshot_from_2021-07-16_14-22-49.png?1626470598)

Now watch some other time source that is showing the current time. When the time you set arrives, press ENTER.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/473/medium800/circuitpython_Screenshot_from_2021-07-16_14-24-55.png?1626470716)

The RTC will now be set to that time. The code will loop forever showing the RTC time as a way to check that is actually set and working. You can press \<CTRL\>\<C\> to break out of the code or just reset.

Danger: 

## RTC Setter Code

Here is the RTC setter code **rtc\_setter.py** :

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Macropad_2FA_TOTP/rtc_setter.py

# MacroPad 2FA TOTP Authentication Friend

## Code Usage

![](https://cdn-learn.adafruit.com/assets/assets/000/103/510/medium800/circuitpython_banner1.jpg?1626736146)

## Sanity Check

The **secrets.py** file included with the project bundle zip contains some predefined fake codes. These aren't actual secrets, so nothing is being given away here. The following site can be used to check that everything is working:

[TOTP Token Generator](https://totp.danhersam.com/)
The first key on the MacroPad is setup with the site's default secret key of `JBSWY3DPEHPK3PXP`. So if your RTC is properly setup, then the same resulting 6 digit code should appear on both your MacroPad and the website. If they don't agree, double check that your RTC is synced well with UTC time.

[World Clock](https://www.timeanddate.com/worldclock/)
Go back and re-run the RTC setter code if needed.

Also make sure you've adjusted this line of code:

```python
UTC_OFFSET = -4        # time zone offset
```

to match your local time zone's offset relative to UTC. Good info and global map over on wikipedia:

[UTC offsets](https://en.wikipedia.org/wiki/List_of_UTC_time_offsets)
Also take into account if daylight saving is active since the MacroPad can not determine that automatically. Do this by simply adjusting the `UTC_OFFSET` value by one hour as needed.

## Configuring Keys

To configure the keys, you edit the the **totp\_keys.py** file in your **CIRCUITPY** folder. The example **totp\_keys.py** in the project bundle zip you downloaded earlier can be used as guide. Inside, you'll see something like this:

```python
totp_keys = [
    ("Github", "JBSWY3DPEHPK3PXP", 0x8732A8),
    ("Discord", "JBSWY3DPEHPK3PXQ", 0x32A89E),
    ("Slack", "JBSWY5DZEHPK3PXR", 0xFC861E),
    ("Basecamp", "JBSWY6DZEHPK3PXS", 0x55C24C),
    ("Gmail", "JBSWY7DZEHPK3PXT", 0x3029FF),
    None,
    None, # must have 12 entires
    None, # set None for unused keys
    None,
    ("Hello Kitty", "JBSWY7DZEHPK3PXU", 0xED164F),
    None,
    None,
]
```

The `totp_keys` list variable is a list with 12 entries, one per key.&nbsp; **You must keep this list length to 12.** Each entry is a 3 tuple:

```python
(name, code, color)
```

with the following contents:

- **name** - A string name for the site the key is associated with.
- **code** - The secret code the site provided when you set up 2FA.
- **color** - The NeoPixel color to use when the key is active.

Here is an example:

```auto
("Github", "JBSWY3DPEHPK3PXP", 0x8732A8)
```

When editing this file, be careful not to accidentally delete any of the square brackets, parans, or commas.&nbsp; Otherwise you'll end up with a syntax error when the code tries to import the secrets.

## Selecting and Sending Code

Selecting codes is easy, just press the key you assigned the code to. The OLED will update to show the code for that site and the NeoPixel under the key will light up the color you set.

If you want the MacroPad to send the keystrokes for the code, as if you typed them on a keyboard, press the knob button down.

## Customizable Keys

If you want to have site specific icons for each of the keys, these relegendable key caps are handy:

### Relegendable Plastic Keycaps for MX Compatible Switches 10 pack

[Relegendable Plastic Keycaps for MX Compatible Switches 10 pack](https://www.adafruit.com/product/5039)
Get ready&nbsp;to customize your keeb with a 10&nbsp;pack of two-part plastic keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project.

Each keycap comes with a off-white base and a clear cover piece. You...

In Stock
[Buy Now](https://www.adafruit.com/product/5039)
[Related Guides to the Product](https://learn.adafruit.com/products/5039/guides)
![Angled shot of ten white plastic keycaps.](https://cdn-shop.adafruit.com/640x480/5039-08.jpg)

But these are not required. The site name is shown on the OLED. So that can be used to determine which site's pass code is currently being shown.

To make custom icons, print each out sized to a 17/32" x 17/32" square and cut them out. Removing the clear tops on the relegendable keys is best done with the keycaps mounted on a key switch. Then, just place the printed cutout on the keycap and put the plastic cover back on.

Here are some PDFs you can use to help. One is blank and the second includes some example icons that were used for this guide.

[keycaps_blank.pdf](https://cdn-learn.adafruit.com/assets/assets/000/103/590/original/keycaps_blank.pdf?1627312291)
[keycaps_example_icons.pdf](https://cdn-learn.adafruit.com/assets/assets/000/103/591/original/keycaps_example_icons.pdf?1627312373)

## Featured Products

### Adafruit MACROPAD RP2040 Bare Bones - 3x4 Keys + Encoder + OLED

[Adafruit MACROPAD RP2040 Bare Bones - 3x4 Keys + Encoder + OLED](https://www.adafruit.com/product/5100)
Strap yourself in, we're launching in T-minus 10 seconds...Destination? A new Class M planet called MACROPAD! M here, stands for Microcontroller because this 3x4 keyboard controller features the newest technology from the Raspberry Pi sector: say hello to the RP2040. It's a speedy...
In Stock
[Buy Now](https://www.adafruit.com/product/5100)
[Related Guides to the Product](https://learn.adafruit.com/products/5100/guides)
### Adafruit MacroPad RP2040 Starter Kit - 3x4 Keys + Encoder + OLED

[Adafruit MacroPad RP2040 Starter Kit - 3x4 Keys + Encoder + OLED](https://www.adafruit.com/product/5128)
Strap yourself in, we're launching in T-minus 10 seconds...Destination? A new Class M planet called MACROPAD! M here stands for Microcontroller because this 3x4 keyboard controller features the newest technology from the Raspberry Pi sector: say hello to the RP2040. It's a speedy...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5128)
[Related Guides to the Product](https://learn.adafruit.com/products/5128/guides)
### Adafruit PCF8523 Real Time Clock Assembled Breakout Board

[Adafruit PCF8523 Real Time Clock Assembled Breakout Board](https://www.adafruit.com/product/3295)
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc. Equipped...

In Stock
[Buy Now](https://www.adafruit.com/product/3295)
[Related Guides to the Product](https://learn.adafruit.com/products/3295/guides)
### Adafruit DS3231 Precision RTC Breakout

[Adafruit DS3231 Precision RTC Breakout](https://www.adafruit.com/product/3013)
The datasheet for the **DS3231** explains that this part is an "Extremely Accurate I²C-Integrated RTC/TCXO/Crystal". And, hey, it does exactly what it says on the tin! This **Real Time Clock (RTC)** is the most precise you can get in a small, low power...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3013)
[Related Guides to the Product](https://learn.adafruit.com/products/3013/guides)
### STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable

[STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable](https://www.adafruit.com/product/4209)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4209)
[Related Guides to the Product](https://learn.adafruit.com/products/4209/guides)

## Related Guides

- [Adafruit MacroPad RP2040](https://learn.adafruit.com/adafruit-macropad-rp2040.md)
- [Using QMK on RP2040 Microcontrollers](https://learn.adafruit.com/using-qmk-on-rp2040-microcontrollers.md)
- [Ableton Live MacroPad Launcher](https://learn.adafruit.com/ableton-live-macropad-launcher.md)
- [MP3 Playback on RP2040 with CircuitPython](https://learn.adafruit.com/mp3-playback-rp2040.md)
- [An Introduction to RP2040 PIO with CircuitPython](https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython.md)
- [Minecraft Turbopad](https://learn.adafruit.com/minecraft-turbopad.md)
- [AdaBox 019](https://learn.adafruit.com/adabox019.md)
- [3D Printed Stand for MacroPad RP2040](https://learn.adafruit.com/3d-printed-stand-for-macropad-rp2040.md)
- [DIY Decorative Resin Keycaps](https://learn.adafruit.com/diy-decorative-resin-keycaps.md)
- [Adding a Real Time Clock to Raspberry Pi](https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi.md)
- [MacroPad Braille Keycaps](https://learn.adafruit.com/macropad-braille-keycaps.md)
- [MacroPad Summer Olympics Hotkeys](https://learn.adafruit.com/macropad-olympic-hotkeys.md)
- [Scrambled Number Security Keypad](https://learn.adafruit.com/scrambled-number-security-keypad.md)
- [Adafruit PCF8523 Real Time Clock](https://learn.adafruit.com/adafruit-pcf8523-real-time-clock.md)
- [Adafruit EyeLights LED Glasses and Driver](https://learn.adafruit.com/adafruit-eyelights-led-glasses-and-driver.md)
- [Adafruit CAN Bus FeatherWing](https://learn.adafruit.com/adafruit-can-bus-featherwing.md)
