We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can devicescript use PWM? For example, micropython does this:
from machine import Pin, PWM import time # 配置PWM引脚 ir_pin = Pin(14, Pin.OUT) pwm = PWM(ir_pin, freq=36000) # 设置载波频率为36KHz # 发送一个简单的红外信号 def send_ir_signal(): pwm.duty(512) # 设置占空比,50%占空比 time.sleep_ms(100) # 发送100ms的信号 pwm.duty(0) # 关闭信号 time.sleep_ms(100) # 间隔100ms # 主循环 while True: send_ir_signal() time.sleep(1) # 每秒发送一次
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Can devicescript use PWM?
For example, micropython does this:
The text was updated successfully, but these errors were encountered: