Stamp FPC12
StampF12 maps the one-based connector positions of the Stamp Series FPC12
connector to GPIO numbers on the current Stamp host. It supports StampC5,
StampC6, and StampS3Mini.
Pin Mapping
Position |
StampC5 |
StampC6 |
StampS3Mini |
|---|---|---|---|
1 |
3V3 |
3V3 |
3V3 |
2 |
3V3 |
3V3 |
3V3 |
3 |
G23 |
G8 |
G38 |
4 |
G0 |
G0 |
G21 |
5 |
G24 |
G18 |
G39 |
6 |
G25 |
G19 |
G40 |
7 |
GND |
GND |
GND |
8 |
G26 |
G20 |
G41 |
9 |
G27 |
G21 |
G42 |
10 |
G11 |
G22 |
G43 |
11 |
GND |
GND |
GND |
12 |
G12 |
G23 |
G44 |
Positions 1 and 2 are 3.3 V. Positions 7 and 11 are ground. They are not returned as GPIO signals.
MicroPython Example
The following example obtains the GPIO at FPC12 position 4 on the current Stamp host.
MicroPython Code Block:
from stamp import StampF12 f12 = StampF12() pin = f12.pin(4) print(pin)
API
class StampF12
Constructors
- class stamp.StampF12
Create an FPC12 position mapper for the current Stamp host.
- 抛出:
NotImplementedError – If the current board is not StampC5, StampC6, or StampS3Mini.
Methods
- StampF12.pin(position)
Return the GPIO number assigned to a connector position.
- 参数:
position (int) – One-based FPC12 position.
- 返回:
GPIO number for the current Stamp host.
- 返回类型:
- 抛出:
ValueError – If the position is outside 1-12 or is a power or ground position.