At this point, your MEMENTO should be connected to your network. You can confirm this be looking at the top line of your display and seeing that it shows an IP address instead of "Wi-Fi: No IP". If it says "Wi-Fi: off", then you likely haven't added your Wi-Fi info to settings.toml yet.
If it launches code instead of displaying the REPL, you can try connecting to the serial console with a terminal application. For more details on how to do this, you can take a look at the Connecting to the Serial Console page.
Install Fancy Camera Example
For the purposes of the guide, you will need to install the fancy camera example. This example has more features than the basic camera example and includes changing the mode to timelapse. To install, click Download Project Bundle below, unzip the file, and copy the full contents of the folder matching your version of CircuitPython to your CIRCUITPY drive.
If you already have an existing boot.py file, you will need to edit it and add the contents of both files. To learn more about this example, check out the MEMENTO Fancy Camera guide page.
# SPDX-FileCopyrightText: Copyright (c) 2023 john park for Adafruit Industries # # SPDX-License-Identifier: MIT """ simple point-and-shoot camera example. No bells! Zero whistles! """ import time import adafruit_pycamera # pylint: disable=import-error pycam = adafruit_pycamera.PyCamera() pycam.mode = 0 # only mode 0 (JPEG) will work in this example # User settings - try changing these: pycam.resolution = 8 # 0-12 preset resolutions: # 0: 240x240, 1: 320x240, 2: 640x480, 3: 800x600, 4: 1024x768, # 5: 1280x720, 6: 1280x1024, 7: 1600x1200, 8: 1920x1080, 9: 2048x1536, # 10: 2560x1440, 11: 2560x1600, 12: 2560x1920 pycam.led_level = 1 # 0-4 preset brightness levels pycam.led_color = 0 # 0-7 preset colors: 0: white, 1: green, 2: yellow, 3: red, # 4: pink, 5: blue, 6: teal, 7: rainbow pycam.effect = 0 # 0-7 preset FX: 0: normal, 1: invert, 2: b&w, 3: red, # 4: green, 5: blue, 6: sepia, 7: solarize print("Simple camera ready.") pycam.tone(800, 0.1) pycam.tone(1200, 0.05) while True: pycam.blit(pycam.continuous_capture()) pycam.keys_debounce() if pycam.shutter.short_count: print("Shutter released") pycam.tone(1200, 0.05) pycam.tone(1600, 0.05) try: pycam.display_message("snap", color=0x00DD00) pycam.capture_jpeg() pycam.live_preview_mode() except TypeError as exception: pycam.display_message("Failed", color=0xFF0000) time.sleep(0.5) pycam.live_preview_mode() except RuntimeError as exception: pycam.display_message("Error\nNo SD Card", color=0xFF0000) time.sleep(0.5) if pycam.card_detect.fell: print("SD card removed") pycam.unmount_sd_card() pycam.display.refresh() if pycam.card_detect.rose: print("SD card inserted") pycam.display_message("Mounting\nSD Card", color=0xFFFFFF) for _ in range(3): try: print("Mounting card") pycam.mount_sd_card() print("Success!") break except OSError as exception: print("Retrying!", exception) time.sleep(0.5) else: pycam.display_message("SD Card\nFailed!", color=0xFF0000) time.sleep(0.5) pycam.display.refresh()
Install an SD Card
Make sure you have a micro SD card installed in the camera. This is where the photos will be written to. One of the newer features of Web Workflow is the ability to access the files from your SD card remotely and download photos. The SD Card doesn't need to be very big. You can use a small one like the 256MB Micro SD Card in the Adafruit shop.
Put in Timelapse Mode
For this example, this guide will show you how you can use timelapse photography and access the photos while it is recording. To find out more information about the timelapse mode, visit the Timelapse Project page of the main MEMENTO guide.
Press the left/right buttons, move the selector over to the mode option in the lower righthand side of the screen. It should say JPEG if you haven't already adjusted it. Once it is highlighted, use the up/down buttons to change it to LAPS.
To conserve battery, you can change it from Hi Power to Medium or Low power mode at this point by pressing the Select button.
Now using the left/right buttons, select the time interval between photos and adjust to whatever you like. For the purposes of this example, it will be set to 10 seconds.
If desired, change the resolution to one for which you would like to capture images. The default is 240x240 pixels, but you may desire a little bit higher resolution than that.
Set up your MEMENTO camera to point at the subject that you would like to take a timelapse of and press OK to start. You may wish to set the camera on a steady surface so that it doesn't inadvertently tip over while recording. The timer countdown will start and after it finishes, it will save a photo on the SD Card.
Now that your camera is all set up and taking a timelapse, you may want to check the progress or download the photos.
You can do this through the enhanced code editor, which can be opened by either going to http://circuitpython.local/code/ or typing http://[device IP address]/code/ (replacing "[device IP address]" with the actual IP address). Be sure to include the trailing slash or it won't load the page.
Once it loads, it should prompt for a password. Leave the username field blank and use the password that you set in your settings.toml file.
Once you login, an information box about the board you connected to will appear. Click the Close button.
Go ahead and click the Open button at the top. This will allow you to do some additional file operations such as downloading files.
Select the file you wish to download and then click on the Download button (the button with the arrow pointing down).
There are a couple of ways that you can do this.
The first is by selecting the SD folder and then clicking on the Download button (the button with the arrow pointing down).
The second way is by entering into the SD Folder and then without selecting anything, just click the Download button.
This is only one example of what you can do with Web Workflow. You'll probably be able to think of many more things you can use this for. Future improvements in CircuitPython and the Code Editor should make using Web Workflow even more useful.
Text editor powered by tinymce.