Hello, I want to send the data of temperature, gas, soil moisture, motion sensors with PHPOC Blue via websocket. How can I do it with ws_write command. I can only send or receive data.
Announcement
Collapse
No announcement yet.
PHPOC Blue ws_write
Collapse
X
-
Hi there,
I think you can define the data format so that you can get the temperature, motion, etc. parameters from the webSocket message.
Let take a look at some other projects for reference:
Cheers
- Likes 1
-
first of all, thank you for your answer, but my problem is not to read data from analog input, I can do this, we can send analog and similar data with ws_write only, which I understand... Let's say I read 4 or 5 data and I want to display them in different wc_texts. How can I send single data and display them in different wc_texts. Thank you.
Comment
-
Hello there,
As I see it, the issue here is not how you get the data from the sensor, but how to display it on the web.
This involves HTML and JavaScript programming rather than PHPoC. First, you need to define the data format that you send from the web server (PHPoC board) to client, so that on client side you can filter out which data belongs to which sensor. Then you can do web programming with HTML and JavaScript to display the text properly according to your need.
Cheers
Comment
Comment