Back to Parent

Outcome


Intention

First Sketch

Exercise #1

Modify the program to Blink on and off every 3 seconds

https://youtu.be/Fvu5Uzgurug

Show Advanced Options
Show Advanced Options

Exercise #3

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

https://youtube.com/shorts/2XBQcB7MKBc

Show Advanced Options
Show Advanced Options

Exercise #2

Pass the number of times user 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

https://youtu.be/voj6k34X_YQ

Show Advanced Options

Exercise #3

Add a second LED to the circuit.

Change the program and cloud function to allow you to control both LEDs remotely

https://youtu.be/jz31qzILWFY

Show Advanced Options

Process

In reaching the intended goal, I faced several challenges and proceeded through a sequence of actions. Initially, I encountered difficulty due to my lack of familiarity with Particle syntax. To overcome this, I looked into the Lab Docs, specifically searching for information on the "for loop."

While testing the initial code version, which aimed to make the LED blink three times before turning on/off, I encountered an issue where the LED only blinked once. Upon investigation, I realized that I had overlooked including a delay(500) function at the end of the for loop. This absence led the LED to flash so quickly that it escaped human perception.

Moreover, I tackled various parts of the exercise by following the instructions outlined on the DIoT website. I made adjustments to the details and order of the sample code components to observe potential different outcomes. Beyond the guide's instructions, I dedicated more time to practice circuit connection and arrangement, meticulously checking the code for syntax errors, particularly focusing on parentheses and spaces, and engaging with programming syntax files for better comprehension.

Reflection

Reflect on the process of making this project. What did you learn? What would you do differently?

An ongoing challenge I faced was making sure I had set up the circuit correctly. I had found that often times it wasn't working simply because I had a mistake in my wiring where I put the connecting wire in the wrong slot to line up with the LED.

Another lesson learned is the importance of saving multiple versions of the code for future reference when working on new exercises.

I've found the "verify" tool in the online IDE to be extremely useful. Given my familiarity with Python, I tend to forget to include semicolons at the end of each line, and the "verify" feature consistently saves me time by catching these omissions.

Drop files here or click to select

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