<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Arduino &#8211; Abetoo IoT wiki</title>
	<atom:link href="https://abetoo.com/wiki/article-categories/arduino/feed" rel="self" type="application/rss+xml" />
	<link>https://abetoo.com/wiki</link>
	<description>Abetoo IOT Framework</description>
	<lastBuildDate>Thu, 29 Jun 2017 10:37:02 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.8.25</generator>

<image>
	<url>http://abetoo.com/wiki/wp-content/uploads/cache/2017/04/logo_white/141125888.png</url>
	<title>Arduino &#8211; Abetoo IoT wiki</title>
	<link>https://abetoo.com/wiki</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Introduction. Installation</title>
		<link>https://abetoo.com/wiki/knowledge-base/arduino_installation</link>
		<comments>https://abetoo.com/wiki/knowledge-base/arduino_installation#respond</comments>
		<pubDate>Tue, 25 Apr 2017 17:59:36 +0000</pubDate>
		<dc:creator><![CDATA[abetoo]]></dc:creator>
		
		<guid isPermaLink="false">http://localhost/wordpress_abetoo_wiki/knowledge-base/how-secure-is-my-password/</guid>
		<description><![CDATA[You can install abetoo arduino library just as any other library, please follow this steps: Download one of the last stable version of the libraries available (links below) Select Sketch-&#62;Include Library-&#62;add .ZIP Library from Arduino IDE Select the downloaded .ZIP file and you&#8217;re done. &#160; Arduino based on Wifi8266 module [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>You can install abetoo arduino library just as any other library, please follow this steps:</p>
<ul>
<li>Download one of the last stable version of the libraries available (links below)</li>
<li>Select Sketch-&gt;Include Library-&gt;add .ZIP Library from Arduino IDE<img class=" wp-image-249 aligncenter" src="http://abetoo.com/wiki/wp-content/uploads/2017/05/arduino_library_install.bmp" alt="" width="458" height="386" /></li>
<li>Select the downloaded .ZIP file and you&#8217;re done.</li>
</ul>
<hr />
<p>&nbsp;</p>
<p><em><strong>Arduino based on Wifi8266 module</strong></em></p>
<aside class="download-box">

	<img width="625" height="527" src="https://abetoo.com/wiki/wp-content/uploads/2017/05/d8e89-nodemcu_pinout_700.png" class="attachment-full size-full wp-post-image" alt="" srcset="https://abetoo.com/wiki/wp-content/uploads/2017/05/d8e89-nodemcu_pinout_700.png 625w, https://abetoo.com/wiki/wp-content/uploads/2017/05/d8e89-nodemcu_pinout_700-300x253.png 300w, https://abetoo.com/wiki/wp-content/uploads/2017/05/d8e89-nodemcu_pinout_700-50x42.png 50w, https://abetoo.com/wiki/wp-content/uploads/2017/05/d8e89-nodemcu_pinout_700-600x506.png 600w, https://abetoo.com/wiki/wp-content/uploads/2017/05/d8e89-nodemcu_pinout_700-320x270.png 320w" sizes="(max-width: 625px) 100vw, 625px" />
	<div
		class="download-count">523 downloads</div>

	<div class="download-box-content">

		<h1 id="esp8266-library" >ESP8266 Library</h1>

		
		<a class="download-button" title="Version 1.1" href="http://abetoo.com/wiki/download/416/" rel="nofollow">
			Download File			<small>abetoo_wifi8266.zip &ndash; 5 KB</small>
		</a>

	</div>
</aside>



<p>Note: The library import line is <em><strong>#include &#8220;abtoo.h&#8221;</strong></em></p>
<hr />
<p>&nbsp;</p>
<p><em><strong>Arduino based on Wifi library, intended to be used with Arduino WiFi Shield (beta version)</strong></em></p>
<aside class="download-box">

	<img width="960" height="693" src="https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720.png" class="attachment-full size-full wp-post-image" alt="" srcset="https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720.png 960w, https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720-300x217.png 300w, https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720-768x554.png 768w, https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720-50x36.png 50w, https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720-920x664.png 920w, https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720-600x433.png 600w, https://abetoo.com/wiki/wp-content/uploads/2017/06/wifi-1290667_960_720-320x231.png 320w" sizes="(max-width: 960px) 100vw, 960px" />
	<div
		class="download-count">373 downloads</div>

	<div class="download-box-content">

		<h1 id="wifi-library" >WiFi Library</h1>

		
		<a class="download-button" title="Version 1.1" href="http://abetoo.com/wiki/download/418/" rel="nofollow">
			Download File			<small>abetoowifi.zip &ndash; 5 KB</small>
		</a>

	</div>
</aside>



<p>Note: The library import line is <em><strong>#include &#8220;abtoowifi.h&#8221;</strong></em></p>
<hr />
<p>&nbsp;</p>
<p><em><strong>Arduino based on Ethernet Library, intended to be used with Arduino Ethernet Shield (beta version)</strong></em></p>
<aside class="download-box">

	<img width="720" height="490" src="https://abetoo.com/wiki/wp-content/uploads/2017/06/720px-Arduino_Logo.svg_.png" class="attachment-full size-full wp-post-image" alt="" srcset="https://abetoo.com/wiki/wp-content/uploads/2017/06/720px-Arduino_Logo.svg_.png 720w, https://abetoo.com/wiki/wp-content/uploads/2017/06/720px-Arduino_Logo.svg_-300x204.png 300w, https://abetoo.com/wiki/wp-content/uploads/2017/06/720px-Arduino_Logo.svg_-50x34.png 50w, https://abetoo.com/wiki/wp-content/uploads/2017/06/720px-Arduino_Logo.svg_-600x408.png 600w, https://abetoo.com/wiki/wp-content/uploads/2017/06/720px-Arduino_Logo.svg_-320x218.png 320w" sizes="(max-width: 720px) 100vw, 720px" />
	<div
		class="download-count">367 downloads</div>

	<div class="download-box-content">

		<h1 id="ethernet-library" >Ethernet Library</h1>

		
		<a class="download-button" title="Version 1.1" href="http://abetoo.com/wiki/download/420/" rel="nofollow">
			Download File			<small>arduinoEthernet_v1_1.zip &ndash; 5 KB</small>
		</a>

	</div>
</aside>



<p>Note: The library import line is <em><strong>#include &#8220;abtooeth.h&#8221;</strong></em></p>
<hr />
<p>&nbsp;</p>
<p><em><strong>PD: If you experience any issue using any of this libraries please send me a message.</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>https://abetoo.com/wiki/knowledge-base/arduino_installation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First steps. Hello World</title>
		<link>https://abetoo.com/wiki/knowledge-base/arduino_first_steps</link>
		<comments>https://abetoo.com/wiki/knowledge-base/arduino_first_steps#respond</comments>
		<pubDate>Tue, 25 Apr 2017 17:59:37 +0000</pubDate>
		<dc:creator><![CDATA[abetoo]]></dc:creator>
		
		<guid isPermaLink="false">http://localhost/wordpress_abetoo_wiki/knowledge-base/how-do-i-change-my-password/</guid>
		<description><![CDATA[Once the library is installed, let’s go with a very basic example using the Arduino ESP8266 library: Let’s check it out the code a little bit deeper. The first step, before define our connection, is to establish a wifi/ethernet link, in this particular case, in the example above, a wifi [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Once the library is installed, let’s go with a very basic example using the Arduino ESP8266 library:</p>
<pre class="brush: cpp; title: ; notranslate">
#include &quot;abtoo.h&quot;

int ledPin = 13; // GPIO13
char* ssid = &quot;myhomessid&quot;;
char* password = &quot;mywifipassword&quot;;
int h = LOW;

AbetooIno abtoino;

void messageReceived(String message)
{
 Serial.println(message);
 h = h^1;
 digitalWrite(ledPin, h?HIGH:LOW);

}

void setup() {
 Serial.begin(9600);
 delay(10);
 
 pinMode(ledPin, OUTPUT);
 digitalWrite(ledPin, LOW);
 
 // Connect to WiFi network
 Serial.println();
 Serial.println();
 Serial.print(&quot;Connecting to &quot;);
 Serial.println(ssid);
 
 WiFi.begin(ssid, password);
 
 while (WiFi.status() != WL_CONNECTED) {
 delay(500);
 Serial.print(&quot;.&quot;);
 }
 Serial.println(&quot;&quot;);
 Serial.println(&quot;WiFi connected&quot;);

 String uuid = &quot;uudi1&quot;;
 String channel = &quot;-TbVO-rqdA0iWg6-gWh0eeQ636243460528994051&quot;
 &quot;#735acf9cd6eda96e66ee3858496dca59d750aff1&quot;;
 int heartbeat = 1; //minutes
 abtoino.init(uuid, channel, heartbeat, messageReceived);
}

void loop()
{
 abtoino.abetooloop();
}
</pre>
<p>Let’s check it out the code a little bit deeper.</p>
<p>The first step, before define our connection, is to establish a wifi/ethernet link, in this particular case, in the example above, a wifi connection procedure is used.</p>
<pre class="brush: cpp; title: ; notranslate">
 // Connect to WiFi network
 Serial.println();
 Serial.println();
 Serial.print(&quot;Connecting to &quot;);
 Serial.println(ssid);
 
 WiFi.begin(ssid, password);
 
 while (WiFi.status() != WL_CONNECTED) {
 delay(500);
 Serial.print(&quot;.&quot;);
 }
 Serial.println(&quot;&quot;);
 Serial.println(&quot;WiFi connected&quot;)
</pre>
<p>Within setup procedure, we have to define the connection parameters, there&#8217;re only 4 parameters. We have to introduce a valid <strong><em>channel id </em></strong>string, a <strong><em>heartbeat </em></strong>timeout in minutes, a unique identifier <em><strong>uuid</strong></em> across other connections to the same channel id and a function callback <em><strong>messageReceived </strong></em>to react to new messages.</p>
<pre class="brush: cpp; title: ; notranslate">
 String uuid = &quot;uudi1&quot;;
 String channel = &quot;-TbVO-rqdA0iWg6-gWh0eeQ636243460528994051&quot;
 &quot;#735acf9cd6eda96e66ee3858496dca59d750aff1&quot;;
 int heartbeat = 1; // minutes
 abtoino.init(uuid, channel, heartbeat, messageReceived);
</pre>
<p>Once a new message arrives the function messageReceived is triggered, showing message content and flipping a led.</p>
<pre class="brush: cpp; title: ; notranslate">
void messageReceived(String message)
{
 Serial.println(message);
 h = h^1;
 digitalWrite(ledPin, h?HIGH:LOW);

}
</pre>
<p>The other important part is to include a calling to the abetooloop function withing loop procedure,</p>
<pre class="brush: cpp; title: ; notranslate">
void loop()
{
 abtoino.abetooloop();
}
</pre>
<p>If you launch the code above, you&#8217;ll see something like this at the serial console,</p>
<p><img class="aligncenter size-medium" src="http://abetoo.com/wiki/wp-content/uploads/2017/05/arduino_library_install_console.bmp" width="441" height="352" /></p>
]]></content:encoded>
			<wfw:commentRss>https://abetoo.com/wiki/knowledge-base/arduino_first_steps/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To Infinity and Beyond</title>
		<link>https://abetoo.com/wiki/knowledge-base/arduino_send_messages</link>
		<comments>https://abetoo.com/wiki/knowledge-base/arduino_send_messages#respond</comments>
		<pubDate>Tue, 25 Apr 2017 17:59:37 +0000</pubDate>
		<dc:creator><![CDATA[abetoo]]></dc:creator>
		
		<guid isPermaLink="false">http://localhost/wordpress_abetoo_wiki/knowledge-base/where-can-i-upload-my-avatar/</guid>
		<description><![CDATA[The following example is presented in order to show you how to send messages from arduino, There is only a new piece of code where the sending process take place, We have to define a target channel id, a message body and an optional correlation id. Once every 1000000 loop iterations a [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>The following example is presented in order to show you how to send messages from arduino,</p>
<pre class="brush: cpp; title: ; notranslate"> 
#include &quot;abtoo.h&quot;

int ledPin = 13; // GPIO13
char* ssid = &quot;homessid&quot;;
char* password = &quot;mypassword&quot;;
int h = LOW;

AbetooIno abtoino;

void messageReceived(String message)
{
Serial.println(message);
h = h^1;
digitalWrite(ledPin, h?HIGH:LOW);

}

void setup() {
Serial.begin(9600);
delay(10);

pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW);

// Connect to WiFi network
Serial.println();
Serial.println();
Serial.print(&quot;Connecting to &quot;);
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(&quot;.&quot;);
}
Serial.println(&quot;&quot;);
Serial.println(&quot;WiFi connected&quot;);

String uuid = &quot;uudi1&quot;;
String channel = &quot;-TbVO-rqdA0iWg6-gWh0eeQ636243460528994051&quot;
&quot;#735acf9cd6eda96e66ee3858496dca59d750aff1&quot;;
int heartbeat = 1; // minutes
abtoino.init(uuid, channel, heartbeat, messageReceived);
}

String channeltarget = &quot;-uC6s1LfZaEuw9AK0Js1w9w636243459698606497#&quot;
&quot;b90a9186b9b61ead17d51251f689aea1779d5203&quot;;
long count = 0;
long messages = 0;
void loop()
{
if (count++ == 1000000)
{
count = 0;
String body = &quot;Message from arduino &quot;;
body = body + (messages++) + &quot;!&quot;;
abtoino.sendMessage(channeltarget, body, &quot;no correlation id&quot;);
}


abtoino.abetooloop();
}
</pre>
<p>There is only a new piece of code where the sending process take place,</p>
<pre class="brush: cpp; highlight: [12]; title: ; notranslate"> 
String channeltarget = &quot;-uC6s1LfZaEuw9AK0Js1w9w636243459698606497#&quot;
 &quot;b90a9186b9b61ead17d51251f689aea1779d5203&quot;;
long count = 0;
long messages = 0;
void loop()
{
 if (count++ == 1000000)
 {
 count = 0;
 String body = &quot;Message from arduino &quot;;
 body = body + (messages++) + &quot;!&quot;;
 abtoino.sendMessage(channeltarget, body, &quot;no correlation id&quot;);
 }
 
 
 abtoino.abetooloop();
}
</pre>
<p>We have to define a target <em><strong>channel id, </strong></em>a message <em><strong>body </strong></em>and an optional <em><strong>correlation id</strong></em>.</p>
<p>Once every 1000000 loop iterations a message is sent to the target channel id.</p>
<p>To ilustrate the functionality exposed above I&#8217;m going to show you an example with a target device based on the xamarin android code.</p>
<div class="pki" style="width: 800px; height: 700px;"></div>
		<script>
			jQuery(function($){
				var vidbgContainerValue = '.pki';
				var vidbgMp4Value = 'http://abetoo.com/wiki/wp-content/uploads/2017/05/android_arduino.mp4';
				var vidbgWebmValue = '#';
				var vidbgPosterValue = '#';
				var vidbgIsMuted = true;
				var vidbgIsLoop = true;
				var vidbgIsOverlay = false;
				var vidbgOverlayColor = '#888';
				var vidbgOverlayAlpha = '0.3';

				$(vidbgContainerValue).vidbg({
					'mp4': vidbgMp4Value,
					'webm': vidbgWebmValue,
					'poster': vidbgPosterValue,
				}, {
					muted: vidbgIsMuted,
					loop: vidbgIsLoop,
					overlay: vidbgIsOverlay,
					overlayColor: vidbgOverlayColor,
					overlayAlpha: vidbgOverlayAlpha,
				});
			});
		</script>
]]></content:encoded>
			<wfw:commentRss>https://abetoo.com/wiki/knowledge-base/arduino_send_messages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Library Reference</title>
		<link>https://abetoo.com/wiki/knowledge-base/arduino_library-reference</link>
		<comments>https://abetoo.com/wiki/knowledge-base/arduino_library-reference#respond</comments>
		<pubDate>Thu, 18 May 2017 01:18:20 +0000</pubDate>
		<dc:creator><![CDATA[abetoo]]></dc:creator>
		
		<guid isPermaLink="false">http://5.10.24.28/abetoo/wiki/?post_type=ht_kb&#038;p=297</guid>
		<description><![CDATA[Initialization void init(String UUID, String ChannelName, int Heartbeat, void(*messageReceived)(String message)); Used to define the connection parameters. Call this methid within arduino setup procedure. UUID, a unique identifier across all arduino connected to the same channel id. channelName, local channel id. HeartBeat, Timeout. Used to check the health of a connection. [&#8230;]]]></description>
				<content:encoded><![CDATA[<h3 id="initialization" ><em><strong>Initialization</strong></em></h3>
<h4 style="padding-left: 30px;" id="void-initstring-uuid-string-channelname-int-heartbeat-voidmessagereceivedstring-message" ><strong>void init(String UUID, String ChannelName, int Heartbeat, </strong><strong>void(*messageReceived)(String message));</strong></h4>
<h5 style="padding-left: 30px;" id="used-to-define-the-connection-parameters-call-this-methid-within-arduino-setup-procedure" >Used to define the connection parameters. Call this methid within arduino <em><strong>setup</strong> </em>procedure.</h5>
<h4 style="padding-left: 30px;" id="_" ></h4>
<ul>
<li><strong>UUID</strong>, a unique identifier across all arduino connected to the same channel id.</li>
<li><b>channelName</b>, local channel id.</li>
<li><strong>HeartBeat</strong>, Timeout. Used to check the health of a connection.</li>
<li><strong>messageReceived</strong>, a function callback triggered whenever a new message arrives.</li>
</ul>
<h3 id="methods" ><em><strong>Methods</strong></em></h3>
<h4 style="padding-left: 30px;" id="void-abetooloop" ><strong>void abetooloop()</strong></h4>
<p style="padding-left: 60px;">Used to keep the connection openned and ready for new messages. You have to call this method once within arduino <em><strong>loop</strong></em> procedure.</p>
<p style="padding-left: 60px;">No parameters.</p>
<h4 style="padding-left: 30px;" id="states-getstate" ><strong>States getState()</strong></h4>
<p style="padding-left: 60px;">Return the current state of the background connection to the remote server. (DISCONNECTED, CONNECTING, CONNECTED, WAITING, SUBSCRIBING, SUBSCRIBED, SENDING, SENT, DISCONNECTING, STOP)</p>
<p style="padding-left: 60px;">No parameters.</p>
<h4 style="padding-left: 30px;" id="int-sendmessagestring-destinationid-string-body-string-correlationid" ><strong>int sendMessage(String DestinationId, String Body, String Correlationid)</strong></h4>
<p style="padding-left: 60px;">Used to send messages to a remote device using it&#8217;s channel id</p>
<ul>
<li><strong>DestinationId</strong>, channel id of the remote device you want to send a message.</li>
<li><strong>Body</strong>, message as a XML/JSON or as a plain text.</li>
<li><strong>Correlationid, </strong>used to keep track about the messages sent/received. If you want to use a challenge/response approach you can associate the challenge sent message with a correlation id, once a message is received you can use its correlation id to identify the associated challenge message.</li>
</ul>
<h3 id="_" ></h3>
]]></content:encoded>
			<wfw:commentRss>https://abetoo.com/wiki/knowledge-base/arduino_library-reference/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
