增加 Ecology 大类.
Signed-off-by: lion.chan <cy187lion@sina.com>
|
@ -68,6 +68,7 @@
|
|||
- [在线转换文件](https://onlineconvertfree.com/zh/)
|
||||
- [RF Tools](https://rf-tools.com)
|
||||
- [LC 滤波器设计工具](https://rf-tools.com/lc-filter/)
|
||||
- [wokwi 开源硬件仿真(树莓派、Arduino等)](https://wokwi.com/)
|
||||
|
||||
## 2. 镜像网站
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# pyBoard (STM32F405) 资源总结
|
||||
|
||||
- [pyBoard (STM32F405) 资源下载](https://download.01studio.cc/zh_CN/latest/micropython/pyboard/pyboard.html)
|
||||
- [MicroPython 文档(中文)](https://docs.01studio.cc/index.html),分为
|
||||
- Python 标准库和 micro 库
|
||||
- MicroPython 特定库
|
||||
- 各类开发板专用库
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
@ -0,0 +1,72 @@
|
|||
# Raspberry Pi Pico 资源总结
|
||||
|
||||
## API、Demo 及网络资源
|
||||
|
||||
- [Raspberry Pi Pico and Pico W 官网说明及资源](https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html)
|
||||
- [MicroPython documentation](https://docs.micropython.org/en/latest/index.html):分为
|
||||
- Python standard libraries and micro-libraries
|
||||
- MicroPython-specific libraries
|
||||
- Port-specific libraries:其中 rp2 为 Raspberry Pi Pico 的 Port-specific library.
|
||||
- [MicroPython 文档(中文版)](http://www.86x.org/en/latet/index-2.html)
|
||||
|
||||
## 特定功能代码段
|
||||
|
||||
### 测量 PWM 周期和占空比
|
||||
|
||||
```python
|
||||
from machine import Pin, PWM
|
||||
from rp2 import PIO, StateMachine, asm_pio
|
||||
import time
|
||||
|
||||
@rp2.asm_pio(set_init=rp2.PIO.IN_LOW, autopush=True, push_thresh=32)
|
||||
def period():
|
||||
wrap_target()
|
||||
set(x, 0)
|
||||
wait(0, pin, 0) # Wait for pin to go low
|
||||
wait(1, pin, 0) # Low to high transition
|
||||
label('low_high')
|
||||
jmp(x_dec, 'next') [1] # unconditional
|
||||
label('next')
|
||||
jmp(pin, 'low_high') # while pin is high
|
||||
label('low') # pin is low
|
||||
jmp(x_dec, 'nxt')
|
||||
label('nxt')
|
||||
jmp(pin, 'done') # pin has gone high: all done
|
||||
jmp('low')
|
||||
label('done')
|
||||
in_(x, 32) # Auto push: SM stalls if FIFO full
|
||||
wrap()
|
||||
|
||||
@rp2.asm_pio(set_init=rp2.PIO.IN_LOW, autopush=True, push_thresh=32)
|
||||
def mark():
|
||||
wrap_target()
|
||||
set(x, 0)
|
||||
wait(0, pin, 0) # Wait for pin to go low
|
||||
wait(1, pin, 0) # Low to high transition
|
||||
label('low_high')
|
||||
jmp(x_dec, 'next') [1] # unconditional
|
||||
label('next')
|
||||
jmp(pin, 'low_high') # while pin is high
|
||||
in_(x, 32) # Auto push: SM stalls if FIFO full
|
||||
wrap()
|
||||
|
||||
pin16 = Pin(16, Pin.IN, Pin.PULL_UP)
|
||||
sm0 = rp2.StateMachine(0, period, in_base=pin16, jmp_pin=pin16)
|
||||
sm0.active(1)
|
||||
sm1 = rp2.StateMachine(1, mark, in_base=pin16, jmp_pin=pin16)
|
||||
sm1.active(1)
|
||||
|
||||
pwm = PWM(Pin(17))
|
||||
pwm.freq(1000)
|
||||
pwm.duty_u16(0xffff // 3)
|
||||
|
||||
# Clock is 125MHz. 3 cycles per iteration, so unit is 24.0ns
|
||||
def scale(v):
|
||||
return (1 + (v ^ 0xffffffff)) * 24e-6 # Scale to ms
|
||||
|
||||
while True:
|
||||
period = scale(sm0.get())
|
||||
mark = scale(sm1.get())
|
||||
print(period, mark, mark/period)
|
||||
time.sleep(0.2)
|
||||
```
|
Before Width: | Height: | Size: 361 KiB After Width: | Height: | Size: 361 KiB |
Before Width: | Height: | Size: 231 KiB After Width: | Height: | Size: 231 KiB |
|
@ -0,0 +1,4 @@
|
|||
# RP2040 LCD 096 资源总结
|
||||
|
||||
- [RP2040-LCD-0.96](https://www.waveshare.net/wiki/RP2040-LCD-0.96#LCD1602_I2C_.E5.AE.9E.E9.AA.8C)
|
||||
- [微雪 Wiki 主页](https://www.waveshare.net/wiki/Main_Page)
|