Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[leshan-dev] Implement ultrasonic sensor as Leshan client

Hi all,

I am trying to implement an ultrasonic sensor (connect to my raspberry pi) as a leshan client and make the server observes the collected data from that sensor. I use the leshan-client-demo/RandomTemperatureSensor as the template. So far, I can use the web UI of leshan server to read the data from my sensor, but the problem is that the sensor value doesn't update in one running session (I have to restart the leshan client to get the new value of the sensor in the web UI). My full code for that class is here https://pastebin.com/av3WNbd1.

I don't know if this is off-topic here or not, but hopefully you can give me some suggestions :)

Thank you in advance.
Best regards,
Thong Q. Nguyen

Back to the top