Hi everyone, I am trying to learn arduino uno, so I have something in my mind which I want to do but am not sure how to do it and where to start. I am simulating first everything in wokwi.com and if it works then I will try it on a breadboard with my arduino uno. I already wrote the code for void setup so I need only void loop part.
So the idea behind my little project is that I have 4 LEDs connected to pins 2, 3, 4, 5 all set as digital OUTPUT in arduino sketch. Pins 6, 7, 8 are my control pins.
I want:
LED (pin2) light up everytime pin 6 and 7 are set to LOW,
LED (pin3) light up everytime pin 6 and 8 are set to HIGH,
LED (pin4) light up everytime pin 2 is HIGH and pin 4 is LOW,
LED (pin5) light up everytime pin 2 is LOW and pin 3 is HIGH
I still do not know how I will set my control pins to LOW or to HIGH for simulation my idea was just to write a couple of code line like "digitalWrite (6, LOW)" and "digitalWrite (7, LOW)" to light up the LED (pin2) when it works I will try to connect 5v source for each combination of pins to try it in real world.
Is there any way to do it efficiently but not super complex because I am a beginner and I want to understand what I am doing and not only copy paste code.
Thank you
This is exactly what I understand on these kind of forums. I will figure this out myself it just will take me much longer. I wanted to save time but as your grandfather would probably say "Just do it yourself". the german way I guess