差别
这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
mp_quick_reference [2021/10/02 22:26] gongyusu [7. PWM] |
mp_quick_reference [2021/10/16 15:23] (当前版本) gongyusu |
||
---|---|---|---|
行 2: | 行 2: | ||
{{:pico_learningkit_functions.png|}}<WRAP centeralign> PICO学习板功能及对应的管脚</WRAP> | {{:pico_learningkit_functions.png|}}<WRAP centeralign> PICO学习板功能及对应的管脚</WRAP> | ||
- | ### 1. 通用的板卡控制 | + | #### 1. 通用的板卡控制 |
<code python> | <code python> | ||
import pyb | import pyb | ||
行 14: | 行 13: | ||
</code> | </code> | ||
- | ### 2. 延迟和定时 | + | #### 2. 延迟和定时 |
<code python> | <code python> | ||
行 27: | 行 26: | ||
- | ### 3. LEDs | + | #### 3. LEDs |
<code python> | <code python> | ||
from machine import Pin | from machine import Pin | ||
- | led_y = Pin(16,Pin.OUT) | + | led_y = Pin(20,Pin.OUT) |
- | led_r = Pin(19,Pin.OUT) | + | led_r = Pin(26,Pin.OUT) |
- | led_g = Pin(18,Pin.OUT) | + | led_g = Pin(22,Pin.OUT) |
- | led_b = Pin(17,Pin.OUT) | + | led_b = Pin(21,Pin.OUT) |
</code> | </code> | ||
- | ### 4. 板上按键 | + | #### 4. 板上按键 |
<code python> | <code python> | ||
行 50: | 行 49: | ||
- | ### 5. 管脚和GPIO | + | #### 5. 管脚和GPIO |
<code python> | <code python> | ||
行 64: | 行 63: | ||
- | ### 6. 定时器 | + | #### 6. 定时器 |
<code python> | <code python> | ||
行 76: | 行 75: | ||
- | ### 7. PWM | + | #### 7. PWM |
<code python> | <code python> | ||
行 89: | 行 88: | ||
- | ### 8. ADC | + | #### 8. ADC |
<code python> | <code python> | ||
行 99: | 行 98: | ||
- | ### 9. UART | + | #### 9. UART |
<code python> | <code python> | ||
行 110: | 行 109: | ||
- | ### 10. SPI总线 | + | #### 10. SPI总线 |
<code python> | <code python> | ||
行 122: | 行 121: | ||
- | ### 11. I2C总线 | + | #### 11. I2C总线 |
<code python> | <code python> | ||
行 140: | 行 139: | ||
- | ### 12. 姿态传感器 | + | #### 12. 姿态传感器 |
<code python> | <code python> | ||
行 150: | 行 149: | ||
- | ### 13. WS2812B控制 | + | #### 13. WS2812B控制 |
<code python> | <code python> | ||
行 157: | 行 156: | ||
- | ### 14. 蜂鸣器的控制 | + | #### 14. 蜂鸣器的控制 |
<code python> | <code python> |