The Pin() class takes three parameters as shown below: Pin(Pin_number, pin_mode, pull, value) But user can give any name to an object such as led13, led_13, etc. In this line, we create an instance of the Pin object “led”. import time Creating Instance of Pin ClassĪs mentioned earlier, we can create multiple objects of an “led” class which we defined above. For example, we can use a sleep() method to insert delays into our MicroPython script. The time module in MicroPython contains different methods such as delay, sleep, etc. Recommended Reading: Raspberry Pi Pico – Getting Started Guide These 26 GPIO pins can be used both in digital input and digital output mode. GP26, GP27, and GP28 are the next digital pins available. GP23, GP24, and GP25 are not exposed on the pinout. These digital pins are marked as GP0, GP1, and up to GP22. Out of these 26 pins, 23 pins are digital pins, and only 3 pins have Analog read capability. Raspberry Pi Pico exposes 26 multi-function GPIO pins from a total of 36 GPIO pins available in RP2040 microcontroller. These are controlled by us during run time. These are digital signal pins found on the module which can be used as the input, output, and even both of them can be used together. GPIO is the abbreviated form of General Purpose Input/Output. Let us learn about the GPIOs for Raspberry Pi Pico to help us better understand the connections.
0 Comments
Leave a Reply. |