Pages: [1]   Go Down
Author Topic: arduino + jquery mobile + SD  (Read 813 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

<!DOCTYPE html>
<html>

<head>
<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>
</head>

<body>

<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">
<h3>Lights</h3>

<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>
</select>

<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>
</select>

<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>
</select>

<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>
</select>

</div>

</div>


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

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

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

</body>
</html>
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11173
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: