You are browsing as a guest. Sign up (or log in) to start making projects!

Henrik_Eriksen

@Henrik_Eriksen

Joined June 28th, 2026

  • 12Devlogs
  • 4Projects
  • 2Ships
  • 30Votes
Just a beginner starting to learn Arduino programming
Ship Pending review

Over the span of about 23 hours i have made a Arduino multi tasking game that is based very loosely upon the contraption you see in the picture to the left, the Schuhfried Universal Response panel. the panel is used when taking different tests to get your private/commercial pilots license. The gameplay loop revolves around multitasking 3 different things at once, they are as follows: ensure that you always press middle button when an x shows up on the middle screen, ensure that the potentiometer is always pointed at the lit up led(its the one to the left in the second picture) and lasty press the corresponding button combo when up and down are shown on the lower half of the lcd, you do this by pressing left and right buttons. This project has been a major challenge to me since i barely knew how to code (and arguably still dont know how write good code) when i started this project. The reason for me shipping this as software and not hardware as originally intended is since i want to get the ISS question in the shop. The question timeline would have expired before hardware starts to get reviewed. I am highly aware that my code might be very inefficient but i have been coding and learning to for about 20 days. I will now try to explain my code. The first part of the before setup is just labeling booleans and integers that will be used later(i am using integers to keep track of many things that i could use booleans for but i wasn't aware of booleans until about 1/3 of the code was already written and i didn't want to rewrite everything already using integers), the part of the code that i would say i am most proud of is is my fail system since it constantly works every time and i think the way i did it was a clever solution. For context the fail system works by clearing the LCD then printing YOU FAILED! Reset Arduino, the way that it ensures the Arduino is reset is by setting a delay on the code that lasts indefinitely until the Arduino is reset.
A bit explanation about how the different game modes:
For the upper lcd screen: An random number between 1 and 13 is generated every time the reaction time game is completed(by pressing middle button when x shows on lcd), it also gets an random number between 150ms and 500ms that determines how fast the numbers will be printed on the lcd screen. This effects your time to react and leaves it at somewhere between 450ms and 1.5s.
Led minigame: a number between 1 and 2 is picked randomly, this decides what led is going to light up, it then determines if the potentiometer potentiometer is pointed at the lit up LED(i am a bit unsure if this works perfectly on pc). i determined the correct position for potentiometer my pointing it at at the leds to see what angles would work for minimum and max, this is also why i am a bit unsure as to if this works fully on pc since i dont know if the potentiometer outputs the same angle, i haven't experienced anything indicating that this is doesn't work on pc though during my playtesting.
If you want to try my game in your web browser click the demo link and click the big green button in the top right that says start the simulation when you hover over it. And when you fail to multitask press the square in the top right of the window to stop the simulation (very important do not pause it, you have to stop it!). The controls for the minigame are as follows: 1 = leftmost button, when an X appears on the lcd screen press the middle button to complete and restart it, if the bottom half of the lcd say down press the left most button and if the lcd says up press the rightmost button(combine those inputs if up then down and down then up) and lastly for the red led lights just point the potentiometer towards it. If you find the game very hard to play on pc it is because this wasn't designed for it, i have fully built it using my own Arduino uno and parts that come with the Arduino starter kit and verified that it works irl.
Cant write more, text limit.

  • 10 devlogs
  • 23h
Try project → See source code →
Open comments for this post

2h 54m 11s logged

Posting this devlog right before ship. The news things i have done is i scrapped the flight minigame entirely, I have reworked the reaction time mingame that plays on the upper part of the lcd. The minigame now has more variety and it is now random when the time window to press the middle button appears and random how long it lasts. (another cat picture since i have nothing else to show a picture of)

0
0
7
Open comments for this post

2h 19m 12s logged

HELLO PEOPLE, as i promised about 3 hours ago (sleep is something you can do after you have shipped) I have ported my Arduino project into web, it is now fully functional and you can try it. before you try here are the controls: 1 = leftbutton 2 = rightbutton Up = right You press the middle button when there is an x showing on the lcd screen Down = left When the left led is lit up point the potentiometer at it, and when the right led is lit up turn the potentiometer to face that. (no cat photo since i have something to show off) (btw flight is not yet implemented) (btw btw flight to start and restart the Arduino press the square and green button in the up right corner, in order to properly reset it you have to stop the simulation not pause it) As for the coding i have done i am still rewriting the up and down feature. LINK:https://app.cirkitdesigner.com/project/d06255aa-6f98-41b6-9677-e4eba724c674

0
0
20
Open comments for this post

2h 31m 59s logged

Decided that i am going to be rewriting all the code involving the up down minigame, i will also be changing this project from hardware to software soon so in hopes of getting an ISS message in time before they sell out or the time expires. Due to me changing it from hardware to software not very much will change other than me providing a working build each devlog after this one that YOU can play by using an Arduino emulator link. I will also keep updating my GitHub when major changes are done. . (since nothing changed on the breadboard layout and nothing will change anytime in the future i will be placing a cat photo of one my cats in its place) (this photo is of Jupiter)

0
0
27
Open comments for this post

4h 2m 47s logged

This is the biggest change i have made so far, the new things in the game are as follows: the 2 new buttons serve a purpose, new minigame where it says up, down, down then up or up then down, this minigame uses the 2 new buttons, added a new start menu where it prompts you to right button for multi and left button for a new minigame that will only be using the LCD screen, i changed the led color from green to red, and the last major change is that i made is removing useless old code. , My planned changes are making a new minigame using the lcd as the main part, and looking into if i can get the lcd backlight to work.

1
0
43
Open comments for this post

1h 51m 6s logged

Removed every bug i encountered in about 10 minutes of playtime. Removed the “good action” led because i see it as unnecessary when more minigames are added, removed unneeded parts of the code and rewrote some of it to make it less confusing. I also made and coded in 2 new buttons to be used in the future. the possibilities you have when 3 side by side buttons are available is endless. I also made the parts that decide how little time you have in the reaction time game random so that they vary from half a second to 2/3 of a second per character. Means that your time window to react will fluctuate between 1.5 and 1 second. I also made the time it takes to fail the turn minigame vary from 3-2 seconds. , my vision for the 2 new buttons so far is that they will be clicked when a prompt shows up on the bottom part of the lcd (for example left, right or a combination of the 2) might even remove the old reaction time minigame entirely and replace it with something that uses all 3 buttons. (look at picture for current breadboard layout) (i wont post code due to there being very minor changes) (open picture in its own tab to view it fully)

0
0
28
Open comments for this post

3h 9m 56s logged

Now i have finalized the 2 main multitasking games, one of them has an LCD screen that displays an time window of 1.5 seconds. in that timeframe you have to click a button to reset the timer to 8 seconds. so for 1.5 out of those 8 seconds you have to click the button. The other feature that i made is an potentiometer that grabs a random direction (left or right) and you have 3 seconds to turn the potentiometer to the correct side. you can see the correct side by looking at the 2 leds close to it (you can guess what sides they are on). The features i intent to add now are a second minigame on the screen (utilizing the lower part of the screen and 1 or more buttons) as for what i am going to do with that minigame in terms of functionality i have not yet decided. (picture has to be opened in its own tab for it to properly show)

0
0
24
Open comments for this post

4h 48m 24s logged

The main feature that i will use for my Multitasking game is complete, the LCD screen that displays if you loose and that has a reaction time feature and an LED that lights green once you have completed a correct action. the game revolves around you having to click an button within a 3 second timeframe, if you fail to do then the entire Arduino freezes and the LCD displays a message about how you lost and that you must restart your Arduino to reset the minigame. The way that i am making this work is by using lots of integers. an example from the code is this: int lcdx = 0; if (digitalRead(switchPin) == HIGH){    if(lcdx >=14 && lcdx <= 16){      good++;      lcd.clear();      digitalWrite(goodled, HIGH);      delay(1000);      digitalWrite(goodled, LOW);      lcdx = 0;        } This is how i register if the button was pressed within the timeframe, if it was pressed within the timeframe the “goodled” lights up and the minigame pauses for a second. My insiration for this project is the multitasking deivces you have to use to get your ppl (private pilots lisence) (picture is a pilot Multitasking test device)

0
0
11
Open comments for this post

54m 15s logged

I wanted to learn how an tilt sensor works and how to practically apply it to code since i was thinking about using it for my multitasking game. when i coded up the tilt sensor based digital hourglass i discovered that the tilt sensor legs are way to short to fit properly into the socket. after discovering this i thought i would still post a develog since i spent about an hours doing this. i would say that i generally advanced my coding knowledge with this

0
0
7
Open comments for this post

33m 53s logged

just Learned the second thing needed for this project, i learned how to make a buzzer and subsequently use buttons to turn it into an keyboard instrument of sorts. here is the code:  int notes[] = {262, 294, 330, 349};void setup(){  Serial.begin(9600);}void loop(){  int keyVal = analogRead(A0);  Serial.println(keyVal);  if (keyVal == 1023){    tone(8, notes[0]);  }  else if(keyVal >= 990 && keyVal <=1010){    tone(8, notes[1]);  }  else if (keyVal >=505 && keyVal <= 1010){    tone(8, notes[2]);  }  else if (keyVal >= 5 && keyVal <= 10){    tone(8, notes[3]);  }  else {    noTone(8);  }} image is still wrongly cropped, to see the whole creation open the image in its own tab

0
0
13
Open comments for this post

20m 39s logged

The first of the many Arduino skills i will have to learn. I now understand how to control an potentiometer and an servo motor. The things that i still have to learn are: How to control an lcd, how to control an tilt sensor, how to make it so that your lcd has a high score and timer on it and much more. Here is the code i am using to controll the servo via potentiometer #include <Servo.h>Servo myServo;int const potPin = A0;int potVal;int angle;void setup(){  myServo.attach(9);  Serial.begin(9600);}void loop(){  potVal = analogRead(potPin);  Serial.print(“potVal: “);  Serial.print(potVal);  angle = map(potVal, 0, 1023, 0, 179);  myServo.write(angle);  delay(15);} image is getting cropped incorectly

0
0
9
Ship Pending review

I made an "lamp" that mixes color based on different sensor input, the input can for example be a thermometer or an RGB phototransistor array, in my project i did both. firstly i made the basic RGB phototransistor build by following the guide for project 04 in the Arduino projects book so that i would have an understanding of how the RGB led and its inputs work. i then proceeded to adapt the code so that it could take an input from an thermometer and turn it into an set of RGB colors that gets sent to the RGB led. the biggest difficulties for me in this project was fully understanding the code that i was dealing with and how to rewrite it to function with a thermometer instead of phototransistors.

in the picture you can see the project working flawlessly and displaying that it is 25C+ in the room it is in. the colors it displays when it is between 0-7c is blue 7-15 is increasingly white and 15-25 is increasingly orange until it turns red when over 25C.

  • 2 devlogs
  • 2h build
Video of Project → See source code →
Open comments for this post

1h 27m 26s logged

Re wrote the code so that i can use a thermometer to decide what colors are displayed, the range of colors goes from blue 0-7 white 7-15 and red/orange 15-25, anything above 25 is just plain red. I know the led lacks an deuser but i dont feel like ordering one just for this small project. the code for this versjon can also be found at my github

0
0
3
Open comments for this post

47m 21s logged

currently made my prototype by following a guide that is in the Arduino starter kit where you make an color changing lamp based on your environmental lighting, i also discovered that my set lacks an red gel to put over an phototransistor. i will now start to modify this build so that i can use other sensor inputs, for example an thermometer. the code for this has been uploaded to github

0
0
15

Followers

Loading…