Perchance
A nightlight circuit

Coding

This is my experience, and results of programming with GIFFER, Arduino IDE, and implementing this code into working circuits.

Simple LED circuit 1

I will start by showing my experience with GIFFER and how I was able to implement it into Arduino IDE and get a working LED circuit working.

The first lessons in GIFFER are simple and I don't think they are worth showing as they are pretty basic lessons similar to the simple circuits I did already. I will be sharing the more important stuff.

GIPHERLogo

GIFFER, Lesson 20

"Lesson 20, Counting backward with a for loop" Lesson 20 requires us to count backward using a for loop. The number we will be counting backward will be the LED Pin Number. So if I have 15 LEDS in my circuit, the code we need to make is to make the selected LED pin go from 15 counting down to 1. This will be simple as it is the same as counting up with a for loop but reversed.

GIPHER20

As shown in the GIF, The LEDS turned on will go down from 15 to 1. So the first LED to turn on will be LED 15, and the last one will be LED 1. for cosmetic purposes, The code will wait for 4000 milliseconds (4 Seconds) before looping again.

GIPHER20

My GIFFER code lights up LEDs connected to pins 2 through 15. In the setup() function, it sets these pins as outputs. In the loop() function, it turns on every second LED, starting from pin 15 and going backward to pin 2, keeping each LED on for 200 milliseconds before turning it off. After completing the sequence, it waits for 4 seconds and repeats the process.

GIPHERLogo

GIFFER, Lesson 40

GIPHER40

Lesson 40 of GIFFER, asks us to make a sequence that shows all LED colors. This seemed a bit complicated at the start as I would have to define each separate color as a separate pin and it made a very long document of code, which wasn't efficient or good-looking. I later switched to a function system. I made different functions for different color groups and I would only define that LED pin based on the color inside its reserved function. This approach was more efficient and easier to edit as it made the code a bit more modular.

GIPHER20

My GIFFER code controls LEDs connected to pins 2 through 15 by running five functions in sequence. Each function lights up a specific set of LEDs for 100 milliseconds before turning them off. After all five functions are executed, the program pauses for 3 seconds before repeating the sequence. The setup() function ensures all pins are set as outputs.

ArduinoLogo

With the knowledge from GIFFER, I was able to transfer the code to Arduino IDE and upload the code to an Arduino which would turn on the LEDS based on the code. Below is an example of lesson 20.

Lesson20Gif

Lesson 20

Simple LED circuit 1

This unit was pretty fun in my opinion and helped me improve my programming and coding skills, I was able to take code and put it to use and it will help a lot with debugging and making my light sculpture in the coming units. Thank you.