11 years ago.

Possible to call result of a function with a RPC handler?

Hello, I have some sensors on a I2C bus. I already found how to make a server of the LPC and post the sensor results on a website. I would like to make a button so i can call a function to measure out one of the sensors and read the value at that moment.(not with sending out every x seconds the result) I found RPC handlers to call the result of the input of a pin, timer... But is there a way i can push a button and execute one of the functions in my main program and display the result on the website? So how do i call the result of a variable? THnx in advance, Adriaan PS: i still use the old libraries. PS2: i thought of a tric to let this work, i send the data of the sensors to an analoge out pin and read those results. But there must be a more logic way...

OK i found there is a possiblity to make RPC functions and RPC variables. but this is really difficult code. someone can explain in short how it works?

posted by Adriaan Van Steendam 07 May 2013

1 Answer

11 years ago.

Hi Adriaan, can you post the code to try to help you? (remember to use the <<code>>your code<</code>> tags)

Greetings

Accepted Answer

Hey Ney! I read and i read and i read and i found it, i dont trully understand whats happening (especially in the librarys) but the code is working so im fine. thnx

posted by Adriaan Van Steendam 07 May 2013