feat: 全量同步 254 个常用的 Arduino 扩展库文件
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
This is a library for the MCP23017 I2c Port Expander
|
||||
|
||||
These chips use I2C to communicate, 2 pins required to interface
|
||||
|
||||
Adafruit invests time and resources providing this open source code,
|
||||
please support Adafruit and open-source hardware by purchasing
|
||||
products from Adafruit!
|
||||
|
||||
Written by Limor Fried/Ladyada for Adafruit Industries.
|
||||
BSD license, check license.txt for more information
|
||||
All text above must be included in any redistribution
|
||||
|
||||
To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_MCP23017. Check that the Adafruit_MCP23017 folder contains Adafruit_MCP23017.cpp and Adafruit_MCP23017.h
|
||||
|
||||
Place the Adafruit_MCP23017 library folder your <arduinosketchfolder>/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.
|
||||
|
||||
Pin Addressing
|
||||
==============
|
||||
|
||||
When using single pin operations such as _pinMode(pinId, dir)_ or _digitalRead(pinId)_ or _digitalWrite(pinId, val)_ then the pins are addressed using the ID's below. For example, for set the mode of _GPB0_ then use _pinMode(8, ...)_.
|
||||
|
||||
Physial Pin #| Pin Name | Pin ID
|
||||
----|------|------------------------------
|
||||
21 | GPA0 | 0
|
||||
22 | GPA1 | 1
|
||||
23 | GPA2 | 2
|
||||
24 | GPA3 | 3
|
||||
25 | GPA4 | 4
|
||||
26 | GPA5 | 5
|
||||
27 | GPA6 | 6
|
||||
28 | GPA7 | 7
|
||||
1 | GPB0 | 8
|
||||
2 | GPB1 | 9
|
||||
3 | GPB2 | 10
|
||||
4 | GPB3 | 11
|
||||
5 | GPB4 | 12
|
||||
6 | GPB5 | 13
|
||||
7 | GPB6 | 14
|
||||
8 | GPB7 | 15
|
||||
Reference in New Issue
Block a user