Go back to Product Documents Navigation
Go back to Future Board Documents Navigation
Import FutureBoard Library
Import the Library to make use of its functions.
from future import * |
05: GPIO
1. Initiate Pin Mode
MeowPin(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
getDigital() |
Sample Program
from future import * |
3. Write a Digital Value
setDigital(val) |
Sample Program
from future import * |
4. Read an Analog Value
getAnalog(width) |
FutureBoard has a 12-bit ADC, use 10 for 10-bit values and 12 for 12-bit values, default is 12.
Sample Program
from future import * |
5. Write an Analog Value
setAnalog(val) |
Sample Program
from future import * |
If you have any question, please feel free to contact us at Discord, we will always be there to help.
KittenBot Team