Big delay issuing command to arduino and execution

userHead bhermer 2018-12-30 06:03:08 1867 Views0 Replies

Hi,

Enhanced (4GB RAM/64GB eMMC)

I tried the Servo demo code found here:

https://docs.lattepanda.com/content/1st_edition/io_programming_reference/

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.


Thanks

Ben