Using the plot item
2 posters
Using the plot item
Here is how to use a plot:
- select menu -> edit ui
- click on blank space where you want to add the plot
- select plot
- the plot will appear in the interface
- move it by dragging the top left corner
- resize it by dragging the bottom right corner
- edit its options by clicking on it
set id:
Set the id (text string) for the plot. Example: receiving "temp 31\n" will append the value 31 to the plot that has the id "temp".
set label:
Set the text string that will appear under the plot. You can use the plot's last value inside the label. Examples for plot with last value 100:
label “temp. = #*0.5-10 °C” will show “temp. = 40.0 °C”
label “batt. #*1%” will show “batt. 100%”
set min:
Set the minimum value. Default is 0.
set max:
Set the maximum value. Default is 255.
set length:
Sets the length (number of samples) to fit in one frame, default is 256.
Maximum length is 10000.
set display mode:
Sets the display mode for the plot.
Scrolling (default) – plot scrolls from right to left, new data appears on the right.
Oscilloscope – plot doesn't scroll. Data appears from left to right. When it reaches the end, it waits for trigger event, then starts again from the left.
set trigger:
Sets the trigger threshold and edge (rising / falling / both / none).
If none edge selected, then the trigger is off, so it will not wait for trigger event.
For scrolling display mode there is no trigger (The trigger settings are ignored).
repaint / don't repaint:
Disables / enables the UI repaint when new sample is received.
Example project:
http://www.roboremo.com/analog-pin-live-plot.html
- select menu -> edit ui
- click on blank space where you want to add the plot
- select plot
- the plot will appear in the interface
- move it by dragging the top left corner
- resize it by dragging the bottom right corner
- edit its options by clicking on it
set id:
Set the id (text string) for the plot. Example: receiving "temp 31\n" will append the value 31 to the plot that has the id "temp".
set label:
Set the text string that will appear under the plot. You can use the plot's last value inside the label. Examples for plot with last value 100:
label “temp. = #*0.5-10 °C” will show “temp. = 40.0 °C”
label “batt. #*1%” will show “batt. 100%”
set min:
Set the minimum value. Default is 0.
set max:
Set the maximum value. Default is 255.
set length:
Sets the length (number of samples) to fit in one frame, default is 256.
Maximum length is 10000.
set display mode:
Sets the display mode for the plot.
Scrolling (default) – plot scrolls from right to left, new data appears on the right.
Oscilloscope – plot doesn't scroll. Data appears from left to right. When it reaches the end, it waits for trigger event, then starts again from the left.
set trigger:
Sets the trigger threshold and edge (rising / falling / both / none).
If none edge selected, then the trigger is off, so it will not wait for trigger event.
For scrolling display mode there is no trigger (The trigger settings are ignored).
repaint / don't repaint:
Disables / enables the UI repaint when new sample is received.
Example project:
http://www.roboremo.com/analog-pin-live-plot.html
PLOT with LUA
Hi,
How to use the PLOT with LUA?
Could you please post a simple LUA code example, which will continuously plot some variable (e.g. using tmr function)?
How to use the PLOT with LUA?
Could you please post a simple LUA code example, which will continuously plot some variable (e.g. using tmr function)?
adamsart- Posts : 2
Join date : 2016-05-20
Re: Using the plot item
Hi,
Here is the example:
http://www.roboremo.com/esp8266-plot-example.html
All the best,
Victor
Here is the example:
http://www.roboremo.com/esp8266-plot-example.html
All the best,
Victor
Re: Using the plot item
Hi,
Thank you for this nice example. It is very clear for the usage.
I see it was prepared especially to explain my question. I appreciate that very much.
My original target was to display the temperature read from DS18B20 sensor.
Your example works well as long as the simple variable 'val' is displayed.
However, when I combine it with the temperature reading function I cannot make it working.....
Could you please have a look into the temperature reading function and help how to display it on the plot?
The source code for temperature reading is here:
https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/onewire-ds18b20.lua
The variable to display on the plot is 'temp'.
Thank you in advance for your help.
Thank you for this nice example. It is very clear for the usage.
I see it was prepared especially to explain my question. I appreciate that very much.
My original target was to display the temperature read from DS18B20 sensor.
Your example works well as long as the simple variable 'val' is displayed.
However, when I combine it with the temperature reading function I cannot make it working.....
Could you please have a look into the temperature reading function and help how to display it on the plot?
The source code for temperature reading is here:
https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/onewire-ds18b20.lua
The variable to display on the plot is 'temp'.
Thank you in advance for your help.
adamsart- Posts : 2
Join date : 2016-05-20
Re: Using the plot item
Hi,
I just ordered some ds18b20 to make an example, I will let you know when it is ready.
I just ordered some ds18b20 to make an example, I will let you know when it is ready.
Re: Using the plot item
Hi again,
Check this:
https://www.youtube.com/watch?v=2KwWqpx_Oh0
http://www.roboremo.com/esp-ds18b20.html
Check this:
https://www.youtube.com/watch?v=2KwWqpx_Oh0
http://www.roboremo.com/esp-ds18b20.html
Similar topics
» Using the led item
» Using the image item
» Using the touchpad item
» Using the kbd connector item
» Using the button item
» Using the image item
» Using the touchpad item
» Using the kbd connector item
» Using the button item
Permissions in this forum:
You cannot reply to topics in this forum
|
|