You already have a mothbox built, but now you need to give it life! There is special software that lives on the computer inside your mothbox to make it run. It controls things like the timezone, photo taking schedule, and power usage.
This used to be a complicated task and we had an entire webpage dedicated to explaining how to get special software to log in to your mothbox, and change the configuration, but now since firmware DIY_4.16.5 and Pro_5.1.0, we were able to make the process MUCH EASIER!
You will just need to
- Flash the Firmware onto an SD Card
- Customize some files on the SD Card
Flash Firmware
Flash the Raspberry Pi Image onto an SD Card
Get the Image
Download the latest Mothbox Image to your computer. You may need an unzipping software like 7zip to unzip the image after you download it.
Make sure to choose firmware from either the Pro or DIY version based on what type of mothbox you have!
Get the Imager
Download Image Flashing Software. You can use the traditional
- Raspberry Pi Imager,
- or I often use Win32DiskImager.
Get an SD card (at least 16GB). Connect it to your computer.
Start the Imaging software.
If you are using Raspberry Pi Imager, click “Choose OS.” Then scroll all the way down to choose “Use Custom.” Click “Choose Storage” and choose the SD card you have connected. Click “Next.”
If it asks you to apply customization options, just click no.
Now it will start flashing your SD card. This should take about 5-10 mins.
Hooray! You have an SD card with the brains of a Mothbox on it! Next we will configure it!
Configure Mothbox
Unless you are using your Mothbox in Panama, you probably need to configure a couple things before you use it!
The main thing you want to do is make sure the timezone and time is correct!
Put (Or Keep) the SD Card in Your Computer
The way we configure the Mothbox settings is now by modifying files on the Raspberry Pi SD Card. Put it in your computer and make sure it shows up as “bootfs”.
Go into “bootfs” and then into the folder called “mothbox_custom”
You will find 3 files there that can let you customize everything!
Mothbox Settings
Open the file “mothbox_settings.csv” with a text editor
This settings file is a “CSV” or “comma separated value” file, meaning that data is organized in different lines, and each line is structured like
SETTING,VALUE,DETAILS
so the
- first value before a comma shows what type of setting you are changing (e.g. timezone)
- second value is the value of that setting (e.g. America/Bogota)
- third value is simply a description of this setting (e.g. “put a linux timezone here”)
Change the Timezone
The first thing you will want to do is set the timezone. You need to copy and paste a timezone from the official list of Linux timezones.
The file of all the possible timezones is included, so you can browse for what timezone works for you! Just paste the timezone you need into the VALUE section
Set the Time
Using Internet Time
If your mothbox is connected to the internet, and you already changed the timezone, it SHOULD automatically set the correct time for you! You can use a phone set up for WIFI tethering with SSID: DINALAB wifipass: iloveyardpigs
There are two ways to set the time for your mothbox:
- Manual Time: change it once in settings
- Automatic (internet) time: Connect it to the internet
Using automatic time from the internet is recommended and easy.
Set Time Manually
If you have no access to the internet, you can also change the time manually! It’s also quite easy!
you need to change the “autoSystemTime” setting to “False,” and then set the time you want for your mothbox after the “manualTime” setting.
Your mothbox will read this time, and set that as the system time.
Set Internet time
Create a hotspot with your phone with the following username
SSID: DINALAB wifipass: iloveyardpigs
(the password is a name for our beloved agoutis outside) The mothbox will hop on this wifi automatically when it starts up and set the time automatically for you!
Set Custom Mothbox Name (Optional)
This is a very optional thing to do. The mothbox, by default will create a random unqiue name for your device.
If, for some reason, you really want your mothbox to have a specific name (that might run the risk of having a similar name as another one). You can just set the autoName to “False” and then it will change your mothbox’s name to whatever you include after the “name” setting.
Change Camera Settings (Optional)
Most people will never change these settings.
By default, the cameras in the mothbox are set to:
- Automatically calibrate focus every 10 minutes
- Automatically calibrate exposure every 10 minutes
- Optimize the image for the largest resolution and fastest “shutter speed” (to reduce moving insect blur)
Maybe you want your mothbox camera to do something else? I have just the file you can mess around with!
Most people will never ever touch this file, but if you want to change stuff, open the file called “camera_settings.csv”
There you can change some settings about how the mothbox takes photos. Some of the main ones folks might want to mess with are:
AutoCalibration - can make it fully manual (not really reccomended, things like focus can drop off with slight shifts) AutoCalibrationPeriod - can change how long the camera waits before recalibrating all its settings. Default is 10 minutes, but you can make it more or less. VerticalFlip - This is important if you are building your mothbox a little differently and need to install the camera upside down.
Insert SD Card into Pi
When you have completed your configuration, it’s time to put it in the Pi! Find the SD card into the bottom of your Pi and push it all the way in.
Set the Configuration for a LOT of mothboxes
Maybe you have 20 or 50 mothboxes you want to configure to be the same timezone. Well that’s easy to do, just follow this guide 50 times with each mothbox. (lol)
An even easier approach though is that you can CLONE the SD card of your current mothbox once you have.
- After you have made all the changes you want, shut down the Mothbox.
- Pull out its SD card
- Follow this guide to clone this SD card to other SD cards and put them in the other Mothboxes