Make sure you are running version 9.0.0-rc.2 or later of CircuitPython. This release includes a fix for Web Workflow. You can download it from the downloads page on circuitpython.org. Once you have that downloaded, you will want to check out the Adafruit MEMENTO Camera Board guide for installation instructions.
If you have previously installed an earlier version, you will need to backup your data and erase the filesystem, as it was previously formatted with the incorrect size. This can be achieved by connecting to the terminal and running the following commands:
import storage storage.erase_filesystem()
Creating a settings.toml File
Once you have the correct version of CircuitPython installed and running, the next step is to create an settings.toml file in the root of the CIRCUITPY drive. Then configure it by adding the following contents and changing the values as appropriate:
# To auto-connect to Wi-Fi CIRCUITPY_WIFI_SSID="yourwifissid" CIRCUITPY_WIFI_PASSWORD="yourpassword" # To enable modifying files from the web. Change this too! # Leave the User field blank when you type the password into the browser. CIRCUITPY_WEB_API_PASSWORD="passw0rd" CIRCUITPY_WEB_API_PORT=80
A summary of the values is as follows:
- CIRCUITPY_WIFI_SSID: This is the name of the WiFi network that you usually see advertised in a list of available WiFi networks on your computer. It should match exactly.
- CIRCUITPY_WIFI_PASSWORD: This is the password for your WiFi network. It should also match exactly.
- CIRCUITPY_WEB_API_PASSWORD: This is the password that is used to protect access to the files on your device when connecting with Web Workflow. This is what you will type in when prompted for a password. You will want to change it to something that you'll remember.
- CIRCUITPY_WEB_API_PORT: This is the TCP port that the built-in Web Workflow web server on the device will use. At this point in time, the Code Editor hasn't been thoroughly tested with ports other than the default, so leaving it at port 80 is recommended.
If you would like a more technical detail of the underlying aspects of Web Workflow, be sure to check out the official CircuitPython documentation.
One of the more challenging aspects of using web workflow is that in order to avoid corrupting files, the USB mass storage device may need to be disabled on native USB chipsets like ESP32-S3 if you plan on using the camera while connected to a computer over USB, otherwise the files will only be available in read-only mode over the WiFi link.
The easiest way to do this is to simply eject the CIRCUITPY drive in your OS. However, this will only be temporary until the next time you reset the device or plug it back in. If you'd like it to stay disabled, you can create a boot.py file in the root folder of the CIRCUITPY drive with the following contents:
import storage storage.disable_usb_drive()
Once you have saved the file, go ahead and perform a hard reset on the board by pressing the reset button or by temporarily disconnecting it from power. After it starts back up, the CIRCUITPY drive should no longer appear. If you'd like to learn more about editing boot.py to customize the device, check out the Customizing USB Devices in CircuitPython guide.
Re-enabling USB Mass Storage
If you find you want to access the mass storage device after you have disabled it, there are a couple of ways you can do it. The first way to temporarily enable it is to boot it into safe mode. To do this, just reset the device and while it is booting, pay attention to the status NeoPixel. When it starts flashing yellow, press the boot button.
Alternatively, if you'd like to permanently re-enable it, you can run the following code from a serial terminal to remove the boot.py file:
import storage import os storage.remount("/", False) os.remove("/boot.py")
After hard resetting your device, the CIRCUITPY drive should reappear, though re-enabling it will cause web workflow to be in read-only mode again.
Text editor powered by tinymce.