Back to Parent

Outcome


Outcome

    • This should provide at least one clear illustration of the final outcome (photo or video as appropriate).

Exercise 1: Learning to connect the Neopixel such that each pixel lights up one by one in Blue

Show Advanced Options
Show Advanced Options

Exercise 2: Turning Neopixel on pixel by pixel and then reversing the sequence turning each pixel off one by one.

Show Advanced Options
Show Advanced Options

Exercise 3: Turning Neopixel on pixel by pixel in Blue and then reversing the sequence turning each pixel off one by one. This repeated as a cycle of Blue followed by a cycle of Green followed by a cycle of Red.

Show Advanced Options
Show Advanced Options

Exercise 4: Light up only one pixel at a time. With each loop move that pixel one position higher. When it reaches the final pixel, restart the sequence at zero i.e. build a single pixel that will continually cycle.

Show Advanced Options
Show Advanced Options
Exercise 5: Add three Particle.function to set the Red, Green and Blue components. Allow these values to be set from 0-255 and as they are set to change all of the pixels on the LED strip to that color.
Show Advanced Options
Show Advanced Options

Exercise 6: Create an ambient calendar alert using a Neopixel strip to send an alert to my device a few minutes before an appointment.

I broke this apart into pieces as advised on the website and first learnt how to work with mills()in order to change color from red to blue. It took me multiple attempts and many hours to understand the syntax, I'm still not an expert but I think I understand the logic of syntax better thanks to this struggle.

Show Advanced Options
Show Advanced Options

Reflection

  • I struggled with the particle.function (in exercise 5) because I realized I hadn't understood the syntax really well. This consumed a lot of time for me and I sought a classmate's help and learnt the following:
  • Functions for particle.function start with an 'int' and take only strings (not variables). Hence, first you call out the string through an int, then convert the string to an integer and then use the newly converted int to define something, which in this case is color.
  • Function always has to have a return command, I learnt this the hard way by learning how to writ ethe following syntax:

int setRed(String f){ //functions for particle.function start with an int and take only string commands

int rValue = f.toInt(); //first:convert string to number

uint32_t red = strip.Color(rValue, 0, 0); //second: use the newly converted int to define color

uint16_t i;

for (i=0; i < strip.numPixels(); i++){

strip.setPixelColor(i, red);

strip.show();

}

delay(500);

return 1;

Drop files here or click to select

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