Step 12: Tell your impee what firmware to run

You may have noticed I switched browsers (Firefox to Crome). The operation is the same in both these browsers. Note that at time of writing this article, Internet Explorer does not work with the planner.

You will notice your Impee has a button top right and a link bottom right. Click on the top right button and a dialog box will open with a drop down field. Click on the down arrow to open up the list.

You can see a list of various firmware both public and your own created firmware. Under ‘Your firmware’ you will see ‘Wireless Thermistor’ which is the firmware you have just created. Select it. You will see the name of your Impee change to ‘WIRELESS THERMISTOR’ and soon after that, you will start seeing the message ‘Sent: xx.x” (xx.x is some number in degrees).
<p>I've combined this code with another tutorial to make the temperature sensor work with the Plotly system:</p><p> http://dylandylandylan.com/?p=170</p>
<p>hey , did you ever update this code? </p><p>i have gotten most of it to work except it's read temperatures in the 620's . I think it maybe a squigden hight, as i'm not living in a volcano.</p>
<p>haha (re volcanic temps)</p><p>No I haven't as yet. Life has been a bit busy. It is time though :) Hopefully in the next month.</p>
<p>coool . this stuff is hard! so hard, I had to get my wife to help me with the maffs bits . TILL NEXT MONTH </p><p>wish I did have a volcano lear though </p>
<p> imp has changed a lot in year or so . But we fixed some of the bugs in the code !</p><p>so cut and past away </p>
<p>line 105 to 114 ! Make the formatting match , dont just cut and past </p>
<p>// We're going to use an extended Steinhart&ndash;Hart equation to</p><p> // calculate the temperature based on the calculated</p><p> // resistance of the thermistor. We'll include the</p><p> // conversion factor from Kelvin to Celsius</p><p> local tempC = 1.0/(A + B * math.log(ohms) +</p><p> C * math.pow(math.log(ohms), 2) +</p><p> D * math.pow(math.log(ohms), 3)) - 273.15;</p><p> return tempC; // and return the temperature </p><p> }</p><p>}</p>
<p>Hey! I have been trying to do this same tutorial but I am getting the following error: </p><p><strong>Warning</strong>: fopen(data.csv) [<a href="http://lifetym.me/function.fopen" rel="nofollow">function.fopen</a>]: failed to open stream: Permission denied in <strong>D:\Hosting\12193764\html\JSON.php</strong> on line <strong>32</strong><br><strong>Warning</strong>: flock() expects parameter 1 to be resource, boolean given in <strong>D:\Hosting\12193764\html\JSON.php</strong> on line <strong>33</strong><br><strong>Warning</strong>: fopen(latestImpData.txt) [<a href="http://lifetym.me/function.fopen" rel="nofollow">function.fopen</a>]: failed to open stream: Permission denied in <strong>D:\Hosting\12193764\html\JSON.php</strong> on line <strong>41</strong><br><strong>Warning</strong>: flock() expects parameter 1 to be resource, boolean given in <strong>D:\Hosting\12193764\html\JSON.php</strong> on line <strong>42</strong></p><p>Can you tell what am I doing wrong? The imp shows posted successfully everytime. I am posting asynchronously to http://www.lifetym.me/JSON.php file in the new Agent format of electric imp.</p>
<p>I am using Godaddy for the hosting service!</p>
<p>So I was able to fix the issue that I was facing. But now I notice that the data from the imp is reaching the JSON.php file but the file is not accepting the data hence it always finds variables from the imp as null! Any clues why?</p>
<p>Hi :) The tutorial is super, BUT... There is no more planner ot imp's IDE site ... Please update the tutorial O:-)</p>
Awesome tutorial! <br>Just what i was looking for. <br>Cheers from India. <br> <br>I suggest to upload more tutorials on Graph API , aka sensor data plotter on a website <br>that would be much helpful for me as a novice <br> <br>
hi, <br>first of all amazing site!!! <br>i am using your code with a few changes to build a digital meter and i have a question: <br>you the red box i the picture? how do i get rid of that?? <br>i have never used php...
Hi dlemesh, I think the problem exists in the last part of the JSON.php file. When I look at your 'latestImpData.txt' file, it shows the extra info in there. I notice I do have a comment in that last part which does not need to be there. Maybe re-do the last part of your JSON.php file with:<br> <br> <strong>// Create the file that can be read for live updates in a web browser.<br> $fw = fopen(&quot;latestImpData.txt&quot;, 'w');<br> if(flock($fw, LOCK_EX))<br> {<br> &nbsp; fwrite($fw, $target . &quot;|&quot; . $channel . &quot;|&quot; . $dateTime . &quot;|&quot; . number_format($temp, 1) .&quot;|&quot; . number_format($volt, 2) . &quot;|&quot; . $location);<br> &nbsp; fflush($fw);<br> &nbsp; flock($fw, LOCK_UN);<br> }<br> ?&gt;</strong><br> <br> This is the file that is read by the web page. You can see the fwrite line which creates the string and then writes it to the file.<br> <br> The contents of your latestImpData.txt file should have:<br> 300e600a779951c4|1|2013-02-09 14:54:54|28.8|3.28|location<br> <br> I've also posted the files at <a href="http://trev.id.au/imp/imp.zip" rel="nofollow">http://trev.id.au/imp/imp.zip</a> if this makes it easier.<br> <br>
What is the temperature range of this device? For example, can it measure freezing temperatures accurately?
Hi Steve, the sensor I used for this project is a <a href="http://electronhobbies.com/sensors/95-thermistor-ntc-47kohms-2-radial.html" rel="nofollow">NTC Thermistor</a> from Vishay. It has a temperature range of -40C to +125C so I'd say anything above -40C it will provide a measurement for.<br> As to accuracy, I haven't used it below freezing (0C) but what I have found is Thermistors are pretty good for general use. I've used this project next to a known outdoor temp sensor for my weather station and it's been within 1C. I would base my decision to use on &quot;if it's 2 degrees out, will it hurt&quot;.
Step 9: Corrected a copy/paste error in the switch(port) section. It will work now with ports higher than 2. Thanks Chrischi from the electric imp forum. :)
Great project! I've been interested in the Imp and have been looking for an excuse to learn about it. I'm definitely going to build this!
That's great. If you have any questions, feel free to ask.
To display your local time zone, see the comment on the bottom of step 18 (back one). <br>Then just change the text in the this to suit so people know what timezone they are seeing.
To change the date/time to your timezone, find the line: date_default_timezone_set(&quot;Australia/Adelaide&quot;); and change the part between the quotes to your timezone as per: <a href="http://php.net/manual/en/timezones.php" rel="nofollow">http://php.net/manual/en/timezones.php</a>

About This Instructable


151 favorites


More by tvdl: Simple wireless temperature sensor updating web site with electric imp and Thermistor
Add instructable to: