I am working with the Web_AjaxRGB_mobile example the one with the buttons.I want to make it work like getting sensor measurements and after a value it will display the buttons that can happen of course no i think I am using the right example..
P(message) =
"<!DOCTYPE html><html><head>"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">"
"<meta http-equiv=\"refresh\" content=\"10\">"
.........................
serverprintP(message)...
/*then the code for displaying the ds18b20 temp variable/*
sensors.requestTemperatures();
printTemperature(insideThermometer);
float tempC = sensors.getTempC(insideThermometer);
(tempC);
if tempC>20{ //the other piece of P (message) now for displaying the buttons//
P (message)=
"$(document).ready(function(){ $('#red, #green, #blue').slider; $('#red, #green, #blue').bind( 'change', function(event, ui) { jQuery.ajaxSetup({timeout: 1000}); /*not to DDoS the Arduino, you might have to change this to some threshold value that fits your setup*/ var id = $(this).attr('id'); var strength = $(this).val(); if (id == 'red') $.post('/remote', { red: strength } ); if (id == 'green') $.post('/remote', { green: strength } ); if (id == 'blue') $.post('/remote', { blue: strength } ); });});"
"</script>"
"<div class=\"ui-body ui-body-a\">"
"<div data-role=\"fieldcontain\">"
"<h2>led</h2>"
"<label for=\"flip-3\">diakoptis 1</label>"
}.......
of course the above is just a quick version of what I am going to write.Have I understand well?
thanks