Big delay issuing command to arduino and execution

userHead bhermer 2018-12-29 22:03:08 1771 Views0 Replies


Enhanced (4GB RAM/64GB eMMC)

I tried the Servo demo code found here:

It works for a few seconds and gets slower and slower. I simplified it and just had a console app where I input a number to set the PWM

Code: Select all

arduino.pinMode(9, Arduino.SERVO); arduino.pinMode(13, Arduino.OUTPUT); bool isOn = true; while (true) { arduino.servoWrite(9, int.Parse( Console.ReadLine())); if (isOn) { arduino.digitalWrite(13, Arduino.LOW); isOn = false; } else { arduino.digitalWrite(13, Arduino.HIGH); isOn = true; } } } Between issuing a command to the Arduino, and the Arduino acting on it is over a second? I am looking to control speed controllers through PWM.