Lego Sherlock Holmes figure focuses a light beam on a Lego criminal with a small magnifying glass.

LEGO Selfie Machine

To learn something new, our staff here at has been playing with SPIKE PRIME and Robot Inventor. Here's an example of work to add custom sensors and devices to Spike Prime, with a camera under control of an Intelligent Hub. The camera here is an OpenMV (, a fascinating open-source hackable camera. When a button on the Intelligent Hub is pressed, a control signal is sent to trigger a photo. There's all sorts of applications this camera could be used for. Here's one application in the video above of the Selfie Machine. The Selfie Machine takes a photo, stores it on an SD card, then presents a quick view of the photo on a small screen.

Getting signals out of the Intelligent Hub was quite a challenge, solved after a long adventure in Python programming. Similar functionality isn't available in Word Blocks, only in Python. And the Python program doesn't work (yet) in Robot Inventor--the Python libraries in Robot Inventor apparently aren't as mature yet as in Spike Prime. Access to the pins on the Spike Prime connector is accomplished here by taking the back shell of a Distance Sensor, then plugging in a Breadboard Connector Kit made by There's a little complexity here in the powering the OpenMV from the Intelligent Hub, which is solved with a boost converter seen in the video when the turntable turns to view the screen side of the Selfie Machine. I'll put details on the boost converter in an upcoming post.