Programming with MicroPython: GPIO
Import FutureBoard Library
Import the Library to make use of its functions.
05: GPIO
1. Initiate Pin Mode
Initiates the GPIO with a mode, use P1~P16 for parameter pin.
Possible values for parameter mode:
Digital Input: ‘IN’
Digital Output: ‘OUT’
Analog Input: ‘ANALOG’
Analog Output: ‘PWM’
2. Read a Digital Value
Sample Program
3. Write a Digital Value
Sample Program
4. Read an Analog Value
FutureBoard has a 12-bit ADC, use 10 for 10-bit values and 12 for 12-bit values, default is 12.
Sample Program
5. Write an Analog Value
Sample Program
Last updated