Difference: LEDsAndNopNeoPixel (4 vs. 5)

Revision 52020-05-22 - UliRaich

Line: 1 to 1
 
META TOPICPARENT name="Exercises"

LEDs and NeoPixel

Introduction

Line: 10 to 10
 You can see the LEDs in the far left, bottom corner. The power LED is marked "ON" while the user programmable one is marked "L".

The NeoPixel is based on the WS2812 addressable RGB LED which is often used in LED chains. In our case we have 6 LEDs arranged in a ring with a 7th one placed in the center of the ring.

Changed:
<
<
leds.png

Again the LEDs are accessible, this time through a dedicate serial protocol, on a GPIO line. For the board we are using the GPIO line can be selected with solder jumpers. The jumpers were set to D0 or GPIO 26.

>
>
WS2812 LEDs front WS2812 LEDs back
leds.png ledRingBack.png
Again the LEDs are accessible, this time through a dedicated serial protocol, on a single GPIO line. For the board we are using the GPIO line can be selected with solder jumpers. If you look at the photo of the board's back side very closely you will see that the jumper was set to D0 or GPIO 26 on the ESP32.
 

Further introductory remarks:

Changed:
<
<
In comparison with the first exercise session these exercises are rather simple. This is mainly due to the fact that all difficulties in accessing the devices is hidden from you in the drivers which are part of MicroPython. If you want to know what is going on behind the scene please have a look at https://www.parallax.com/sites/default/files/downloads/28085-WS2812B-RGB-LED-Datasheet.pdf
>
>
In comparison with the first exercise session these exercises are rather simple. This is mainly due to the fact that all difficulties in accessing the devices are hidden from you in the drivers which are part of MicroPython. If you want to know what is going on behind the scene please have a look at https://www.parallax.com/sites/default/files/downloads/28085-WS2812B-RGB-LED-Datasheet.pdf
 

Exercise 1: Switching the user LED with REPL

It is actually very easy to access the LED because all you need is already available in MicroPython. Just look it up at
https://docs.micropython.org/en/latest/esp32/quickref.html#pins-and-gpio and try the example using GPIO pin 2. Don't write a script just yet but switch the LED on and off with REPL.

Line: 36 to 35
 -- Uli Raich - 2020-05-05

Exercise 5: The WS2812 addressable LED

Changed:
<
<
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.
>
>
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. Fortunately a driver for the WS2812 running on the ESP32 is already integrated into the MicroPython binary.
  Warning: The WS2812 produces very bright light! Do not look into it directly or reduce the light intensity by software.
Line: 53 to 52
 
META FILEATTACHMENT attachment="leds.png" attr="" comment="" date="1588704015" name="leds.png" path="leds.png" size="299673" user="UliRaich" version="1"
META FILEATTACHMENT attachment="esp32.png" attr="" comment="" date="1588704164" name="esp32.png" path="esp32.png" size="231244" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="ledRingBack.png" attr="" comment="" date="1590133836" name="ledRingBack.png" path="ledRingBack.png" size="356910" user="UliRaich" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback