Np = np = (0, 0, 0) # turn OFF the NeoPixel LEDs Np = neopixel.NeoPixel(machine.Pin(NPLED), n_NPLED) The first test helps you in understanding how the neopixel library: import machine, neopixel, time As for the previous tests, please remember to power on the Wukong2040 power switch. In order to test them, I’ve arranged 2 MicroPython tests. You can reach both of them via the Raspberry PI Pico GP22 port. The two NeoPixel LEDs are placed near the buttons from the previous test: Please remember to power on the Wukong2040 power switch and then you can run the code to activate/deactivate the Raspberry PI Pico W onboard LED with the two buttons. The same code is also available from my download area: wukong2040-buttons-test.py Off_button = Pin(button_b, Pin.IN, Pin.PULL_UP) On_button = Pin(button_a, Pin.IN, Pin.PULL_UP) The following MicroPython example code will activate the Raspberry PI Pico W onboard LED when you press the A button, while the LED will be powered off when you press the B button: from machine import Pin The A button is connected to GP18, while the output of the B button goes to GP19. A comprehensive tutorial on these electronic components is available from my Switch Button and Raspberry PI Pico tutorial. They (correctly) use a negative logic: when you press the button, the related GP output goes to 0 (zero). Wukong2040 PinoutĪs the expansion board has a specific housing for the Raspberry PI Pico microcontroller, that takes all the Pico PINs (see the Raspberry PI Pico pinout for reference), their output will be “redirected” to specific Wukong PINs as shown in the following picture: In this review, I’ll provide you with several examples to use it with Raspberry PI Pico W, using MicroPython. So, having the battery to provide the current makes your projects far safer.Īs the Wukong2040 requires a 2,8 – 4,2 V input to charge the battery, you can also add a solar source, as shown in my power Raspberry PI Pico with Solar Cells tutorial, to get a green project.ĮLECFREAKS provides beginners with a number of examples that can help you quickly get started, based on CircuitPython and Raspberry PI Pico. The motors usually drain a lot of current and the Raspberry PI Pico ports can support only a few mA of power drain for a long time (usually 30 mA for the output ports, with a max 300 mA as total output of the microcontroller). It is ok if you are performing tests for your code, but it isn’t good when your project goes live. Sometimes, people running the first projects connect motors directly to the Raspberry PI Pico GP ports. 7×11 square block frame base, that can be expanded in order to create shapes at your fantasyĪn important feature of the Wukong2040 is that it allows you to power motors from the battery.1x power switch OFF (that cuts the power from the battery).1x Reset Button (useful for development).4 ways DC Motor Drivers (M1, M2, M3, and M4).The expansion board brings into a single working block several additional pieces that make the board really interesting for anyone wishing to start with Raspberry PI Pico microelectronics projects: With this battery, the ELECFREAKS estimates a duration of at least 120 minutes of normal use, but this depends on the battery capacity and I think that such a battery can last far more by using power management tricks as referenced in my Raspberry PI Pico W Power Consumption (mA) and How to Reduce It tutorial (unless you need to move motors). It supports one 18650 battery (that you have to provide separately) with an onboard power management chip and power indication. WuKong2040 is a multifunctional expansion board designed for Raspberry Pi Pico microcontrollers. In the microelectronics hobbyist world, it can provide protection for the guest board power and brings a number of sensors pre-connected to the guest board placement.Įxpansion Boards make the wiring job easier for beginners and sometimes provide protection against power outages by adding a specific power supply line. Usually, every expansion board is designed for specific hardware. What is an Expansion BoardĪn Expansion Board is a PCB (Printed Circuit Board) that adds a guest board with new features. This tutorial will show you the features of this interesting Wukong2040 Raspberry PI Pico expansion board, also bringing code examples with MicroPython. ( 0) The ELECFREAKS Wukong2040 is a Raspberry PI Pico expansion board enabling beginners to get live with their simple to medium complexity projects, with a safe battery power source and a simplified PINs connection
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |