These are very simple programs, :
Very simple for loop example
CODE: simple1.bas
Simple web page with a button and a textbox.
CODE: simple2.bas
Simple web page showing the temperature coming from a DS18B20.
The page is refreshed each 5 seconds
CODE: DS18B20.bas
'Simple web page showing the information
'from a DS18B20 sensor PIN_Sensor = 2 'pin used for the DS18B20 t$ = tempr$(PIN_Sensor, 1) onHtmlReload DoPage gosub DoPage timer0 5000, update wait DoPage: cls html TextBox$(t$) + " ° Celsius" return update: t$ = "22" 'tempr$(PIN_Sensor, 1) refresh return end Simple web page showing the temperature and humidity coming from a DHT11.
The page is refreshed each 2 seconds
CODE: DHT11.bas
'Simple Web page showing the information
'from a DHT11 ( Temperature and Humidity) PIN_Sensor = 2 'pin used for the DHT11 DHT.SETUP PIN_Sensor, 11 t$ = str$(DHT.Temp) h$ = str$(DHT.HUM) onHtmlReload DoPage gosub DoPage timer0 2000, update wait DoPage: cls html TextBox$(t$) + "°C<br>" + TextBox$(H$) + "%" return update: t$ = str$(DHT.Temp) h$ = str$(DHT.HUM) refresh return end |
Examples >