Arduino Challenges

Seven Forty-Two 🧙‍♂️

After several hours of wandering through the damp corridors of the bewitched maze, Angela was desparate for some help. If only she could use Google Maps...

She entered a narrow long tunnel, decorated with large wooden hexadecimal digits. At the end of the tunnel, there was a heavy metal door, with a two-digit display above it:

Next to the door, there was a small niche in the wall, decorated with the Arduino logo, a circle of skulls, and an engraved message that reads: "42 To Open". But most interestingly, there was a short USB cable sticking out of the wall, just below the niche.

Angela pulled her laptop from beneath her cloak, plugged the USB cable into it, and started the Arduino software. To her amazement, she was able to upload some code into the mysterious USB device hidden inside the wall!

Click on Run code and look at the digital display above to see what it does. Can you help Angela figure out how to display the number "42" on the segment-display and unlock the door? She only has a few minutes until her laptop battery runs out!

Note: Angela can't see the connections between the Arduino and the display, so part of the challenge is to figure them out by trying different things. If you are not familiar with how 7-Segment displays work, google can help.

Have questions? Feedback? Please share with us below:


void setup() {
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);

void loop() {
  digitalWrite(12, HIGH);