Processing Language and RPCVariables

07 Sep 2011

I've set up my processing variables as follows; on MBED

float myValue;

RPCVariable<float> rpcMyValue(&myValueP, "myValue");

In Processing;

myValueP = new RPCVariable<Float>(mbed, "myValue");

myValueP.write(floatValue);

I'm using a button to send the new float value to the float on the MBED, but everytime I do so, it freezes the sketch. There is nothing wrong with the button (it doesnt freeze without the RPC)

Am I missing something specific to Processing? If this is all in order, then I'm going to assume there is something amiss in my code.

edit; I dont know how to use the print function either when serialRPC is running.

07 Sep 2011

used- rpcMyValue.read() to read the value.

needed to include

  1. include "SerialRPCInterface.h" in the mbed file.

Also. It may be worth mentioning to those that don't know (as this may have caused me problems had this not been an issue)

WARNING: RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2

This error can be fixed using this guide.

http://www.sundh.com/blog/2011/05/get-processing-and-arduino-to-talk/

Now I have an executable that can interract with the with MBED without having to be run on the MBED.

p.s. (i'd have payed an extra 10 pound for a megabyte of RAM);

13 Nov 2011

Hi there iam trying to also send a byte from Processing to my mbed board. But i am not sure how to do this. I have tried the RPC code and managed to turn on some LED etc, but i dont know how to send a byte or char to the board.