Important changes to questions
We’re making some changes to Mbed Questions. From 10th December 2019 this site will be archived and new questions should be asked on our new forum site. Until that date you can continue to reply to existing questions here but can’t ask new questions.
6 years 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