Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Html Problem

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various
View previous topic :: View next topic  
Author Message
Tubeampman

Bascom Member



Joined: 27 Feb 2006
Posts: 95
Location: Bodo

norway.gif
PostPosted: Mon May 16, 2016 12:44 am    Post subject: Html Problem Reply with quote

Hi
am trying to make a web relay controller with an AVR & ESP8266.
When the esp relays the following code from the Avr to a browser, the buttons appear in the browser.
But how can i get the $ON and $OFF to get sendt back from the browser to the esp when i click a button?.
i have bee reading and trying to understand this, but find it difficult.
The <form> must have something to do with it as far as i can tell.

<!DOCTYPE html>
<html>
<body>
<h1>Relay Controller</h1>
<form action=''/submit' method='GET'>
<input type="button" onclick="alert('$ON')" value="ON "><br><br>
<input type="button" onclick="alert('$OFF')" value="OFF">
</body>
</html>

Best regards
Řyvind
Back to top
View user's profile
george2002

Bascom Member



Joined: 23 Nov 2005
Posts: 74
Location: Krakow

poland.gif
PostPosted: Sat Feb 25, 2017 9:35 am    Post subject: Reply with quote

I'm also curious about how to do that because i want to input SSID and Password from page to ESP8266, on internet there are lots of samples how to get something from internet to ESP8266 but there no info about that how to get info from page to ESP8266 Smile if anyone have any info i would be grateful Smile

Best Regards
George2002

_________________
Hi 4 all Smile
Back to top
View user's profile Visit poster's website
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Sat Feb 25, 2017 6:38 pm    Post subject: Tutorial Reply with quote

http://randomnerdtutorials.com/esp8266-web-server/

Found it in bascomforum.de

Is the ESP8266 driven by LUA, AT-commands or with Arduino C?

On the main page of www.mcselec.com there is a link to a weatherstation. Weatherstation 4.0 has full communication between an Arduino Mega 2560 in Bascom and an ESP8266 in Arduino C.

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
george2002

Bascom Member



Joined: 23 Nov 2005
Posts: 74
Location: Krakow

poland.gif
PostPosted: Sat Feb 25, 2017 8:05 pm    Post subject: Reply with quote

Hello Ben and thanks for the link, i saw that page elier but i need drive ESP8266 by AT commands from AVR Atmega128 Smile so no LUA or arduino C but Bascom code that will set page and next read input SSID and Password from page and set the ESP8266 is what will help me Smile
1. Set ESP8266 as AP and when user connect to ESP8266 then show page with SSID and Password input
2.when user input SSID and Password then set ESP8266 in station mode and next i will handle next steps Smile

_________________
Hi 4 all Smile
Back to top
View user's profile Visit poster's website
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1192
Location: SYDNEY

australia.gif
PostPosted: Sun Feb 26, 2017 2:04 am    Post subject: Reply with quote

This is no different to setting the IP , gateway , password and so on
I do this in my web servers I even sent text to the RS232 port from web pages
have a look at my web server blogs.
Regards Paul
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Various All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum