Monday, April 24, 2017

ESPBasic - Web Interface - CSS elements example

A quick example on how to change your Web interface GUI objects properties without using a separate CSS file.

Reading Himidity and Temperature from a DHT22 Sesor connected to the GPIO5 and also retrieving Date and Time from NTP Server:

PinDHT = 5
DHT.SETUP(22, PinDHT)

cls

timer 1000, [branch] ' ## Time for auto refresh variables ##

wprint |<body style="background-color:powderblue;">|
wprint |<H1><span style="color: red;">|
wprint "Example for changing GUI object properties with CSS"
wprint "</H1>"
wprint "</span>"

wprint "<table border='1'><tr><td>Date</td><td>"
textbox Dtm
cssid htmlid(), "background-color: yellow;display:block;width:160px"
wprint "</td></tr><tr><td>Humidity </td><td>"
textbox Hum
cssid htmlid(), "background-color: grey;color:#F00;display:block;width:40px"
wprint "</td></tr><tr><td>Temperature Deg C</td><td>"
textbox Temp
cssid htmlid(), "background-color: #ccaabb;display:block;width:40px"

wprint "</td></tr></table><p>"

wprint "<p> Click to Exit <br>"
button "Exit", [TestExit]

Wait


[TestExit]
timer 0
end

[branch]
gosub [readdata]
wait

[readdata]
Dtm = time() 'Current Date and Time
Temp = DHT.TEMP() 'Current Temperature
Hum = DHT.HUM() 'Current Humidity


The result looks as below:






30 comments:

Mounika said...

Excellent blog, I wish to share your post with my folks circle. It’s really helped me a lot, so keep sharing post like this
Click here:
python training in Bangalore
Click here:
python training in Bangalore

Unknown said...

I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.
Blueprism training in velachery

Blueprism training in marathahalli


AWS Training in chennai

Unknown said...

Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

Data Science Training in Chennai
Data science training in bangalore
Data science online training
Data science training in pune

Unknown said...

Some us know all relating to the compelling medium you present powerful steps on this blog and therefore strongly encourage contribution from other ones on this subject while our own child is truly discovering a great deal. Have fun with the remaining portion of the year.
java online training | java training in pune

java training in chennai | java training in bangalore

Unknown said...

You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us

angularjs Training in bangalore

angularjs Training in btm

angularjs Training in electronic-city

angularjs online Training

angularjs Training in marathahalli

Mounika said...

All are saying the same thing repeatedly, but in your blog I had a chance to get some useful and unique information, I love your writing style very much, I would like to suggest your blog in my dude circle, so keep on updates.
python training in velachery | python training institute in chennai

gowsalya said...

Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.



AWS Training in Bangalore | Amazon Web Services Training in Bangalore


AWS Training in Bangalore |Best AWS Training Institute in BTM ,Marathahalli


AWS Training in Rajaji Nagar | Amazon Web Services Training in Rajaji Nagar


Best AWS Training Institute in BTM Layout Bangalore ,AWS Coursesin BTM


Best AWS Training in Marathahalli | AWS Training in Marathahalli

trustno1 said...

html code examples
Borders and rounded corners

priya said...

From your discussion I have understood that which will be better for me and which is easy to use. Really, I have liked your brilliant discussion. I will comThis is great helping material for every one visitor. You have done a great responsible person. i want to say thanks owner of this blog.

Microsoft Azure online training
Selenium online training
Java online training
Java Script online training
Share Point online training

Unknown said...

Excellent post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
devops online training

aws online training

data science with python online training

data science online training

rpa online training

Anonymous said...


Nice Blog!!. Thanks For Sharing..
HR Payroll Software
JAVA Development Services SAP Sopport Services
Hotel Billing Software
Web Design Company

gautham said...

thanks for your information blockchain course

gautham said...

this is a useful blog microsoft azure training

Data science training in mumbai said...

Data Science is the future of Artificial Intelligence. Therefore, it is very important to understand what is Data Science and how can it add value to your business.
Best Institute for Data Science in Mumbai which includes classroom and online training. Along with Classroom training, we also conduct online training using state-of-the-art technologies to ensure the wonderful experience of online interactive learning. Best Institute for Data Science

Data science training in mumbai said...

Data Science is the future of Artificial Intelligence. Therefore, it is very important to understand what is Data Science and how can it add value to your business.
Data Science institute in Mumbai which includes classroom and online training. Along with Classroom training, we also conduct online training using state-of-the-art technologies to ensure the wonderful experience of online interactive learning. Data Science institute in Mumbai

Data science training in mumbai said...

Data Science is the future of Artificial Intelligence. Therefore, it is very important to understand what is Data Science and how can it add value to your business.
Best institute for Data Science in Bangalore which includes classroom and online training. Along with Classroom training, we also conduct online training using state-of-the-art technologies to ensure the wonderful experience of online interactive learning. Best institute for Data Science in Bangalore

nisha said...

The Article is really Nice. Easily Clarifying the queries for the Beginners. Thanks for Posting this Article.

Data Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery

aarthi said...

Very informative blog.Expecting further updates. Java training in Chennai | Certification | Online Course Training | Java training in Bangalore | Certification | Online Course Training | Java training in Hyderabad | Certification | Online Course Training | Java training in Coimbatore | Certification | Online Course Training | Java training in Online | Certification | Online Course Training

ramesh said...

Really well done, the author who working behind of this blog. contents are really very impressive.

Azure Training in Chennai | Certification | Azure Online Training Course | Azure Training in Bangalore | Certification | Azure Online Training Course | Azure Training in Hyderabad | Certification | Azure Online Training Course | Azure Training in Pune | Certification | Azure Online Training Course | Azure Training | microsoft azure certification | Azure Online Training Course

Rohini said...

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post. Hats off to you! The information that you have provided is very helpful.

artificial intelligence course in bangalore

Rohini said...

It has fully emerged to crown Singapore's southern shores and undoubtedly placed her on the global map of residential landmarks. I still scored the more points than I ever have in a season for GS. I think you would be hard pressed to find somebody with the same consistency I have had over the years so I am happy with that.
artificial intelligence course in bangalore

EXCELR said...

"Thank you for sharing wonderful information with us.Really useful for everyone data scientist courses
"

lakshmik7410 said...

Great Blog and info
data science training in chennai

ccna training in chennai

iot training in chennai

cyber security training in chennai
ethical hacking training in chennai

maha said...

Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot. it is really explainable very well and i got more information from your blog.

Digital Marketing Training in Chennai

Digital Marketing Course in Chennai

Ramesh Sampangi said...

Attend data science training sessions in one of the best data science institute in Hyderabad known as AI Patasala. Here you can learn data science concepts with practical knowledge.
Data Science Course with Placements in Hyderabad

data science bangalore said...

I was curious if you ever thought of changing the layout of your site? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having 1 or 2 pictures. Maybe you could space it out better?|data analytics course in jodhpur

Bhumi DM said...

It’s exciting to see how simple changes can make such a difference in usability. Looking forward to more projects like this
Data Science Courses in Brisbane

Anonymous said...

what a informative article on ESPBasic - Web Interface with CSS elements example.explained in very simple and easy way
Data science courses in Nashik

Bhumi IIM Skills said...

Thanks for sharing this guide on using CSS elements in ESPbasic! The examples are really clear and will definitely help in creating more dynamic web interfaces.

Data science courses in Dubai

Sadhvi said...

This is a great example of how to dynamically style web interface elements using inline CSS within an ESPBasic project! By modifying the properties of GUI objects directly in the code, you can quickly see the effects without needing to switch between different files. Data science courses in Visakhapatnam

Post a Comment