Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 1 month ago.
DotNet example
With the example for serial I always get a time-out on the Response = mbed.ReadLine() in the class SerialRxTx.cs
Couls someone please help me?? The code on my embed is:
include "mbed.h" include "mbed_rpc.h" include "USBSerial.h" USBSerial serial;
int main() { RPC::add_rpc_class<RpcAnalogIn>(); RPC::add_rpc_class<RpcAnalogOut>(); RPC::add_rpc_class<RpcDigitalOut>(); RPC::add_rpc_class<RpcDigitalIn>(); RPC::add_rpc_class<RpcDigitalInOut>(); RPC::add_rpc_class<RpcPwmOut>(); RPC::add_rpc_class<RpcTimer>(); RPC::add_rpc_class<RpcSPI>(); RPC::add_rpc_class<RpcSerial>();
Instance RpcDigitalOut rpc_led(LED1, "led1"); receive commands, and send back the responses char buf[256], outbuf[256]; while(1) { serial.printf("I am a virtual serial port\r\n");
} }