Pages: [1]   Go Down
Author Topic: Changing the threshold values via webpage  (Read 650 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Everyone!

Instead of setting the sensor threshold values in the sketch, is it possible to change the sensor threshold values via webpage(form post)

With Regards,
Raghav
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 651
Posts: 50841
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
is it possible to change the sensor threshold values via webpage(form post)
With an ethernet shield, and appropriate code, yes.
Logged

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 3
Posts: 489
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you know HTML, you will know that it is possible to submit info from a webpage to a server with a simple form. The arduino can work as a server and present the HMTL page. You then need to process what the client asks for to decide if it is a request for HTML (http request) or some info. It is not too difficult, but still serves as an interesting project.
At the minute, I am doing something similar. I have the arduino serving up a login form. Then, you log in and can send emails through it! Or at least that is the idea... I can send an email or log in, but not do both. When a microcontrolller connects to the internet, things really get interesting!

Onions.
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you both for the replies.

I am working on scheduling lights/events based on time and day. I want to view and change time/day schedules via webpage.

Can you guide me in the right direction. I thought of the following:

prog_char string_1[] PROGMEM = "<input name=TimeDate value=no_name MAXLENGTH=20>";
char buffer[100];

Cheers
Logged

Newcastle, England
Offline Offline
Sr. Member
****
Karma: 3
Posts: 489
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The way I would start is by writing out the code for your HTML web page, then loading it onto a micro-sd card. There is a card slot on the new ethernet shields, which makes life easy. Next, you need to send this data out from the SD card to a web client. This is easy to do; just alter the web server example by adding in some code to read (and send) the data from the SD card. After that, you need to read what the website says when you click the submit button, then you can go about changing the variables.

Onions.
Logged

My website: http://www.harryrabbit.co.uk/electronics/home.html Up and running now! (Feel free to look round!) smiley-grin

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a lot for guiding me in the right direction.

Cheers
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Iam letting the arduino act as a web server (wifly library)

I made a small routine that checks for ?COMMAND and then perform different actions depending on the commands I send to my arduino over HTTP. ex. http://10.0.0.50/?RESTART other commands i use: ?SHOWMEM ?TEMP ?LIGHTON  ?LIGHTOFF ?STROBExx (stobing a bright diod for xx sec)  ?SCREAM  (making ultra sonic noise)

But for sun raise and down I will import the total list of 366 days data into the Flash (about 7.5K data) as a backup if I loose the connection.
Why do it simple when you can add some extra fun to it smiley ( I could just let my linux server wget the time everyday instead)

If you need to find the sun up and down data for your location: http://www.timeanddate.com
Logged

Pages: [1]   Go Up
Jump to: