- mbedRPC library: mbedRPC.js
To use this library simply save it to mbed along side the bin and the HTML file which uses it.
Here is an example HTML file which flashes LED1, fades LED3 and prints the analog input at p20 to the screen once a second.
Using the Library¶
To use the library in your html pages you must first load it in
You can now create objects or tie to existing objects on mbed.
Finally you can execute the methods for each of the objects
led1.write(i); f = ain.read();
RangeFinder = new RPCFunction(mbed, "RangeFinder"); Range = RangeFinder.run(" ");