<?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>Particle Photon &#8211; IoT Expert</title>
	<atom:link href="https://iotexpert.com/category/devkits/particle-photon/feed/" rel="self" type="application/rss+xml" />
	<link>https://iotexpert.com</link>
	<description>Engineering for the Internet of Things</description>
	<lastBuildDate>Mon, 18 Sep 2017 11:48:54 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://iotexpert.com/wp-content/uploads/2017/01/cropped-Avatar-32x32.jpg</url>
	<title>Particle Photon &#8211; IoT Expert</title>
	<link>https://iotexpert.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Particle Photon Configuration with Tinker Firmware</title>
		<link>https://iotexpert.com/particle-photon-configuration-with-tinker-firmware/</link>
					<comments>https://iotexpert.com/particle-photon-configuration-with-tinker-firmware/#respond</comments>
		
		<dc:creator><![CDATA[Alan Hawse]]></dc:creator>
		<pubDate>Tue, 19 Sep 2017 10:59:54 +0000</pubDate>
				<category><![CDATA[Particle]]></category>
		<category><![CDATA[Particle Photon]]></category>
		<category><![CDATA[WIFI]]></category>
		<guid isPermaLink="false">https://iotexpert.com/?p=4151</guid>

					<description><![CDATA[Summary In the last article I wrote about using a CY3280 MBR3 Shield on a WICED WiFI 943907AEVAL1F development kit at the GE MegaHackathon.  In the next article I will show you the WICED HTTP firmware that I wrote to connect to the Particle Photon which they were using (I have written about Particle Photon before).  Obviously, [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>Summary</h1>
<p>In the last <a href="https://iotexpert.com/2017/09/14/cy3280-mbr3-wiced-cyw943907/" target="_blank" rel="noopener">article</a> I wrote about using a CY3280 MBR3 Shield on a WICED WiFI 943907AEVAL1F development kit at the <a href="https://iotexpert.com/2017/09/11/cypress-development-kits-ge-mega-hackthon/" target="_blank" rel="noopener">GE MegaHackathon</a>.  In the next article I will show you the WICED HTTP firmware that I wrote to connect to the <a href="https://www.particle.io/products/hardware/photon-wifi-dev-kit" target="_blank" rel="noopener">Particle Photon</a> which they were using (I have written about Particle Photon <a href="https://iotexpert.com/category/devkits/particle-photon/" target="_blank" rel="noopener">before</a>).  Obviously, I like Particle Photon because it is a WICED 43362 WiFi Radio.  In this article, I am going to show you how to get a Particle Photon going with the Tinker firmware.  Then test it with the iOS app, the web console and finally using CURL.  The CURL is just a mechanism to send HTTP Posts to the Tinker firmware, exactly what I will do in the next article on the WICED development kit.</p>
<h1>Configure the Particle Photon</h1>
<p>When you get a fresh Particle Photon out of the box you need to get it introduced to your WiFi network, and attached to your console.  To do this, start by going to setup.particle.io and following the process.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM.png"><img fetchpriority="high" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM.png" alt="Particle Photon Configuration" width="797" height="788" class="alignnone wp-image-4158 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM.png 797w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM-100x100.png 100w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM-600x593.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM-300x297.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.00-PM-768x759.png 768w" sizes="(max-width: 797px) 100vw, 797px" /></a></p>
<p>&nbsp;</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.16-PM.png"><img decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.16-PM.png" alt="Particle Photon Configuration" width="799" height="787" class="alignnone wp-image-4157 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.16-PM.png 799w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.16-PM-600x591.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.16-PM-300x295.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.16-PM-768x756.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.39-PM.png"><img decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.39-PM.png" alt="Particle Photon Configuration" width="903" height="919" class="alignnone wp-image-4156 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.39-PM.png 903w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.39-PM-600x611.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.39-PM-295x300.png 295w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.56.39-PM-768x782.png 768w" sizes="(max-width: 903px) 100vw, 903px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.50.54-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.50.54-AM.png" alt="Particle Photon Configuration" width="976" height="846" class="alignnone wp-image-4164 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.50.54-AM.png 976w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.50.54-AM-600x520.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.50.54-AM-300x260.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.50.54-AM-768x666.png 768w" sizes="auto, (max-width: 976px) 100vw, 976px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.58.55-PM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.58.55-PM.png" alt="Particle Photon Configuration" width="916" height="843" class="alignnone wp-image-4155 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.58.55-PM.png 916w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.58.55-PM-600x552.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.58.55-PM-300x276.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.58.55-PM-768x707.png 768w" sizes="auto, (max-width: 916px) 100vw, 916px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.28-PM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.28-PM.png" alt="Particle Photon Configuration" width="982" height="842" class="alignnone wp-image-4154 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.28-PM.png 982w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.28-PM-600x514.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.28-PM-300x257.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.28-PM-768x659.png 768w" sizes="auto, (max-width: 982px) 100vw, 982px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.56-PM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.56-PM.png" alt="Particle Photon Configuration" width="977" height="842" class="alignnone wp-image-4153 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.56-PM.png 977w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.56-PM-600x517.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.56-PM-300x259.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-4.59.56-PM-768x662.png 768w" sizes="auto, (max-width: 977px) 100vw, 977px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-5.00.06-PM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-5.00.06-PM.png" alt="Particle Photon Configuration" width="976" height="846" class="alignnone wp-image-4152 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-5.00.06-PM.png 976w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-5.00.06-PM-600x520.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-5.00.06-PM-300x260.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-16-at-5.00.06-PM-768x666.png 768w" sizes="auto, (max-width: 976px) 100vw, 976px" /></a></p>
<h1>Testing with iPhone App</h1>
<p>One you have &#8220;claimed&#8221; your Particle Photon and it is connected to the network, then you can talk to it with the Particle iOS app.  Here is what it looked like when I started the App on my phone.  You can see the device called &#8220;iotexpert-example&#8221; (remember that is what I named it from above).  The &#8220;Elkhorn_creek&#8221; Photon is the one that I wrote about in this <a href="https://iotexpert.com/2017/03/30/particle-photon-elkhorn-creek-depth/" target="_blank" rel="noopener">article</a>.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905-576x1024.png" alt="Particle Photon iOS App" width="576" height="1024" class="alignnone wp-image-4169 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4905.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a></p>
<p>Although the console says that I have the Tinker Firmware on the app, I wanted to make sure, so I use the iOS App to re-flash the Tinker Firmware.  You can do this by clicking the new device, then press the little &#8220;&#8230;&#8221; at the top right of the screen.  Finally click &#8220;Reflash Tinker&#8221;. It is awesome how fast that happens.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912-576x1024.png" alt="Particle Photon iOS Flash Firmware" width="576" height="1024" class="alignnone wp-image-4176 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4912.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a></p>
<p>Once I am sure about the version of the Tinker firmware, I test to make sure that things are working correctly.  First I click on &#8220;D7&#8221;</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906-576x1024.png" alt="Particle Photon iOS Tinker App" width="576" height="1024" class="alignnone wp-image-4170 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4906.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a></p>
<p>Which brings up this screen where you can select digitalRead and digitalWrite.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907-576x1024.png" alt="Particle Photon iOS Tinker App" width="576" height="1024" class="alignnone wp-image-4171 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4907.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a></p>
<p>Then when you press the button it will switch from high to low and vice versa.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908-576x1024.png" alt="Particle Photon iOS Tinker App" width="576" height="1024" class="alignnone wp-image-4172 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4908.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a> <a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909-576x1024.png" alt="Particle Photon iOS Tinker App" width="576" height="1024" class="alignnone wp-image-4173 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4909.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a></p>
<p>You can also call the API directly by pressing &#8220;inspect&#8221; then &#8220;Data&#8221;</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911-576x1024.png" alt="Particle Photon iOS digitalwrite Data Function" width="576" height="1024" class="alignnone wp-image-4174 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911-576x1024.png 576w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911-600x1067.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911-169x300.png 169w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911-768x1365.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911.png 1242w" sizes="auto, (max-width: 576px) 100vw, 576px" /></a></p>
<h1>Particle Photon Console</h1>
<p>In addition to using the iOS App, you can also interact with the Photon using the console.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.53.13-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.53.13-AM.png" alt="Particle Photon Console" width="1019" height="489" class="alignnone wp-image-4165 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.53.13-AM.png 1019w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.53.13-AM-600x288.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.53.13-AM-300x144.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.53.13-AM-768x369.png 768w" sizes="auto, (max-width: 1019px) 100vw, 1019px" /></a></p>
<p>When I click on the &#8220;iotexpert-example&#8221; it brings up this screen where I can run the Tinker firmware functions.  In this case I ran &#8220;digitialwrite&#8221; with &#8220;D7,HIGH&#8221; which turns on the LED on the Photon.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM-1024x757.png" alt="Particle Photon Console" width="1024" height="757" class="alignnone wp-image-4166 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM-1024x757.png 1024w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM-600x444.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM-300x222.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM-768x568.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-17-at-11.52.42-AM.png 1333w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/IMG_4911.png"></a></p>
<h1>Testing the Particle Photon with CURL</h1>
<p>The Particle Cloud exposes an API which lets you send Restful API requests to specific devices.  The Unix tool CURL lets me type command line requests (which I will mimic in the next Article using WICED).  The first command that I send is and HTTP GET which will return a JSON document that describes the configuration on my Photon.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c" ">curl https://api.particle.io/v1/devices/iotexpert-example?access_token=1311f67269d6
</pre>
<p>You can see the device name etc in the JSON below.  It also shows that the Tinker firmware has four function built into it.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c">{  
   "id":"2a001b000347353137323334",
   "name":"iotexpert-example",
   "last_app":null,
   "last_ip_address":"69.23.226.142",
   "last_heard":"2017-09-17T15:38:56.406Z",
   "product_id":6,
   "connected":true,
   "platform_id":6,
   "cellular":false,
   "notes":null,
   "status":"normal",
   "current_build_target":"0.5.3",
   "variables":{  

   },
   "functions":[  
      "digitalread",
      "digitalwrite",
      "analogread",
      "analogwrite"
   ]
}</pre>
<p>Then I can send a HTTP POST using Curl to turn on the D7 LED.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="c"> curl https://api.spark.io/v1/devices/2a001b000347354/digitalwrite -d access_token=1311f67269d66b -d params=D7,HIGH</pre>
<p>You can see the Blue LED right next to D7 turns on.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender.jpg"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender-e1505663318933-1024x768.jpg" alt="Particle Photon" width="1024" height="768" class="alignnone wp-image-4162 size-large" srcset="https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender-e1505663318933-1024x768.jpg 1024w, https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender-e1505663318933-600x450.jpg 600w, https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender-e1505663318933-300x225.jpg 300w, https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender-e1505663318933-768x576.jpg 768w, https://iotexpert.com/wp-content/uploads/2017/09/FullSizeRender-e1505663318933.jpg 2038w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<h1>Particle Photon Tinker App</h1>
<p>I wondered where the Tinker App API was documented?  It turns out that the App is available in Particle library.  You can search by typing &#8220;tinker&#8221;</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM-1024x648.png" alt="" width="1024" height="648" class="alignnone size-large wp-image-4183" srcset="https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM-1024x648.png 1024w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM-600x380.png 600w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM-300x190.png 300w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM-768x486.png 768w, https://iotexpert.com/wp-content/uploads/2017/09/Screen-Shot-2017-09-18-at-7.36.38-AM.png 1087w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></p>
<p>The section of code that matters is here.  The function takes a &#8220;String&#8221; and parses it.  It demands that the 2nd character be a PIN number between 0 and 7.  The first character be a capital &#8220;D&#8221;.  Then you need to have a &#8220;HIGH&#8221; (in caps) or a &#8220;LOW&#8221; (in caps)</p>
<pre class="start-line:32 lang:c++ decode:true">/*******************************************************************************
 * Function Name  : tinkerDigitalWrite
 * Description    : Sets the specified pin HIGH or LOW
 * Input          : Pin and value
 * Output         : None.
 * Return         : 1 on success and a negative number on failure
 *******************************************************************************/
int tinkerDigitalWrite(String command)
{
	bool value = 0;
	//convert ascii to integer
	int pinNumber = command.charAt(1) - '0';
	//Sanity check to see if the pin numbers are within limits
	if (pinNumber&lt; 0 || pinNumber &gt;7) return -1;

	if(command.substring(3,7) == "HIGH") value = 1;
	else if(command.substring(3,6) == "LOW") value = 0;
	else return -2;

	if(command.startsWith("D"))
	{
		pinMode(pinNumber, OUTPUT);
		digitalWrite(pinNumber, value);
		return 1;
	}
	else if(command.startsWith("A"))
	{
		pinMode(pinNumber+10, OUTPUT);
		digitalWrite(pinNumber+10, value);
		return 1;
	}
	else return -3;
}</pre>
<p>In order to access the digitialwrite function via the network, they publish it (and some others).</p>
<pre class="lang:c++ decode:true ">/***
 * All the based tinker functions are registered. You can add you own code.
 ***/

// This #include statement was automatically added by the Spark IDE.
#include "Tinker.h"

void setup() {
	//Register all the Tinker functions
	Spark.function("digitalread", tinkerDigitalRead);
	Spark.function("digitalwrite", tinkerDigitalWrite);
	Spark.function("analogread", tinkerAnalogRead);
	Spark.function("analogwrite", tinkerAnalogWrite);
}

void loop() {
}
</pre>
<p>When I first thought about the Tinker firmware I thought that it must be reasonably complex.  But it is not because it takes advantage of the Particle cloud functionality.  All in all what they did is very elegant and simple..</p>
<p>Now that it looks like my Particle Photon is working, in the next article I will show you WICED firmware to read the CapSense buttons and then Turn On/Off the LED on the Photon.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://iotexpert.com/particle-photon-configuration-with-tinker-firmware/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Particle Photon:  Elkhorn Creek Depth</title>
		<link>https://iotexpert.com/particle-photon-elkhorn-creek-depth/</link>
					<comments>https://iotexpert.com/particle-photon-elkhorn-creek-depth/#comments</comments>
		
		<dc:creator><![CDATA[Alan Hawse]]></dc:creator>
		<pubDate>Thu, 30 Mar 2017 16:12:10 +0000</pubDate>
				<category><![CDATA[Particle]]></category>
		<category><![CDATA[Particle Photon]]></category>
		<category><![CDATA[Thing Speak]]></category>
		<category><![CDATA[WIFI]]></category>
		<guid isPermaLink="false">https://iotexpert.com/?p=3296</guid>

					<description><![CDATA[Summary In the previous article I showed you all of the components of the Particle Photon Ecosystem.  All that is cool.  But what can you build?  I have written extensively about the Elkhorn Creek in my backyard, and the system that I built to monitor the water level.  As part of that series of articles I explained that [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>Summary</h1>
<p>In the previous article I showed you all of the components of the <a href="http://particle.io" target="_blank">Particle</a> Photon Ecosystem.  All that is cool.  But what can you build?  I have written extensively about the <a href="http://www.elkhorn-creek.org/creekServer/creekPlots/current.html" target="_blank">Elkhorn Creek</a> in my backyard, and the <a href="https://iotexpert.com/category/solutions/elkhorn-creek/" target="_blank">system</a> that I built to monitor the water level.  As part of that series of articles I explained that I have a 4-20ma current loop that turns pressure into water level read <a href="https://iotexpert.com/2016/01/25/the-elkhorn-creek/" target="_blank">here</a> .  In this article I will:</p>
<ul>
<li>Attach the Photon to my Creek System Current Loop</li>
<li>Write the Firmware in the Particle Cloud IDE to publish W</li>
<li>Send events to the Particle Cloud &amp; monitor</li>
<li>Use Webhooks to send the data to ThingSpeak.com</li>
</ul>
<h1>Attach Particle Photon to Creek System</h1>
<p>To interface to a 4-20mA current look you just attach it to a 51.1 ohm resistor to serve as a trans-impedence amplifier.  Here is the PSoC Creator schematic for the board:  Using this schematic, the system will generate a voltage between (51.1 Ohms * 4ma = 204.4mV) and (51.1Ohm * 20mA = 1022 mV).   This voltage can then be attached to an Analog To Digital Convertor, then converted digitally into a Pressure, then a water depth.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2016/02/creekOverallSchematic.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2016/02/creekOverallSchematic.png" alt="" width="902" height="666" class="alignnone size-full wp-image-553" srcset="https://iotexpert.com/wp-content/uploads/2016/02/creekOverallSchematic.png 902w, https://iotexpert.com/wp-content/uploads/2016/02/creekOverallSchematic-600x443.png 600w, https://iotexpert.com/wp-content/uploads/2016/02/creekOverallSchematic-300x222.png 300w" sizes="auto, (max-width: 902px) 100vw, 902px" /></a></p>
<p>I decided that the easiest thing to do with the Particle Photon was to attach the pin A0 to the highside input.  This was easy as I put a loop on the <a href="https://iotexpert.com/2016/02/07/the-creek-board-1-1/" target="_blank">Creek Board</a>.  The loop is labeled &#8220;PRES&#8221;.  The picture is a bit ugly as I was standing in the dark in the rafters of my barn.  Sorry.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/IMG_3990.jpg"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/IMG_3990-e1490221901847.jpg" alt="Particle Photon attached to Elkhorn Creek Water Level 1.1" width="3024" height="4032" class="alignnone wp-image-3307 size-full" /></a></p>
<h1>Particle Photon Firmware</h1>
<p>When you look at the main loop of the firmware, lines 23-40 it does three things</p>
<ul>
<li>Reads the ADC voltage on Pin A0</li>
<li>Applies an Infinite Impulse Response Filter (IIR) with coefficients of 7/8 and 1/8.  This is low pass filter.</li>
<li>Turns the voltage into depth.  This is done by turning (4-20ma) into (0-15 psi) then PSI into Feet</li>
</ul>
<p>Then, on lines 34-39, I use the system time to figure out if it is time to publish again.  I publish every &#8220;INTERVAL&#8221;.</p>
<p>In order to test the Particle Cloud interface to the Photon, I setup all of the intermediate calculation of depth as &#8220;Particle.variable&#8221;s which allows me to inspect them remotely.</p>
<pre class="lang:c++ range:1-100 decode:true" title="Particle Photon Firmware">uint32_t nextTime; // when do you want to publish the data again
const uint32_t INTERVAL = (5*60*1000); // every 5 minutes in milliseconds
const double  MVPERCOUNT = (3330.0/4096.0); // 3300mv and 2^12 counts
uint32_t current;
uint32_t filter=0;
double depth;
double percent;
double psi;
double voltage;
double percentTemp;

void setup() {
    nextTime =  millis() + INTERVAL;
    // setup variables so that they can be polled
    Particle.variable("filter",filter);
    Particle.variable("adc",current);
    Particle.variable("percent",percent);
    Particle.variable("voltage",voltage);
    Particle.variable("psi",psi);
    Particle.variable("depth",depth);
}

void loop() {
   
   char buff[128];
   
    current = analogRead(A0);
    filter = ((filter&gt;&gt;3) * 7) + (current&gt;&gt;3); // IIR Filter with 7/8 and 1/8 coeffecients
    voltage  = ((double)filter) * MVPERCOUNT; // Convert ADC to Milivolts
    percent = ( voltage - (51.1*4.0) ) / (51.1 * (20.0-4.0)); // 51.1 ohm resistor... 4-20ma 
    psi = percent * 15.0; // Range of pressure sensor
    depth = psi / 0.53; // Magic 0.53psi per foot

   if(millis() &gt; nextTime)
   {
        sprintf(buff,"%.1f",depth);
        Particle.publish("CreekDepth",buff);
        nextTime = millis() + INTERVAL;
   }
}</pre>
<h1>Sending Events to the Particle Cloud &amp; Monitor</h1>
<p>Once I flashed the firmware with the very cool Over-The-Air Bootloader, I go to the Particle Console and click on my device.  As soon as I do that I see the &#8220;Particle.variable&#8221;s that I defined in the firmware.  One by one I press &#8220;get&#8221; and after a second the data is displayed on the screen.  I am not exactly sure how the exactly works, but it is cool.</p>
<h1><a href="https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud.png" alt="Particle Cloud Device Console" width="1500" height="790" class="alignnone wp-image-3308 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud.png 1500w, https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud-600x316.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud-300x158.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud-768x404.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/consoleCloud-1024x539.png 1024w" sizes="auto, (max-width: 1500px) 100vw, 1500px" /></a></h1>
<p>After inspecting the variables, I go the Logs page and look to see what the events are.  You can see that every 5 minutes (about) there is an event called &#8220;CreekDepth&#8221; with a -0.0 or so. That is good as it means that the Particle Photon is publishing regularly.  The answer is 0.0 (or about 0.0) as the Elkhorn Creek if not doing anything right now.  The other events are part of the web hook that I setup (and will talk about in the next section).</p>
<h1><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM.png" alt="Particle Cloud Device Event Log" width="1483" height="1136" class="alignnone wp-image-3309 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM.png 1483w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM-600x460.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM-300x230.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM-768x588.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.46.47-PM-1024x784.png 1024w" sizes="auto, (max-width: 1483px) 100vw, 1483px" /></a></h1>
<h1>Using WebHooks to send data to ThingSpeak.com</h1>
<p>Unless I am missing something, the Particle Cloud does not store your actual data.  They do have a mechanism to take Events from your devices and trigger a &#8220;WebHook&#8221;.  This is basically a RESTFul API call to another cloud.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/webhooks-overview.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/webhooks-overview.png" alt="Particle Cloud Webhooks" width="800" height="431" class="alignnone size-full wp-image-3324" srcset="https://iotexpert.com/wp-content/uploads/2017/03/webhooks-overview.png 800w, https://iotexpert.com/wp-content/uploads/2017/03/webhooks-overview-600x323.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/webhooks-overview-300x162.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/webhooks-overview-768x414.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /></a></p>
<p>They call these &#8220;integrations&#8221; and you configure them on the Console.  When you press &#8220;Integrations&#8221; you end up with this screen which gives you the option of editing a current webhook or creating a new one.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM.png" alt="Particle Cloud Integrations" width="1038" height="412" class="alignnone wp-image-3313 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM.png 1038w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM-600x238.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM-300x119.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM-768x305.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.00.05-AM-1024x406.png 1024w" sizes="auto, (max-width: 1038px) 100vw, 1038px" /></a></p>
<p>When you click on &#8220;new integration&#8221; it gives you the option of connecting to Google, Microsoft Azure or Webhook.  I havent tried Google or Azure so for this article Ill stick with a Webhook.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM.png" alt="Particle Cloud New Integration" width="1104" height="365" class="alignnone wp-image-3312 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM.png 1104w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM-600x198.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM-300x99.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM-768x254.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-5.58.37-AM-1024x339.png 1024w" sizes="auto, (max-width: 1104px) 100vw, 1104px" /></a></p>
<p>I started with a WebHook to the <a href="https://thingspeak.com" target="_blank">ThingSpeak</a> Cloud (because they show a nice <a href="https://docs.particle.io/guide/tools-and-features/webhooks/" target="_blank">example</a> in the documentation).  ThingSpeak is run by the <a href="https://www.mathworks.com" target="_blank">MathWorks</a> people (same as Matlab).  They call ThingSpeak &#8220;an open IoT with Matlab Analytics&#8221;.  OK sounds cool.  In order to use it to collect and display data I start by creating a new account.  Then I click on the &#8220;New Channel&#8221; button to create an &#8220;Elkhorn Creek Depth&#8221; channel.  On this screen I say that there will be only one field &#8220;CreekDepth&#8221;.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.21.36-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.21.36-AM.png" alt="ThingSpeak Create New Channel" width="663" height="551" class="alignnone wp-image-3314 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.21.36-AM.png 663w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.21.36-AM-600x499.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-23-at-6.21.36-AM-300x249.png 300w" sizes="auto, (max-width: 663px) 100vw, 663px" /></a></p>
<p>In order to write data into this channel you need to have the API keys which give your Restful API call the authority to write into the database.  Press &#8220;API Keys&#8221; and you will see this screen.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/new-channel.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/new-channel.png" alt="ThingSpeak Channel API Keys" width="1355" height="1125" class="alignnone wp-image-3318 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/new-channel.png 1355w, https://iotexpert.com/wp-content/uploads/2017/03/new-channel-600x498.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/new-channel-300x249.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/new-channel-768x638.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/new-channel-1024x850.png 1024w" sizes="auto, (max-width: 1355px) 100vw, 1355px" /></a></p>
<p>Now that I have an active channel (and I know the channel number and API write key) I go back to the Particle Cloud Integrations tab and create a Webhook.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/webhook.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/webhook.png" alt="Particle Cloud Edit Integration" width="1310" height="1125" class="alignnone wp-image-3316 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/webhook.png 1310w, https://iotexpert.com/wp-content/uploads/2017/03/webhook-600x515.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/webhook-300x258.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/webhook-768x660.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/webhook-1024x879.png 1024w" sizes="auto, (max-width: 1310px) 100vw, 1310px" /></a></p>
<p>Each time the &#8220;CreekDepth&#8221; event occurs, the Particle Cloud will do an API call to the ThingSpeak cloud and insert the new data.  On the ThingSpeak Cloud there is a chart of the data, and a handy-dandy way to insert the chart into your webpage.  Here it is for the Elkhorn Creek showing the last 6 hours of data which is flat at the time of this writing, but maybe when you read this page it will be raining in Kentucky and you will see something interesting.</p>
<h1><iframe loading="lazy" width="450" height="260" style="border: 1px solid #cccccc;" src="https://thingspeak.com/channels/246112/charts/1?bgcolor=%23ffffff&amp;color=%23d62020&amp;dynamic=true&amp;results=60&amp;type=line&amp;yaxismax=15&amp;yaxismin=0"></iframe></h1>
<p>I guess at this point I have a number of questions which I will leave to the future:</p>
<ul>
<li>Exactly what is the form of the request made to the ThingSpeak cloud?</li>
<li>What is the mapping between the event &#8211;&gt; API Request</li>
<li>What is the protocol for Particle.variables?</li>
<li>How does the Microsoft integration work?</li>
<li>How does the Google integration work?</li>
<li>How do I save power on the Photon?</li>
</ul>
<p>I suppose Ill leave these questions to future posts.  If you have other questions leave them as I comment and Ill take a crack at trying to figure them out.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://iotexpert.com/particle-photon-elkhorn-creek-depth/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Particle Photon:  An Overview of the Particle Ecosystem</title>
		<link>https://iotexpert.com/particle-photon/</link>
					<comments>https://iotexpert.com/particle-photon/#respond</comments>
		
		<dc:creator><![CDATA[Alan Hawse]]></dc:creator>
		<pubDate>Thu, 23 Mar 2017 10:00:47 +0000</pubDate>
				<category><![CDATA[Particle Photon]]></category>
		<guid isPermaLink="false">https://iotexpert.com/?p=3268</guid>

					<description><![CDATA[Summary Over the last few days I have spent some time with the Particle Photon and looking around at the Particle Cloud, the Development Kits, the Documentation and Development Tools.  Fundamentally, Particle has built a very ambitious end-to-end cloud development platform.  I think that they have everything necessary to built a complete IoT solution into your system. [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>Summary</h1>
<p>Over the last few days I have spent some time with the <a href="https://www.particle.io/products/hardware/photon-wifi-dev-kit" target="_blank">Particle Photon</a> and looking around at the Particle Cloud, the Development Kits, the Documentation and Development Tools.  Fundamentally, Particle has built a very ambitious end-to-end cloud development platform.  I think that they have everything necessary to built a complete IoT solution into your system.  Obviously, I like them because they use a <a href="http://www.cypress.com/products/ieee-80211-abgn-wlan-sdio-usb-and-mimo" target="_blank">Cypress 43362 WICED WiFi</a> chip as the core of their solution, but the rest is cool as well.  Particle also offers a cellular connectivity solution using <a href="https://www.u-blox.com/en/u-blox-products" target="_blank">uBlox</a>, but I didn&#8217;t try that.  In this article I will give you a brief introduction to all of the components of their ecosystem including:</p>
<ul>
<li>Particle Photon WiFi</li>
<li>Particle Photon Development Kits</li>
<li>Particle Photon Development Environment</li>
<li>Particle Photon Support Tools</li>
<li>Documentation</li>
<li>Particle Cloud Console</li>
</ul>
<p>To develop with Particle you write your firmware in C++ with an Arduino library clone (many/most? of the APIs and libraries that you know and love are ported into the system).  The libraries also include a bunch of APIs for transferring actions and data to/from the cloud.  Once you have written the firmware you can flash you board either directly through the USB port or through the Cloud over-the-air bootloader (which works great)</p>
<h1>Particle Photon WiFi</h1>
<p>Particle makes two modules, called <a href="https://store.particle.io/products/p0" target="_blank">P0</a> ($10) and <a href="https://store.particle.io/products/p1" target="_blank">P1</a>, ($12) which you can build into your system.  Both are FCC certified modules that use the Cypress 43362 WICED WiFi chip which is 2.4GHz 802.11a/b/g/n paired (unfortunately) with a STM MCU to run WICED &amp; the Photon Environment.  Both of the modules are PCB circuit boards with QFN style pads on the bottom that let you solder them into your system.  The P0 is smaller (11mm x 12mm) but needs an antenna, and P1 is a bit bigger (28mm x 20mm) but has a PCB Antenna and SMA connector.  Here is a picture which I borrowed from the Particle Website.  The P0 is on the right, the P1 is in the middle, then on the left is a development kit with the P0 soldered into it.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling.png" alt="Particle Photon WiFi" width="1200" height="900" class="alignnone wp-image-3270 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling.png 1200w, https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling-600x450.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling-300x225.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling-768x576.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/photons-scaling-1024x768.png 1024w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></a></p>
<h1>Particle Photon Development Kits</h1>
<p>Photon makes essentially one basic <a href="https://store.particle.io/collections/photon" target="_blank">development board</a> (shown above on the left) as well as a bunch of different <a href="https://store.particle.io/collections/shields-and-kits" target="_blank">support boards and package deals</a>.  The basic development kit is $19 and has a Photon P0, an antenna, an SMA connector for an external antenna, two buttons (reset and setup), one user LED, a USB programming/power connector and 100 mil center pins with the P0 pins broken out.  One very cool feature of the board is that the breakout pins are castellated on the side of the board so that you could solder it directly into your product.</p>
<p>One of the boards that I ended up using was a (now obsolete) SparkFun kit that has a Photon P1 soldered into an Arduino footprint board:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/IMG_3988.jpg"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/IMG_3988.jpg" alt="Particle Photon WiFi - SparkFun RedBoard" width="4032" height="3024" class="alignnone wp-image-3274 size-full" /></a></p>
<p>Here is a screenshot of many of the <a href="https://store.particle.io/collections/shields-and-kits" target="_blank">development kit packages</a> you can buy directly from Photon:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM.png" alt="Particle Photon WiFi Development Kits" width="1082" height="1283" class="alignnone wp-image-3277 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM.png 1082w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM-600x711.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM-253x300.png 253w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM-768x911.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.50.09-AM-864x1024.png 864w" sizes="auto, (max-width: 1082px) 100vw, 1082px" /></a></p>
<p>In addition there are several other makers of support boards including <a href="https://www.sparkfun.com/search/results?term=photon" target="_blank">SparkFun</a>, <a href="https://www.adafruit.com/?q=photon&amp;" target="_blank">Adafruit</a> and <a href="https://www.seeedstudio.com/s/photon.html" target="_blank">SeeedStudio</a>.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM.png" alt="SparkFun Photon Kits" width="1127" height="1060" class="alignnone wp-image-3272 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM.png 1127w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM-600x564.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM-300x282.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM-768x722.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.38.39-AM-1024x963.png 1024w" sizes="auto, (max-width: 1127px) 100vw, 1127px" /></a></p>
<p><a href="https://www.adafruit.com/?q=photon&amp;" target="_blank">Adafruit</a>:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM.png" alt="AdaFruit Photon Kit" width="1026" height="241" class="alignnone wp-image-3273 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM.png 1026w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM-600x141.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM-300x70.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM-768x180.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.41.14-AM-1024x241.png 1024w" sizes="auto, (max-width: 1026px) 100vw, 1026px" /></a></p>
<p><a href="https://www.seeedstudio.com/s/photon.html" target="_blank">SeeedStudio</a>:</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.43.06-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.43.06-AM.png" alt="SeeedStudio Photon Kits" width="927" height="738" class="alignnone wp-image-3276 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.43.06-AM.png 927w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.43.06-AM-600x478.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.43.06-AM-300x239.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.43.06-AM-768x611.png 768w" sizes="auto, (max-width: 927px) 100vw, 927px" /></a></p>
<h1>Particle Photon Development Environment</h1>
<p>Particle offers two integrated development environments, one web based and one computer client based on <a href="https://atom.io" target="_blank">Atom</a>.  Both are approximately Arduino clones&#8230; and both work very well.</p>
<p>The web based environment includes a code editor, compiler, over-the-air flash utility. and library utility.  Here is screenshot of one of the programs that I was working on.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM.png" alt="Particle Photon Cloud IDE" width="1042" height="862" class="alignnone wp-image-3280 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM.png 1042w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM-600x496.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM-300x248.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM-768x635.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-6.55.10-AM-1024x847.png 1024w" sizes="auto, (max-width: 1042px) 100vw, 1042px" /></a>And the desktop environment, which works on Windows, Mac and Linux, is very well integrated and &#8220;feels&#8221; just like the web environment.  I was amazed that as soon as I installed the tool it was connected to the Particle Cloud and to my devices.  I created a very simple blink the led program.  After I pressed the lightning bolt&#8230; 15 seconds later my board was bootloaded over the air.  Here is a screenshot from my Mac.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM.png" alt="Particle Photon Desktop Client IDE" width="1052" height="718" class="alignnone wp-image-3282 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM.png 1052w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM-600x410.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM-300x205.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM-768x524.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-7.34.24-AM-1024x699.png 1024w" sizes="auto, (max-width: 1052px) 100vw, 1052px" /></a></p>
<h1>Particle Photon Support Tools</h1>
<p>There are two sets of command line tools that you can use to interact with the Photons, dfu-util and the Particle-cli.</p>
<p>The first is &#8220;<a href="http://dfu-util.sourceforge.net" target="_blank">dfu-util</a>&#8221;  which I didn&#8217;t know anything about until I started using the Photons.  DFU-UTIL is a USB bootloader host that allows you to update sections of the Photons firmware.  When I took my boards out of the box they had very old system firmware and things were not connecting correctly.  I ended up having to download new system firmware and then install it on the boards.  The instructions were on <a href="https://docs.particle.io/support/troubleshooting/firmware-upgrades/photon/" target="_blank">this</a> website.</p>
<p>The second tool, called the <a href="https://docs.particle.io/guide/tools-and-features/cli/photon/" target="_blank">Particle Command Line Interface</a> is also really cool.   Once you install it you can upgrade firmware, send commands, read and write data, call functions etc on your devices.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-8.29.37-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-8.29.37-AM.png" alt="Particle Command Line Interface" width="537" height="369" class="alignnone wp-image-3286 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-8.29.37-AM.png 537w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-8.29.37-AM-300x206.png 300w" sizes="auto, (max-width: 537px) 100vw, 537px" /></a></p>
<h1>Documentation</h1>
<p>The bottom line is the documentation is outstanding, something that is a rare and wonderful thing in the business.  You can find it on their <a href="https://docs.particle.io/guide/getting-started/intro/photon/" target="_blank">website</a>.  Here is a screenshot of the first page.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM.png" alt="Particle Photon Documentation" width="1027" height="751" class="alignnone wp-image-3288 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM.png 1027w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM-600x439.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM-300x219.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM-768x562.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.07.19-AM-1024x749.png 1024w" sizes="auto, (max-width: 1027px) 100vw, 1027px" /></a></p>
<h1>Particle Cloud</h1>
<p>An IoT device isn&#8217;t worth much unless it is integrated with the cloud.  Particle provides a bunch of things in their cloud.  In addition they give you the ability to drive data and events into other clouds.  With the Particle Cloud you can</p>
<ol>
<li>From the cloud, read and write data from devices</li>
<li>Push and retrieve data from your device to the cloud</li>
<li>You can manage and provision devices</li>
<li>You can flash new firmware OTA to your devices</li>
</ol>
<p>There is a free tier for makers and experiments which includes up to about 25 devices and 250K transactions per month.  Beyond that they have several subscription levels.  In the screen shot below you can see my two devices (one called &#8220;Red-board&#8221; and one called &#8220;test1&#8221;).  With this interface I can query the device and run &#8220;functions&#8221; which are like remote procedure calls.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/console.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/console.png" alt="Particle Cloud" width="1500" height="882" class="alignnone wp-image-3290 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/console.png 1500w, https://iotexpert.com/wp-content/uploads/2017/03/console-600x353.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/console-300x176.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/console-768x452.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/console-1024x602.png 1024w" sizes="auto, (max-width: 1500px) 100vw, 1500px" /></a></p>
<p>In the console log you can see all of the events pertaining to your device.  In the screenshot below you can see that I changed the state of the button a bunch of times on the &#8220;Red-board&#8221;.  You can also see where the &#8220;test1&#8221; board was reset and re-attached to the network.</p>
<p><a href="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM.png"><img loading="lazy" decoding="async" src="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM.png" alt="Particle Cloud" width="1279" height="754" class="alignnone wp-image-3291 size-full" srcset="https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM.png 1279w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM-600x354.png 600w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM-300x177.png 300w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM-768x453.png 768w, https://iotexpert.com/wp-content/uploads/2017/03/Screen-Shot-2017-03-22-at-11.14.32-AM-1024x604.png 1024w" sizes="auto, (max-width: 1279px) 100vw, 1279px" /></a></p>
<p>In the next Particle post I will make something&#8230;. what?  Im not sure yet.  But Ill think of something.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://iotexpert.com/particle-photon/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
