pinMode(), digitalWrite(), digitalRead(). More...
Functions | |
| uint8_t | digitalPinToGpio (pin_size_t pin) |
| RP2040 GPIO behind an Arduino pin, for use with the pico-sdk. | |
| void | pinMode (pin_size_t pinNumber, PinMode pinMode) |
| Sets a pin as an input or an output. | |
| void | digitalWrite (pin_size_t pinNumber, PinStatus status) |
| Sets an output pin HIGH (3.3 V) or LOW (0 V). | |
| PinStatus | digitalRead (pin_size_t pinNumber) |
| Reads the level on a pin. | |
pinMode(), digitalWrite(), digitalRead().
All pins are 3.3 V. A3-A5 are analog only: digital functions ignore them.
|
inline |
RP2040 GPIO behind an Arduino pin, for use with the pico-sdk.
| pin | Arduino pin number (e.g. 2, A0, LED_BUILTIN). |
| PinStatus digitalRead | ( | pin_size_t | pinNumber | ) |
Reads the level on a pin.
Works in any mode, including OUTPUT (it reads back the pin). Inputs are HIGH above about 2 V and LOW below about 0.8 V.
| pinNumber | Arduino pin. |
| void digitalWrite | ( | pin_size_t | pinNumber, |
| PinStatus | status ) |
Sets an output pin HIGH (3.3 V) or LOW (0 V).
What it does depends on the pin's mode:
| pinNumber | Arduino pin. A3-A5 and numbers out of range are ignored. |
| status | HIGH or LOW. |
| void pinMode | ( | pin_size_t | pinNumber, |
| PinMode | pinMode ) |
Sets a pin as an input or an output.
Also stops analogWrite() or tone() output on the pin and returns it to a plain digital pin.
| pinNumber | Arduino pin (e.g. 2, A0, LED_BUILTIN). A3-A5 and numbers out of range are ignored. |
| pinMode | One of:
|