Replace the M4SK firmware

Next, you'll need to upload the new firmware that reads the camera and moves the eyes accordingly.

Upload from a firmware image

The simplest way is to use the following firmware image:

Then upload it just as you may have done for the original M4SK firmware:

  1. Connect a USB cable and put the power switch in the “on” position
  2. Double-tap the reset button
  3. Wait for the MASKM4BOOT drive to appear on your host computer
  4. Drag the M4WATCH.UF2 file to the MASKM4BOOT drive and wait for it to copy over
  5. 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.

Advanced - compiling the source code

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
  • ArduinoJSON
  • SdFat - Adafruit Fork

Once you've got the base firmware compiling, enable the "user_watch" module as follows:

  1. In user.cpp, change the first line from #if 1 to #if 0.
  2. In user_watch.cpp, do the opposite: change the first line from #if 0 to #if 1.

This ensures that exactly one version of the user_setup() and user_loop() functions is defined.

Compile and upload that code from the Arduino IDE.

This guide was first published on Oct 16, 2019. It was last updated on Oct 16, 2019. This page (Replace the M4SK firmware) was last updated on Jan 21, 2020.