Created
October 15, 2022 12:45
-
-
Save horsley/60cf57a8506812fa259c3c6fb7184ba9 to your computer and use it in GitHub Desktop.
热水器方波信号,mock水流传感器
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LED_GPIO 26 | |
#define PWM1_Ch 0 | |
#define PWM1_Res 10 | |
#define PWM1_Freq 50 | |
void setup() { | |
// put your setup code here, to run once: | |
ledcAttachPin(LED_GPIO, PWM1_Ch); | |
ledcSetup(PWM1_Ch, PWM1_Freq, PWM1_Res); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
ledcWrite(PWM1_Ch, 50); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment