Next, you'll need to upload the new firmware that reads the camera and moves the eyes accordingly.
The simplest way is to use the following firmware image:
Then upload it just as you may have done for the original M4SK firmware:
- Connect a USB cable and put the power switch in the “on” position
- Double-tap the reset button
- Wait for the MASKM4BOOT drive to appear on your host computer
- Drag the M4WATCH.UF2 file to the MASKM4BOOT drive and wait for it to copy over
- The board will automatically reboot.
(Note: this will not disturb your current eye configuration.)
If all goes well, you should be able to see the eyes moving to follow the warmest thing in front of them.
You can also compile the source code from the Arduino IDE. Building from source is more advanced than the rest of this guide, so consider using the UF2 file above unless you are very comfortable with the Arduino IDE and changing code.
Follow all the instructions in the M4SK Guide on "Building the eyes from source code."
You may also need to install more libraries than are listed in the the M4SK Guide. If you see vague error messages when you build with Arduino, make sure you have all of these installed:
- Adafruit AMG88xx
- Adafruit Arcada
- Adafruit Circuit Playground
- Adafruit GFX
- Adafruit ImageReader
- Adafruit seesaw
- Adafruit SPIFlash
- Adafruit ST7735 and ST7789
- Adafruit TinyUSB
- Adafruit TouchScreen
- Adafruit Unified Sensor
- Adafruit Zero DMA
- Adafruit ZeroTimer
- SdFat - Adafruit Fork
The M4_Eyes repository on GitHub is here for reference.
Once you've got the base firmware compiling, enable the "user_watch" module as follows:
user.cpp, change the first line from
user_watch.cpp, do the opposite: change the first line from
This ensures that exactly one version of the
user_loop() functions is defined.
Compile and upload that code from the Arduino IDE.