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.
6 years, 2 months ago. This question has been closed. Reason: Found issue and fixed it
Creating new RpcDigitalOut via python
I am trying to create a new object of RpcDigitalOut via python serial interface but can't get it working...
My python code looks like this
ser = serial.Serial("COM6",9600) redLED = "/RpcDigitalOut/new LED3 redLED\n" redLEDOn = "/redLED/write 1\n" redLEDOff = "/redLED/write 0\n" otheron = "/lit/write 0\n" otheroff = "/lit/write 1\n" ser.write(redLED) while(True): sleep(1) ser.write(redLEDOn) ser.write(otheron) sleep(1) ser.write(redLEDOff) ser.write(otheroff)
In Mbed code I have added
RPC::add_rpc_class<RpcDigitalOut>(); RpcDigitalOut ligt(LED4, "lit");
I can see LED4 blinking but not LED3 :(
All suugestions are welcome.
Regards, Hemant Kapoor