Back to Parent

Outcome


Outcome

Following the guidance and tutorials, I was able to make simple circuits to create a blinking LED, then made a connected LED.

  

First Sketch: Making an LED Blink

Exercise 1

Modify the program to Blink on and off every 3 seconds.
The only thing I changed is the delay time. 

Show Advanced Options
Show Advanced Options

Exercise 2

Change the program to blink on and off 5 times then stop for 3 seconds. Each blink should be 0.5s (a half second)
I used a for loop to achieve 5 times blink on and off. Learned from https://www.arduino.cc/reference/en/language/structure/control-structure/for/

Show Advanced Options
Show Advanced Options

Exercise 3

Go back to the original program. Now add a second LED to the circuit.
Program the LED’s to alternate blinks i.e. when LED 1 turns on, LED 2 turns off, then when LED 2 turns on, LED 1 turns off.
I connected another led to the circuit and defined it as another ledPin to control the two LEDs on/off state at the same time.

Show Advanced Options
Show Advanced Options

Making a Connected LED

Exercise 1

Modify the cloud function to blink the LED 3 times after it is called.
I added the for loop to enable the LED blink 3 times after called. 

Show Advanced Options
Show Advanced Options

Exercise 2

Modify the cloud function as follows:
Instead of passing a HIGH Or LOW string pass the number of times you would like it to blink
Set the function to blink that number of times
Finally once it has completed all of the blinking it should turn the LED off

Show Advanced Options
Show Advanced Options

Exercise 3

Go back to the original program. Now add a second LED to the circuit.
Change the program and cloud function to allow you to control both LEDs remotely
I defined another led as ledPin and code to control the state of two LEDs.

Show Advanced Options
Show Advanced Options

Process

It was very smooth to complete the first 3 exercises by following the instructions. It took me a bit of experiment with writing the code for passing the number of LED blinks, because I need to look up additional functions to make it work. 


Reflection

I found watching the class recording and having the detailed instructions in the tutorial really helpful. Through this exercise, I have learned how to build a simple circuit. It was fun to write the code and build a circuit and test on it. My next steps are to get more familiar with the programming language and learn the affordances of more Internet appliances.    

Drop files here or click to select

You can upload files of up to 20MB using this form.