Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
LEDs and NeoPixelIntroduction | ||||||||
Line: 31 to 31 | ||||||||
Exercise 4: Change the LED light intensity | ||||||||
Changed: | ||||||||
< < | The light intensity on the LED can be changed if we do not supply a fixed signal level to it but a frequency. The duty cycle of the signal determines the light intensity. Write a program that increases the intensity in a linear fashion and the decreases it again linearly. | |||||||
> > | The light intensity on the LED can be changed if we do not supply a fixed signal level to it but a frequency. The duty cycle of the signal determines the light intensity. This is called Pulse Width Modulation or PWM for short. Write a program that increases the intensity in a linear fashion and the decreases it again linearly. | |||||||
-- Uli Raich - 2020-05-05 | ||||||||
Changed: | ||||||||
< < | Exercise 4: The WS2812 addressable LED | |||||||
> > | Exercise 5: The WS2812 addressable LED | |||||||
The WS2812 LED is often used in LED chains. It is an RGB LED using a single data line which can be cascaded. It has a data in pin and a data out pin where the data out pin is connected to the data in pin of the following LED. It uses a serial protocol that must be precisely timed. For more information please consult the data sheet. Fortunatelly a driver for the WS2812 running on the ESP32 is already integrate into the MicroPython binary. Warning: The WS2812 produces very bright light! Do not look into it directly or reduce the light intensity by software. The RGB LED chain has 7 LEDs installed on its PCB. Write a program that allows you to find out which LED corresponds to which address. To do so, please switch on a single LED e.g. its red component, and print out the corresponding address. Wait for 5s before you switch on the next LED. Only a single LED should light for each of the seven addresses. | ||||||||
Changed: | ||||||||
< < | Exercise 5: Change the Colors | |||||||
> > | Exercise 6: Change the Colors | |||||||
Write a program that consecutively switches on the LEDs in different colors. First switch on the red component of the LED with address 0 then add the one with address 1 etc. Once all LEDs are red, switch them off again, change the color to green and repeat the cycle. Finally do the same for the blue component. Wait for 1 s before switching the LEDs. | ||||||||
Added: | ||||||||
> > | Exercise 7: Change to CCWIn exercise 6 the LEDs will turn on clockwise (cw). Modify the program such that the LEDs turn on counter clock wise (ccw). | |||||||
Comments |