我们想用PWM控制灯,灯是高电平灭,低电平亮。
调用
Code: Select all
void pwm_set_duty(uint32 duty, uint8 channel);
进行占空比控制。
由于duty是uint32,所以我传了个-1进去,发现灯不能全灭,还有有点微微亮起,即
Code: Select all
pwm_set_duty(-1, channel);
是我的使用方式有问题,还是本身pwm有问题,用以前版本的sdk是可以使灯全灭的。


Postby Simpleyyt » Fri Jun 05, 2015 2:52 pm
Code: Select all
void pwm_set_duty(uint32 duty, uint8 channel);
Code: Select all
pwm_set_duty(-1, channel);
Postby costaud » Mon Jun 08, 2015 10:48 am
Simpleyyt wrote:esp sdk v1.1.0中新版的PWM并没有使用说明。
我们想用PWM控制灯,灯是高电平灭,低电平亮。
调用Code: Select all
void pwm_set_duty(uint32 duty, uint8 channel);
进行占空比控制。
由于duty是uint32,所以我传了个-1进去,发现灯不能全灭,还有有点微微亮起,即Code: Select all
pwm_set_duty(-1, channel);
是我的使用方式有问题,还是本身pwm有问题,用以前版本的sdk是可以使灯全灭的。![]()
Users browsing this forum: No registered users and 116 guests
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.