Go Down

Topic: arduino + jquery mobile + SD (Read 1 time) previous topic - next topic


Hi my name is Nikos and i want to ask i you can help me to have my first demo site with jquery and on/off swithes. I did a UI for it but i dont know how to put it in the write order and run it on arduino from SD. Can you help me.

This is an example and i want to ask you if you can make the first switch to trigger for me and i will do the rest thanks again for you precious time.
Code: [Select]

<!DOCTYPE html>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Home Automation v.1</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>


<div data-role="page">

<div data-role="header">
<h1>Home Automation</h1>
</div><!-- /header -->

<div data-role="collapsible-set">

<div data-role="collapsible" data-collapsed="false" data-theme="b">

<div data-role="content">
<label for="flip-1">Light 1</label>
<select name="flip-1" id="flip-1" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>

<label for="flip-2">Light 2</label>
<select name="flip-2" id="flip-2" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>

<label for="flip-3">Light 3</label>
<select name="flip-3" id="flip-3" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>

<label for="flip-4">Light 4</label>
<select name="flip-4" id="flip-4" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>



</div><!-- /content -->

<div data-role="footer" data-position="fixed">
<h4>nikkpap & duckdodgers - Copyright 2013</h4>
</div><!-- /footer -->

</div><!-- /page -->



I think you need to put those input fields in a form and then set the form action to submit an HTTP request to the web server (your Arduino) and write code on the Arduino to recognise the incoming request and extract the form values.

I'm sure that a search for Arduino web control will turn up plenty of hits showing hot to do that.

Go Up