# Remote Shutter Button for MEMENTO

## Overview

https://youtu.be/XmMB2Dwa66M

## Minimize camera shake&nbsp;

You can build a remote shutter button for the Adafruit MEMENTO camera for taking still photos without having to manually press the onboard shutter switch!

This simple project uses a momentary push button to create an external remote for triggering the shutter button on the MEMENTO camera.

![camera_hero-hold.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/128/medium640/camera_hero-hold.jpg?1705939275)

## Focus and capture

Our 3D printed snap fit enclosure houses the button PCB and doubles as a handle so you can take photos without any camera shake.

This button PCB features an on-board JST PH connector making it easy to connect to the MEMENTO camera board.

![camera_hero-shutter-close.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/131/medium640/camera_hero-shutter-close.jpg?1705939446)

## Stomp button

The MEMENTO camera code in CircuitPython allows for easy customization allowing you to trigger the shutter in any number of ways.

We can use copper tape on cardboard to create a stomp button!

![camera_cardboard-stop-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/127/143/medium640thumb/camera_cardboard-stop-loop.jpg?1705943061)

## Prerequisite Guides

Take a moment to review the following guides to learn how to setup the MEMENTO.

![camera_cp-code.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/133/medium640/camera_cp-code.jpg?1705939787)

[Primary Guide: Adafruit MEMENTO Camera Board](https://learn.adafruit.com/adafruit-memento-camera-board)
![](https://cdn-learn.adafruit.com/assets/assets/000/127/134/medium800/camera_parts.jpg?1705939868)

![](https://cdn-learn.adafruit.com/assets/assets/000/127/149/medium800/camera_parts.jpg?1705949732)

## Parts
### MEMENTO - Python Programmable DIY Camera - Bare Board

[MEMENTO - Python Programmable DIY Camera - Bare Board](https://www.adafruit.com/product/5420)
Make memories, or just a cool camera-based project,&nbsp;with **Adafruit's MEMENTO Camera Board**. It's a development board with everything you need to create programmable camera and vision projects: with a camera module, TFT preview screen, buttons, SD card slot and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5420)
[Related Guides to the Product](https://learn.adafruit.com/products/5420/guides)
![Video of a DIY camera on a lazy susan.](https://cdn-shop.adafruit.com/product-videos/640x480/5420-05.jpg)

### STEMMA Wired Tactile Push-Button Pack - 5 Color Pack

[STEMMA Wired Tactile Push-Button Pack - 5 Color Pack](https://www.adafruit.com/product/4431)
Little clicky switches are standard input "buttons" on electronic projects. These are just like our&nbsp;[Colorful Round Tactile Button Switch Assortment](https://www.adafruit.com/product/1009), but already assembled onto a PCB - they even have a pull-up resistor...

In Stock
[Buy Now](https://www.adafruit.com/product/4431)
[Related Guides to the Product](https://learn.adafruit.com/products/4431/guides)
![STEMMA Wired Tactile Push-Buttons connected to a half sized white breadboard](https://cdn-shop.adafruit.com/640x480/4431-03.jpg)

### Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh

[Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh](https://www.adafruit.com/product/4236)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 420mAh for a total of about 1.55 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4236)
[Related Guides to the Product](https://learn.adafruit.com/products/4236/guides)
![Lithium Ion Polymer Battery 3.7v 420mAh with JST 2-PH connector and short cable](https://cdn-shop.adafruit.com/640x480/4236-04.jpg)

### Camera and Tripod 3/8" to 1/4" Adapter Screw

[Camera and Tripod 3/8" to 1/4" Adapter Screw](https://www.adafruit.com/product/2392)
_Whaddya got a screw loose or something?_

This **3/8" to 1/4"**  **Adapter Screw** is super handy if you're building projects that connect to a tripod or a camera. It's a simple fix for getting a tripod with a 1/4" machine screw...

In Stock
[Buy Now](https://www.adafruit.com/product/2392)
[Related Guides to the Product](https://learn.adafruit.com/products/2392/guides)
![Camera and Tripod 3/8 to 1/4 Adapter Screw](https://cdn-shop.adafruit.com/640x480/2392-01.jpg)

### 256MB Micro SD Memory Card

[256MB Micro SD Memory Card](https://www.adafruit.com/product/5251)
Add storage in a jiffy using this **256MB microSD card**. Preformatted to FAT32, so it works out of the packaging with our projects. Works great with any device in the Adafruit shop that uses microSD cards. Ideal for use with Feathers, data loggers, or small Linux SBCs (not good...

In Stock
[Buy Now](https://www.adafruit.com/product/5251)
[Related Guides to the Product](https://learn.adafruit.com/products/5251/guides)
![Angled shot of Small microSD card 256mb](https://cdn-shop.adafruit.com/640x480/5251-00.jpg)

### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" male header plugs on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

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

In Stock
[Buy Now](https://www.adafruit.com/product/3893)
[Related Guides to the Product](https://learn.adafruit.com/products/3893/guides)
![Angled shot of STEMMA JST PH 3-Pin to Male Header Cable - 200mm.](https://cdn-shop.adafruit.com/640x480/3893-03.jpg)

### Part: STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm
quantity: 1
STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm
[STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm](https://www.adafruit.com/product/3894)

### Part: JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable
quantity: 1
JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable
[JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable](https://www.adafruit.com/product/4030)

### Part: Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll
quantity: 1
Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll
[Copper Foil Tape with Conductive Adhesive - 6mm x 15 meter roll](https://www.adafruit.com/product/1128)

### Part: 28 AWG 3 Conductor Wire
quantity: 1
Long cable - 28 AWG 3 Conductor Wire
[28 AWG 3 Conductor Wire](https://amzn.to/3HyCPb6)

### Part: Pink and Purple Woven USB A to USB C Cable - 1 meter long
quantity: 1
Pink and Purple Woven USB A to USB C Cable - 1 meter long
[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)

![](https://cdn-learn.adafruit.com/assets/assets/000/127/145/medium800/camera_hero-medium.jpg?1705943194)

# Remote Shutter Button for MEMENTO

## Install 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.

Warning: Make sure you use CircuitPython 9.0.0 final or later. CircuitPython 9.0.0-beta.1 and earlier have a bug that can corrupt the fileystem.

```auto
import storage
storage.erase_filesystem()
```

Your board will reboot after running this.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_esp32s3_camera/)
Warning: As of CircuitPython 9, you'll need to create a folder called "sd" on your CIRCUITPY drive to mount the microSD card, if it's not already there.

[Follow these steps to create the /sd directory](https://learn.adafruit.com/adafruit-memento-camera-board/circuitpython-memento-starter-projects)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_most_boards_CircuitPython_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/102/129/medium640/install_circuitpython_on_most_boards_CircuitPython_downloaded.jpg?1620922559)

![](https://cdn-learn.adafruit.com/assets/assets/000/126/734/medium800/adafruit_products_resetNeo.jpg?1702908010)

Plug your board into your computer, using a known-good data-sync cable, directly, or via an adapter if needed.

Double-click the **reset** button (highlighted in red above), and you will see the **RGB status LED(s)** turn green (highlighted in green above). If you see red, try another port, or if you're using an adapter or hub, try without the hub, or different adapter or hub.

For this board, tap reset and wait for the LED to turn purple, and as soon as it turns purple, tap reset again. The second tap needs to happen while the LED is still purple.

If you do not see the LED turning purple, you will need to reinstall the UF2 bootloader. See the **Factory Reset** page in this guide for details.

If double-clicking doesn't work the first time, try again. Sometimes it can take a few tries to get the rhythm right!

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 **CAMERABOOT**. Drag the **adafruit-circuitpython-adafruit\_esp32s3\_camera-etc.uf2** file to **CAMERABOOT**.

![adafruit_products_cameraboot.png](https://cdn-learn.adafruit.com/assets/assets/000/126/740/medium640/adafruit_products_cameraboot.png?1702932896)

The **BOOT** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it!

![install_circuitpython_on_most_boards_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/102/130/medium640/install_circuitpython_on_most_boards_CIRCUITPY.jpg?1620923145)

# Remote Shutter Button for MEMENTO

## Code

Once you've finished setting up your MEMENTO with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **Download Project Bundle** button in the window below. It will download to your computer as a zipped folder.

![camera_cp-hero.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/169/medium640/camera_cp-hero.jpg?1705971686)

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

## Upload the Code and Libraries to the MEMENTO

After downloading the Project Bundle, plug your MEMENTO into the computer's USB port with a known good USB data+power cable. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called **CIRCUITPY**. Unzip the folder and copy the following items to the MEMENTO's **CIRCUITPY** drive.

- **lib** folder
- **code.py**

Your MEMENTO **CIRCUITPY** drive should look like this after copying the **lib** folder and the **code.py** file.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/MEMENTO_PyCamera_External_Shutter_Button.png )

## How the CircuitPython Code Works

The code consists of the [Fancy Camera example](https://learn.adafruit.com/adafruit-memento-camera-board/fancy-camera) from the PyCamera library written by Jeff Epler with some minor modifications to add in the external shutter button. The `A0` pin is instantiated as an input and passed as a `Button` object with a `long_press` interval of one second.

```python
pin = DigitalInOut(board.A0)
pin.direction = Direction.INPUT
pin.pull = Pull.UP
ext_button = Button(pin, long_duration_ms=1000)
```

In the loop, the `ext_button` is checked for either a long or short press alongside the shutter button on the MEMENTO. A short press takes a photo and a long press focuses.

```python
pycam.keys_debounce()
ext_button.update()
# test shutter button
if pycam.shutter.long_press or ext_button.long_press:
  print("FOCUS")
  print(pycam.autofocus_status)
  pycam.autofocus()
  print(pycam.autofocus_status)
if pycam.shutter.short_count or ext_button.short_count:
```

Otherwise, the code is identical to the Fancy Camera example, leaving all of the excellent functionality in place.

# Remote Shutter Button for MEMENTO

## Circuit Diagram

The diagram below provides a general visual reference for wiring of the components once you get to the **Assembly** page. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Adafruit uses the Adafruit's Fritzing parts library to create circuit diagrams for projects. You can download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/127/168/medium800/camera_circuit_diagram.jpg?1705971983)

# Remote Shutter Button for MEMENTO

## 3D Printing

## 3D Printed Parts

STL files for 3D printing are oriented to print "as-is" on FDM style machines.

Parts are designed to 3D print without any support material using PLA filament.

Original design source files may be downloaded using the links below.

![camera_parts-shutter-case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/135/medium640/camera_parts-shutter-case.jpg?1705941338)

![camera_parts-case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/136/medium640/camera_parts-case.jpg?1705941380)

[Shutter Button Case](https://a360.co/3HroQnJ)
[MEMENTO Case Ports](https://a360.co/48GShxP)
[Download STLs](https://www.thingiverse.com/thing:6449400)
## Slice with Settings for PLA material&nbsp;

The parts were sliced using CURA using the slice settings below.

- PLA filament 200c extruder
- 0.2 layer height
- 10% gyroid infill
- 60mm/s print speed
- 60c heated bed

&nbsp;

![camera_slice.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/137/medium640/camera_slice.jpg?1705941743)

# Remote Shutter Button for MEMENTO

## Assemble

## Two button types

Build the remote case version or this alternate cardboard stomp switch. This demonstrates you can craft your own shutter remote with copper tape and a piece of cardboard.

## &nbsp;
![camera_cables-two.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/186/medium640/camera_cables-two.jpg?1706046173)

## Remote Case

Use 3 Pin JST wires to plug into the MEMENTO.

Measure and cut wires. Add heat shrink tubing to help bundle the wires before soldering cables together.

![camera_cable-shutter.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/183/medium640/camera_cable-shutter.jpg?1706045409)

## Camera Case

Align the MEMENTO board to the cutouts on the printed case.

The camera case exposes the ports so you can plug in external components and additional sensors.

![camera_case-align.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/146/medium640/camera_case-align.jpg?1705948638)

![camera_case-aligned.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/147/medium640/camera_case-aligned.jpg?1705948694)

## Tactile Button

Align the nubs on the printed case to the screw holes on the Tactile push button PCB.

Place the printed lid over the case and press fit to the case.

![camera_shutter-case-open.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/138/medium640/camera_shutter-case-open.jpg?1705941860)

![camera_hero-shutter-case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/141/medium640/camera_hero-shutter-case.jpg?1705942647)

## Tripod screw

An optional 3/8 to 25/20 thread screw fits to attach a tripod.

Use a flat head or the end of tweezers to thread the adapter.

![camera_hero-plant.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/148/medium640/camera_hero-plant.jpg?1705949622)

## Cardboard stomp button

Use strips on copper table on a folded cardboard to create a stomp button of any size.&nbsp;

Use Alligator Clips Cables to "connect" to the copper strips.&nbsp;

Plug the other ends of the cables into&nbsp; into the outer two pins of the MEMENTO A0 port. (Polarity doesn't matter here, either cable can plug into either pin).

Then, to trigger the camera shutter, simple "stomp" on the cardboard so the two copper strips make contact with each other.

![camera_cardboard.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/142/medium640/camera_cardboard.jpg?1705942716)

![camera_cables-cardboard.jpg](https://cdn-learn.adafruit.com/assets/assets/000/127/185/medium640/camera_cables-cardboard.jpg?1706045553)

![](https://cdn-learn.adafruit.com/assets/assets/000/127/144/medium800/camera_hero-hold.jpg?1705943150)


## Featured Products

### MEMENTO - Python Programmable DIY Camera - Bare Board

[MEMENTO - Python Programmable DIY Camera - Bare Board](https://www.adafruit.com/product/5420)
Make memories, or just a cool camera-based project,&nbsp;with **Adafruit's MEMENTO Camera Board**. It's a development board with everything you need to create programmable camera and vision projects: with a camera module, TFT preview screen, buttons, SD card slot and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/5420)
[Related Guides to the Product](https://learn.adafruit.com/products/5420/guides)
### STEMMA Wired Tactile Push-Button Pack - 5 Color Pack

[STEMMA Wired Tactile Push-Button Pack - 5 Color Pack](https://www.adafruit.com/product/4431)
Little clicky switches are standard input "buttons" on electronic projects. These are just like our&nbsp;[Colorful Round Tactile Button Switch Assortment](https://www.adafruit.com/product/1009), but already assembled onto a PCB - they even have a pull-up resistor...

In Stock
[Buy Now](https://www.adafruit.com/product/4431)
[Related Guides to the Product](https://learn.adafruit.com/products/4431/guides)
### Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh

[Lithium Ion Polymer Battery with Short Cable - 3.7V 420mAh](https://www.adafruit.com/product/4236)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of 420mAh for a total of about 1.55 Wh. If you need a larger (or smaller!) battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4236)
[Related Guides to the Product](https://learn.adafruit.com/products/4236/guides)
### Camera and Tripod 3/8" to 1/4" Adapter Screw

[Camera and Tripod 3/8" to 1/4" Adapter Screw](https://www.adafruit.com/product/2392)
_Whaddya got a screw loose or something?_

This **3/8" to 1/4"**  **Adapter Screw** is super handy if you're building projects that connect to a tripod or a camera. It's a simple fix for getting a tripod with a 1/4" machine screw...

In Stock
[Buy Now](https://www.adafruit.com/product/2392)
[Related Guides to the Product](https://learn.adafruit.com/products/2392/guides)
### 256MB Micro SD Memory Card

[256MB Micro SD Memory Card](https://www.adafruit.com/product/5251)
Add storage in a jiffy using this **256MB microSD card**. Preformatted to FAT32, so it works out of the packaging with our projects. Works great with any device in the Adafruit shop that uses microSD cards. Ideal for use with Feathers, data loggers, or small Linux SBCs (not good...

In Stock
[Buy Now](https://www.adafruit.com/product/5251)
[Related Guides to the Product](https://learn.adafruit.com/products/5251/guides)
### STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Male Header Cable - 200mm](https://www.adafruit.com/product/3893)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" male header plugs on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

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

In Stock
[Buy Now](https://www.adafruit.com/product/3893)
[Related Guides to the Product](https://learn.adafruit.com/products/3893/guides)
### STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm

[STEMMA JST PH 2mm 3-Pin to Female Socket Cable - 200mm](https://www.adafruit.com/product/3894)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with high-quality 0.1" female header sockets on the end. We're carrying these to match up with our Hallowing, for extending and connecting sensors or LEDs - and the wires are even color coded!

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

In Stock
[Buy Now](https://www.adafruit.com/product/3894)
[Related Guides to the Product](https://learn.adafruit.com/products/3894/guides)
### JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable

[JST PH 2mm 3-pin Plug to Color Coded Alligator Clips Cable](https://www.adafruit.com/product/4030)
This cable will let you turn a JST PH 3-pin cable port into 3 individual wires with grippy mini alligator clips. We're carrying these to match up with any of our boards or breakouts with 3-pin 'STEMMA' connectors on them such as the&nbsp;<a...></a...>

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

## Related Guides

- [Adafruit MEMENTO Camera Board](https://learn.adafruit.com/adafruit-memento-camera-board.md)
- [DIY IoT Doorbell Camera with MEMENTO](https://learn.adafruit.com/diy-iot-doorbell-camera-with-memento.md)
- [OpenAI Image Descriptors with MEMENTO](https://learn.adafruit.com/openai-image-descriptors-with-memento.md)
- [ePaper Camera](https://learn.adafruit.com/epaper-camera.md)
- [MEMENTO Focus Stacking](https://learn.adafruit.com/memento-focus-stacking.md)
- [3D Printed Camera Case for MEMENTO](https://learn.adafruit.com/memento-3d-case.md)
- [Set up Web Workflow on the Adafruit MEMENTO](https://learn.adafruit.com/set-up-web-workflow-on-the-adafruit-memento.md)
- [Facial Detection and Recognition with MEMENTO](https://learn.adafruit.com/facial-detection-and-recognition-with-memento.md)
- [AdaBox 021](https://learn.adafruit.com/adabox021.md)
- [MEMENTO Wireless Remote with TouchOSC](https://learn.adafruit.com/memento-wireless-remote.md)
- [Face Tracking Robot with MEMENTO](https://learn.adafruit.com/face-tracking-robot-with-memento.md)
- [Memento Photo Capture with itsaSNAP](https://learn.adafruit.com/memento-photo-capture-with-itsasnap.md)
- [BLE Cat Thermal Printer with MEMENTO](https://learn.adafruit.com/ble-cat-thermal-printer-with-memento.md)
- [IoT Bird Feeder with Camera](https://learn.adafruit.com/iot-window-bird-feeder-with-camera.md)
- [Rx Snapchat Spectacles for DIY and STEM](https://learn.adafruit.com/prescription-snapchat-spectacles.md)
