I have a c# program using mbedRPC class and RPC_Serial on mbed. Commands sent to a PwmOut pin take a second or two to appear on the output. Is this correct? Is it because its sending a double over RPC? As a comparison Commands sent to a DigitalOut pin are virtually instant. If anyone has a suggestion to how it is possible to quickly change value of a pwm output via RPC that would be very useful.
In my C# code I am: creating outputs on the mbed
mbed = new SerialRxTxRPC("COM7", 115200);
led1 = new DigitalOut(mbed, mbed.LED1);
led3 = new PwmOut(mbed, mbed.LED3);
then in a button click event I send a pwm value to led3 and digitalOut value to led1:
led1.write(1);
led3.write((double)0.25);
The result: led1 illuminates instantly, and led3 @25% power a second or two later.
I have a c# program using mbedRPC class and RPC_Serial on mbed. Commands sent to a PwmOut pin take a second or two to appear on the output. Is this correct? Is it because its sending a double over RPC? As a comparison Commands sent to a DigitalOut pin are virtually instant. If anyone has a suggestion to how it is possible to quickly change value of a pwm output via RPC that would be very useful.
In my C# code I am: creating outputs on the mbed
mbed = new SerialRxTxRPC("COM7", 115200); led1 = new DigitalOut(mbed, mbed.LED1); led3 = new PwmOut(mbed, mbed.LED3);
then in a button click event I send a pwm value to led3 and digitalOut value to led1:
led1.write(1); led3.write((double)0.25);
The result: led1 illuminates instantly, and led3 @25% power a second or two later.