这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
saks:sdk [2017/01/23 11:41] Spoony |
saks:sdk [2017/01/23 14:12] (当前版本) Spoony |
||
---|---|---|---|
行 2: | 行 2: | ||
====== SAKS SDK 开发文档 ====== | ====== SAKS SDK 开发文档 ====== | ||
SAKS SDK 基于 RPi GPIO 用 Python 语言实现。(另有一份由 SuperFashi [[https://github.com/hanbang-wang/SAKS-SDK-GO|用 GO 语言实现的版本]],使用方法类同) | SAKS SDK 基于 RPi GPIO 用 Python 语言实现。(另有一份由 SuperFashi [[https://github.com/hanbang-wang/SAKS-SDK-GO|用 GO 语言实现的版本]],使用方法类同) | ||
+ | |||
+ | ---- | ||
===== 源码目录结构 ===== | ===== 源码目录结构 ===== | ||
<code> | <code> | ||
- | #IO 口编号定义 | + | sakspins.py #IO 口编号定义 |
- | sakspins.py | + | sakshat.py #GPIO 对象、功能定义,对象初始化 |
+ | main.py #主程序 | ||
+ | entities\ #SDK 以面向对象方式封装的各种元件类 | ||
+ | entities\buzzer.py #蜂鸣器 | ||
+ | entities\digital_display.py #数码管 | ||
+ | entities\digital_display_tm1637.py #TM1637驱动下的数码管 | ||
+ | entities\dip_switch_2bit.py #2位拨码开关 | ||
+ | entities\ds18b20.py #18B20温度传感器 | ||
+ | entities\ic_74hc595.py #74HC595 IC | ||
+ | entities\ic_tm1637.py #TM1637 ID | ||
+ | entities\led.py #LED | ||
+ | entities\led_74hc595.py #74HC595驱动下的LED | ||
+ | entities\tact.py #轻触开关 | ||
+ | </code> | ||
- | #GPIO 对象、功能定义,对象初始化 | + | ---- |
- | sakshat.py | + | |
- | + | ||
- | #主程序 | + | |
- | main.py | + | |
- | + | ||
- | #SDK 以面向对象方式封装的各种元件类 | + | |
- | entities\ | + | |
- | + | ||
- | #蜂鸣器 | + | |
- | entities\buzzer.py | + | |
- | + | ||
- | #数码管 | + | |
- | entities\digital_display.py | + | |
- | + | ||
- | #TM1637驱动下的数码管 | + | |
- | entities\digital_display_tm1637.py | + | |
- | + | ||
- | #2位拨码开关 | + | |
- | entities\dip_switch_2bit.py | + | |
- | + | ||
- | #18B20温度传感器 | + | |
- | entities\ds18b20.py | + | |
- | + | ||
- | #74HC595 IC | + | |
- | entities\ic_74hc595.py | + | |
- | + | ||
- | #TM1637 ID | + | |
- | entities\ic_tm1637.py | + | |
- | + | ||
- | #LED | + | |
- | entities\led.py | + | |
- | + | ||
- | #74HC595驱动下的LED | + | |
- | entities\led_74hc595.py | + | |
- | + | ||
- | #轻触开关 | + | |
- | entities\tact.py | + | |
- | </code> | + | |
===== 类库 ===== | ===== 类库 ===== | ||
- | ==== class SAKSHAT(object): ==== | + | * [[saks:sdk:libraries:sakshat|SAKSHAT]] - HAT 类 |
- | + | * [[saks:sdk:libraries:sakspins|SAKSPins]] - IO 口编号类 | |
- | + | * [[saks:sdk:libraries:buzzer|Buzzer]] - 蜂鸣器类 | |
- | ==== class SAKSPins(object): ==== | + | * [[saks:sdk:libraries:digitaldisplay|DigitalDisplay]] - 数码管类 |
- | + | * [[saks:sdk:libraries:digitaldisplaytm1637|DigitalDisplayTM1637]] - 数码管类(TM1637驱动) | |
- | + | * [[saks:sdk:libraries:dipswitch2bit|DipSwitch2Bit]] - 2 位拨码开关类 | |
- | ==== class Buzzer(object): ==== | + | * [[saks:sdk:libraries:ds18b20|DS18B20]] - 18B20 温度传感器类 |
- | + | * [[saks:sdk:libraries:ic_74hc595|IC_74HC595]] - 74HC595 IC类 | |
- | + | * [[saks:sdk:libraries:ic_tm1637|IC_TM1637]] - TM1637 IC类 | |
- | ==== class DigitalDisplay(object): ==== | + | * [[saks:sdk:libraries:led|Led]] - LED 类 |
- | + | * [[saks:sdk:libraries:ledrow|LedRow]] - LED 灯组类 | |
- | + | * [[saks:sdk:libraries:led74hc595|Led74HC595]] - LED 灯组类(74HC595驱动) | |
- | ==== class DigitalDisplayTM1637(object): ==== | + | * [[saks:sdk:libraries:tact|Tact]] - 轻触开关类 |
- | + | * [[saks:sdk:libraries:tactrow|TactRow]] - 轻触开关组类 | |
- | + | ||
- | ==== class DipSwitch2Bit(object): ==== | + | |
- | + | ||
- | + | ||
- | ==== class DS18B20(object): ==== | + | |
- | + | ||
- | + | ||
- | ==== class IC_74HC595(object): ==== | + | |
- | + | ||
- | + | ||
- | ==== class IC_TM1637(object): ==== | + | |
- | + | ||
- | + | ||
- | ==== class Led(object): ==== | + | |
- | + | ||
- | + | ||
- | ==== class Led74HC595(object): ==== | + | |
- | + | ||
- | + | ||
- | ==== class Tact(object): ==== | + | |
- | + | ||
+ | ---- | ||
+ | ===== 资源链接 ===== | ||
+ | [[http://shumeipai.nxez.com/2015/09/21/saks-sdk-released.html|SAKS-SDK 获取方法]]\\ | ||
+ | [[https://github.com/spoonysonny/SAKS-SDK|GitHub SAKS-SDK 源码库]]\\ | ||
+ | [[https://github.com/spoonysonny/SAKS-tutorials|GitHub SAKS-SDK 示例(教程)源码库]]\\ | ||
+ | [[http://shumeipai.nxez.com/swiss-army-knife-shield-for-raspberry-pi-diy-tutorials|SAKS-SDK 示例(教程)详解]]\\ | ||
+ | [[http://shumeipai.nxez.com/swiss-army-knife-shield-for-raspberry-pi|SAKS 扩展板硬件介绍]]\\ | ||
+ | [[http://link.nxez.com/spoony/cps-products-saks|SAKS 扩展板硬件购买]] |