跳到主要內容
:::
常用網站 / Arduino 參考資源

1. Arduino

(1) 各種 Arduino 控制板接腳

(2) D1 R32 pinout:https://bpb-ap-se2.wpmucdn.com/blogs.auckland.ac.nz/dist/9/698/files/2021/08/2_Pinout_D1_R32.png

 D1 R32 - ESP32

D1 R32 參考文件:D1_R32_ENG.pdf

(3) 步進馬達

from machine import PWM, Pin
 
class Servo:
    def __init__(self, pin, min=500, max=2400, range=180):
        self.servo = PWM(Pin(pin), freq=50)
        self.period = 20000
        self.minDuty = self.__duty(min)
        self.maxDuty = self.__duty(max)
        self.unit = (self.maxDuty - self.minDuty)/range
 
    def __duty(self, value):
        return int(value/self.period * 1024)
 
    def rotate(self, degree=90):
        val = round(self.unit * degree) + self.minDuty
        val = min(self.maxDuty, max(self.minDuty, val))
        self.servo.duty(val)
 
 

2. 軟體工程師的 AI 工具

 
 
 
推薦給軟體工程師的 AI 工具:https://www.explainthis.io/zh-hant/pinthis/blog/swe-ai-tools
 
使用範例:
(1) 在 esp8266 d1 上用 micropython 點亮一個 LED
(2) 在 esp8266 d1 上用 micropython 控制一個 LED閃爍
 
 
 
 
 
 

消息公佈欄

跳至網頁頂部