Getting started with Javascript and tramontana::

To get started with tramontana for Javascript you need to first import jquery:

And then import the tramontan library:
<script src="../lib/tramontana_min.js"></script>

Now you can create a new tramontana object that links to your device (or node).
<script> var device = new tramontana(); </script>

Open the tramontana app on your phone and check the ip address of your device:

Now you are ready to send your first command to your device:

This is the html page for the full example:

<!-- import css-->
<link rel="stylesheet" type="text/css" href="./stylesheet.css">
<!-- import jquery-->
<script src=""></script>
<!-- import tramontana-->
<script src="../lib/tramontana_min.js"></script>
<!-- create a global variable-->
var device = new tramontana();
<!--Link to tramontana the app!-->
<h4>To get started download the Tramontana App on your iOS device from <a href="">here</a> or on your Android device from <a href="">here</a>.</h4>
1. Insert the IP Address of your device and press start.
2. Press change color to change the color of the screen of your device.
<!-- OPEN SOCKET -->
<input type="text" id="ipInput" placeholder=""><br/>
<button onclick="device.start($('#ipInput').val())">start</button>
<!-- CHANGE device COLOR -->
<button onclick="console.log('change color');device.setColor(Math.random(0,255),Math.random(0,255),Math.random(0,255),255
);">change color</button>

You can check more examples here: