//DC-Motor_control //XIAO RP2040 //based on hello.TB67H451.RP2040.ino by Neil Gershenfeld uint32_t duty_min = int(0.65*65535); uint32_t duty_max = int(0.75*65535); uint32_t delay_ms = 500; void setup() { analogWriteFreq(100000); analogWriteRange(65535); } void loop() { analogWrite(D4,0); analogWrite(D5,duty_min); delay(delay_ms); // analogWrite(D4,duty_min); analogWrite(D5,0); delay(delay_ms); // analogWrite(D4,0); analogWrite(D5,duty_max); delay(delay_ms); // analogWrite(D4,duty_max); analogWrite(D5,0); delay(delay_ms); }