Back to Parent

Outcome


Intention

Write about the big ideas behind your project? What are the goals? Why did you make it? What are your motivations?

Version 0 - Passing in a "HIGH" string will turn on the orange LED; passing in a "LOW" string will turn off the orange LED. See demo video: https://drive.google.com/file/d/1dqj0dsoVUYIw0fpd4gcAhik4_wF0J-ig/view?usp=share_link 

Version 1 - On the basis of Version 0, the LED will blink 3 times before it is turned on/off. See demo video: https://drive.google.com/file/d/1GNsxG6njzVvX49DPNpF38gPeqI2JPiec/view?usp=share_link 

Version 2 - Passing in a number, the LED will blink the passed-in number of times. See demo video (passing in 3): https://drive.google.com/file/d/1GSuFfpTnzFkQWIJe60ZTxAa68LWQynvf/view?usp=share_link 

Version 3 - On the basis of Version 2, two LEDs will alternate to blink, each blinks the passed-in number of times. See demo video (passing in 5): https://drive.google.com/file/d/1-QLkOcKkAvCAHAop8h1uesgGowwv_v0_/view?usp=share_link 

Process

Describe the process you underwent to reach the outcome (problems encountered, how you resolved them, as well as, experiments, hacks, tests, refinements, iterations, failures)

Firstly, I was not familiar with the syntax used in Particle, so I searched "for loop" in Particle Docs and found a syntax reference: https://docs.particle.io/reference/device-os/api/language-syntax/control-structures/#for. This was very helpful as it included all basic syntax like if-else condition, operators, loops, and etc.

When I tested my code for version 1 (blinking 3 times before LED on/off), it only blinked once. Then I realized that I did not put delay(500) at the end of the for loop, so the LED was quickly turned off and back on that human eyes could not notice. 

Reflection

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

  1. I would say a difficulty that remains is that I cannot "print" variables' values when the code is running so it is harder to debug. I wonder if there's a way to track down which step went wrong.
  2. I also learned that it is helpful to save multiple versions of code so I can reference back when coding for new exercises.
  3. Verify is a very useful tool in the online IDE. Being used to python, I tend to omit the semicolon at the end of each row, and the verify feature saves me all the time. 

Show Advanced Options
Show Advanced Options
Show Advanced Options
Show Advanced Options
Drop files here or click to select

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