The pupils normally do some dilation movement on their own…but you can have them respond to light if you like! Use the lightSensor keyword along with a pin number where the light sensor is connected. If it’s on a Seesaw interface chip (e.g. on MONSTER M4SK), add 100 to the pin number. For example, on MONSTER M4SK the built-in light sensor is:

"lightSensor" : 102

And for HalloWing M4, use:

"lightSensor" : 21

(Add a trailing comma if this appears mid-file.)

This guide was first published on Aug 20, 2019. It was last updated on 2023-12-03 00:06:00 -0500.

This page (Light Sensor) was last updated on Sep 23, 2019.

Text editor powered by tinymce.