11 years, 9 months ago.

RPC doesn't write or read reasonable values

I've got my mbed setup with the RPC code at http://mbed.org/users/MichaelW/code/RPC_Serial/docs/de34af25056a/main_8cpp_source.html (unmodified) and trying to run some of the basic test code available here.

I am getting the blinking light but the LED does not light up and the result is invalid.

Python 2.7.2 (default, Jun 20 2012, 16:23:33) 
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from mbedRPC import *
>>> serdev = '/dev/tty.usbmodemfa132'
>>> mbed = SerialRPC(serdev, 9600)
>>> x = DigitalOut(mbed, LED3) # LED3
>>> x.write(1)
>>> x.read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mbedRPC.py", line 119, in read
    return int(r)
ValueError: invalid literal for int() with base 10: 'Empty 0.032723'

Am I missing something important here?

Question relating to:

We're having exactly the same problem as you have, and can't seem to find out why. Has anybody managed to find a solution?

posted by David Salmon 20 Nov 2014
Be the first to answer this question.