Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions examples/arduino-led-onoff-ble/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<meta name="viewport" content="width=device-width, user-scalable=no,
shrink-to-fit=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />

<title>Arduino LED On/Off BLE</title>
<title>Relay On/Off BLE</title>

<style>
@import 'ui/css/evothings-app.css';
Expand Down Expand Up @@ -46,19 +46,19 @@
<!--<button class="menu" onclick=""><img src="ui/images/menu.svg" /></button>-->
</header>

<h1>Arduino LED On/Off BLE</h1>
<h1>Relay On/Off BLE</h1>

<p id="info">Initializing...</p>

<button class="yellow wide" onclick="app.connect()">CONNECT</button>

<br />

<button class="green wide big" onclick="app.ledOn()">LED ON</button>
<button class="green wide big" onclick="app.On()">LED ON</button>

<br />

<button class="red wide big" onclick="app.ledOff()">LED OFF</button>
<button class="red wide big" onclick="app.Off()">LED OFF</button>

<script>
// Application object.
Expand All @@ -68,13 +68,13 @@ <h1>Arduino LED On/Off BLE</h1>
app.device = null;

// Turn on LED.
app.ledOn = function()
app.On = function()
{
app.device && app.device.writeDataArray(new Uint8Array([1]));
}

// Turn off LED.
app.ledOff = function()
app.Off = function()
{
app.device && app.device.writeDataArray(new Uint8Array([0]));
}
Expand All @@ -99,7 +99,7 @@ <h1>Arduino LED On/Off BLE</h1>
function(device)
{
app.device = device;
app.showMessage('Connected! Touch buttons to turn LED on/off.');
app.showMessage('Connected! Touch buttons to turn on/off.');
},
function(errorCode)
{
Expand Down