Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (35 sloc) 1.89 KB
<link type="text/css" href="jquery-ui-1/css/blitzer/jquery-ui-1.8.11.custom.css" rel="stylesheet" />
<script type="text/javascript" src="jquery-ui-1/js/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="jquery-ui-1/js/jquery-ui-1.8.11.custom.min.js"></script>
<meta charset="utf-8">
$(function() {
$( "#slider-vertical" ).slider({
orientation: "vertical",
range: "min",
min: 0,
max: 255,
value: 100,
slide: function( event, ui ) {
$( "#amount" ).val( ui.value );
// build a URL using the value from the slider
var resturl = "" + ui.value;
// make an AJAX call to the Arduino
$.get(resturl, function(data) {
$( "#amount" ).val( $( "#slider-vertical" ).slider( "value" ) );
<label for="amount">PWM Value:</label>
<input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
<div id="slider-vertical" style="height:200px;"></div>
Jump to Line
Something went wrong with that request. Please try again.