tag:blogger.com,1999:blog-353524322024-03-13T17:05:04.206+00:00Michael SaunbyI think, therefore I'm probably human.Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.comBlogger121125tag:blogger.com,1999:blog-35352432.post-83545314986085066952016-04-08T17:48:00.000+01:002016-06-17T20:58:15.224+01:00Tech giants and commercial weather and climate predictionUpdate: See also<span style="background-color: white; color: #202020; font-family: "arial" , sans-serif; font-size: 13px; line-height: 18.2px;"><span style="background-color: white; font-size: 13px; line-height: 18.2px;"> </span></span><a href="http://arstechnica.com/science/2016/06/with-iphones-and-computer-models-do-we-still-need-weather-forecasters/">http://arstechnica.com/science/2016/06/with-iphones-and-computer-models-do-we-still-need-weather-forecasters/</a><br />
<br />
<br />
<br />
Much like aerospace and telecommunications the world of weather prediction has been dominated by government departments and international organisations for most of its history. However in recent years things have really started to change. Sure there have always been one man and a dog private outfits selling wishful thinking to newspapers, much as the astrologers do, but detailed accurate forecasts for the last 25 years or so have always been the product of specialised computer models running on high performance computers, the so called supercomputers from makers such as Cray.<br />
<br />
Every country in the world has a weather service, as a minimum it makes observations that it then shares as part of a global network and issues forecasts for civil aviation. Most do a great deal more, providing valuable services that protect life and property and enable effective use of natural resources for the production of food, energy, and more. Only the very largest and wealthiest run sophisticated computer models providing accurate forecasts for land, sea and air across the globe. However an established practice of international collaboration means that weather services in even the poorest, or poorly governed, countries have access to a constant stream of forecast model output, satellite imagery and other data.<br />
<br />
So what are these recent changes? Well two recent, and significant, news story headlines look like this -<br />
<br />
<ul>
<li><a href="http://www-03.ibm.com/press/us/en/pressrelease/48884.wss">IBM Closes Deal to Acquire The Weather Company’s Product and Technology Businesses</a></li>
<br />
<li><a href="http://www.panasonic.aero/News/Articles/PanasonicWeatherSolutionsIntroducesPanasonicG.aspx">Panasonic Weather Solutions Introduces Panasonic Global 4D Weather –The World’s Most Advanced Global Weather Forecasting Platform</a></li>
</ul>
<br />
What do these developments mean for users of weather forecasts and the established national weather services? One way of trying to evaluate these developments is through the sort of tools and thinking used by MBA graduates. These are the type of managers who are often brought in to make such business decisions in the first place, and also to evaluate the moves being made by rivals.<br />
One such tool would be Porter's five forces, there's a simple introduction here at <a href="https://www.mindtools.com/pages/article/newTMC_08.htm">MindTools</a> <br />
In the case of Panasonic we find that they've moved from being one of many suppliers to one, albeit globally important, national weather service to being a rival forecasting service. Apparently this wasn't planned, so also shows how it's now relatively simple to acquire and use the technology and expertise needed to "launch" a weather forecast model.<br />
<br />
<div class="p1">
<span class="s1"><span style="font-family: "verdana" , sans-serif;"><i>From 2004 to 2011 it also sold its airplane weather data to NOAA. In reviews of the usefulness of that Panasonic weather information, known as Tropospheric Airborne Meteorological Data Reporting, or TAMDAR, agency employees reported that it significantly improved their forecast skill.</i></span></span></div>
<div class="p2">
<span style="font-family: "verdana" , sans-serif;"><i><span class="s2"></span><br /></i></span></div>
<br />
<div class="p3">
<span class="s2"><span style="font-family: "verdana" , sans-serif;"><i>But when budget cuts came, the agency stopped purchasing from Panasonic. The company shifted its business to making custom forecasts for the private sector, Jacobs said, even though its original business plan was based on selling to NOAA. </i></span></span><span style="font-family: "verdana" , sans-serif;"><a href="http://www.eenews.net/stories/1059997252">http://www.eenews.net/stories/1059997252</a> April 2014</span></div>
<div class="p3">
<span class="s2"><br /></span></div>
Most scientists, forecasters and administrators in the existing major government owned weather services are likely, for the time being, to react - So what? We've got forecasts that are at least as good and are continuing to improve, and in those smaller services that receive free forecasts from ECMWF and similar they'll be unable to imagine ever being in a position to buy an expensive commercial service. I expect the decisions as to what happens next will likely be made elsewhere, so their position might not be all that important. There are now commercial services that can directly substitute for what are very complicated public services involving international collaboration, rapid sharing of data, the development of space programmes, standards, and much more. I'm impressed - this will, I'm sure, very quickly change the world I work in.<br />
<br />
More about IBM's weather services<br />
<a href="http://www.ibm.com/analytics/us/en/business/weather-insight.html">http://www.ibm.com/analytics/us/en/business/weather-insight.html</a><br />
<br />
More about Panasonic's weather forecasting platform<br />
<a href="http://www.airdat.com/about-airdat/">http://www.airdat.com/about-airdat/</a><br />
<br />
And latest news is of IBM also showing an interest in aviation services<br />
<a href="http://www.zdnet.com/article/ibms-the-weather-company-partners-with-gogo-for-real-time-turbulence-reports/">http://www.zdnet.com/article/ibms-the-weather-company-partners-with-gogo-for-real-time-turbulence-reports/</a><br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-39172800594520595222015-11-28T18:07:00.001+00:002015-11-28T18:07:07.215+00:00Dress For Our Time<div class="storify"><iframe src="//storify.com/msaunby/dress-for/embed?border=false" width="100%" height="750" frameborder="no" allowtransparency="true"></iframe><script src="//storify.com/msaunby/dress-for.js?border=false"></script><noscript>[<a href="//storify.com/msaunby/dress-for" target="_blank">View the story "Dress For Our Time " on Storify</a>]</noscript></div>Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-88121106757381622632015-11-11T12:33:00.003+00:002015-11-11T12:33:31.666+00:00Mozilla Festival<div class="storify"><iframe src="//storify.com/msaunby/mozfest-2015/embed?border=false" width="100%" height="750" frameborder="no" allowtransparency="true"></iframe><script src="//storify.com/msaunby/mozfest-2015.js?border=false"></script><noscript>[<a href="//storify.com/msaunby/mozfest-2015" target="_blank">View the story "MozFest 2015" on Storify</a>]</noscript></div>Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-72888459379722715192015-09-01T21:00:00.001+01:002015-11-10T10:00:47.755+00:00Tim Hunt and being #DawkinsedFor a couple of days my Twitter notificiations have been flowing fast and furious. Here's why.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-MJmkojY8ZIc/VeX8PmxhRrI/AAAAAAAAMak/u9iT9q0LIsE/s1600/Screenshot%2B2015-08-31%2B13.47.28.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="468" src="http://3.bp.blogspot.com/-MJmkojY8ZIc/VeX8PmxhRrI/AAAAAAAAMak/u9iT9q0LIsE/s640/Screenshot%2B2015-08-31%2B13.47.28.png" width="640" /></a></div>
<br />
<h3>
TL;DR</h3>
Getting the last laugh is (I believed) a common English idiom. It has nothing to do with belly laughs and little to do with jokes, hence what I felt was a cleverly constructed Tweet. Let me explain; to me it means despite early ridicule a person goes on to achieve more than those who mocked. Usage might be something like this -<br />
<br />
<i>They mocked him at school for his shyness with girls but got the last laugh when he married the prettiest woman in the lab, followed by a Nobel prize!</i><br />
<br />
Clearly achieving greatness and then being mocked is not getting the last laugh.<br />
<br />
<h3>
Long version for those with interest in who Professor Tim Hunt is, sock puppets and more</h3>
Right now, Tuesday evening, the number of retweets and favourites for Dawkins response stands at 53 retweets and 239 favourites. Follow the link to check for any updates, and maybe check out who all these Dawkins fans are.<br />
<br />
<a href="https://twitter.com/RichardDawkins/status/638109171129425921" target="_blank">https://twitter.com/RichardDawkins/status/638109171129425921</a><br />
<br />
Odd eh? So what's going on? I'll fill in more as time permits but thought I'd better jot down some notes while I have time. I did find this rather interesting, and probably relevant blog post that seems to relate, and well worth reading.<br />
<br />
<a href="http://blogs.plos.org/absolutely-maybe/2015/08/28/the-value-of-3-degrees-of-separation-on-twitter/">The Value of 3 Degrees of Separation on Twitter</a> by Hilda Bastian.<br />
<br />
<h3>
Distinguished Me</h3>
As for Dawkins's question, I assumed it was rhetorical, since If I was properly distinguished he'd already know who I was, and perhaps even leap to my defence - after all I'm a 50 year old white Englishman and lifelong atheist. Well except as a young child, since my parents had the sense to protect me from indoctrination. However I did go to school, so have a reasonable, if imperfect, command of my native language. Which, IMHO, is the significant matter here. What??? you screech in a determined effort to be offended by my lack of regard for a Nobel laureate. Well take a look at this -<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-L3hziEEkwss/VeYCRFmUs-I/AAAAAAAAMa8/ztk-ukUbVPQ/s1600/Screenshot%2B2015-09-01%2B20.52.36.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="342" src="http://1.bp.blogspot.com/-L3hziEEkwss/VeYCRFmUs-I/AAAAAAAAMa8/ztk-ukUbVPQ/s400/Screenshot%2B2015-09-01%2B20.52.36.png" width="400" /></a></div>
<br />
<br />
<a href="http://www.telegraph.co.uk/news/science/science-news/11732143/Sir-Tim-Hunt-deserved-to-lose-his-job-over-chauvinist-comments-Nobel-Prize-winner-says.html" target="_blank">http://www.telegraph.co.uk/news/science/science-news/11732143/Sir-Tim-Hunt-deserved-to-lose-his-job-over-chauvinist-comments-Nobel-Prize-winner-says.html</a><br />
<br />
And if you favour the spoken word there's this -<br />
<br />
<a href="http://www.bbc.co.uk/programmes/p02tc22c" target="_blank">BBC Radio 4 Today Programme - Tim Hunt</a><br />
<br />
Though not distinguished I am from time to time available for a chat. So if you'd like to meet and discuss any of the things I do have real knowledge of, and Tim Hunt isn't one, I'll be in London a couple of times in coming weeks.<br />
<br />
<a href="http://www.vam.ac.uk/whatson/event/5566/digital-design-weekend-2015-1302807124/" target="_blank">Digital Design Weekend at the V&A 26 and 27 September</a>.<br />
<br />
and<br />
<br />
<a href="https://2015.mozillafestival.org/" target="_blank">Mozilla Festival 7 and 8 November.</a><br />
<br />
<br />
I'll make no claim that meeting me would justify the ticket price, but fortunately it's an absolute bargain anyway if you have even a passing interest in technology, the web, and our freedom to express ourselves online.<br />
<br />
<br />
Final word<br />
<br />
<blockquote class="twitter-tweet" lang="en">
<div dir="ltr" lang="en">
<a href="https://twitter.com/TonyJHopkinson">@TonyJHopkinson</a> it is one thing to disagree with him and say why. That would be fine. Calling him an idiot is another matter.</div>
— Richard Dawkins (@RichardDawkins) <a href="https://twitter.com/RichardDawkins/status/638111533046833152">August 30, 2015</a></blockquote>
<br />
Afterword (10 Nov 2015)<br />
<br />
<a href="https://medium.com/@danwaddell/saving-tim-hunt-97db23c6ee93" target="_blank">The campaign to exonerate Tim Hunt for his sexist remarks in Seoul is built on myths, misinformation, and spin.</a><br />
<br />
<script async="" charset="utf-8" src="//platform.twitter.com/widgets.js"></script>
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-4623421996910521582015-08-26T13:45:00.002+01:002015-08-26T15:13:59.117+01:00No commentThis happened - <a href="http://blog.metoffice.gov.uk/2015/08/23/met-office-in-the-news-bbc-weather-contract/">http://blog.metoffice.gov.uk/2015/08/23/met-office-in-the-news-bbc-weather-contract/</a><br />
<br />
So I've gathered some links.<br />
<br />
<a href="http://ted.europa.eu/udl?uri=TED:NOTICE:186634-2014:TEXT:EN:HTML">http://ted.europa.eu/udl?uri=TED:NOTICE:186634-2014:TEXT:EN:HTML</a><br />
<br />
<a href="http://www.bbc.co.uk/blogs/aboutthebbc/entries/3d035f6d-0ae7-4a9d-81dd-665bb57b27f6">http://www.bbc.co.uk/blogs/aboutthebbc/entries/3d035f6d-0ae7-4a9d-81dd-665bb57b27f6</a><br />
<br />
<a href="http://www.thesundaytimes.co.uk/sto/news/uk_news/article1597321.ece">http://www.thesundaytimes.co.uk/sto/news/uk_news/article1597321.ece</a><br />
<br />
<a href="http://www.telegraph.co.uk/news/bbc/11819164/Met-Office-lost-BBC-contract-over-dumbing-down-rows-and-weather-app.html">http://www.telegraph.co.uk/news/bbc/11819164/Met-Office-lost-BBC-contract-over-dumbing-down-rows-and-weather-app.html</a><br />
<br />
<a href="http://www.theguardian.com/commentisfree/2015/aug/24/the-guardian-view-on-the-bbc-and-the-met-office-faltering-forecasts">http://www.theguardian.com/commentisfree/2015/aug/24/the-guardian-view-on-the-bbc-and-the-met-office-faltering-forecasts</a><br />
<br />
<a href="http://www.independent.co.uk/news/uk/home-news/met-office-loses-bbc-contract-broadcaster-gives-no-reason-for-ending-100year-relationship-10468462.html">http://www.independent.co.uk/news/uk/home-news/met-office-loses-bbc-contract-broadcaster-gives-no-reason-for-ending-100year-relationship-10468462.html</a><br />
<br />
<a href="http://www.bbc.co.uk/news/uk-34031785">http://www.bbc.co.uk/news/uk-34031785</a><br />
<br />
<a href="http://arstechnica.co.uk/business/2015/08/bbc-fires-met-office-after-93-years-of-weather-forecasting/">http://arstechnica.co.uk/business/2015/08/bbc-fires-met-office-after-93-years-of-weather-forecasting/</a><br />
<br />
<a href="http://www.dailymail.co.uk/news/article-3207392/Met-Office-fury-BBC-gives-contract-worth-millions-foreigners.html">http://www.dailymail.co.uk/news/article-3207392/Met-Office-fury-BBC-gives-contract-worth-millions-foreigners.html</a><br />
<br />
<a href="http://www.telegraph.co.uk/news/bbc/11818872/Met-Office-loses-multi-million-pound-BBC-weather-contract.html">http://www.telegraph.co.uk/news/bbc/11818872/Met-Office-loses-multi-million-pound-BBC-weather-contract.html</a><br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.comtag:blogger.com,1999:blog-35352432.post-70905585966701459442015-04-07T21:39:00.002+01:002015-09-01T21:49:48.613+01:00Digital Design WeekendSeptember saw the return of a small Met Office team of volunteers to the V&A for Digital Design Weekend. This is a wonderful event that is growing each year, not just in size, but in confidence. This year there were new many collaborators, including clever folk from Uniform, who expertly, and very quickly, crafted a book to capture the maker spirit of the event. You can read about the book on the <a href="http://uniform.net/blog/october-2014/digital-design-weekend/" target="_blank">Uniform blog</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://uniform.net/media/50084/image03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://uniform.net/media/50084/image03.jpg" height="240" width="320" /></a></div>
What I find most rewarding about Digital Design Weekend, through the very informal meetings and Skype chats where Irini (V&A curator) helps us develop a vision and thinking about what we might do, is that it remains so open ended. Yes the event happens, but of course each thing that happens causes other things to happen. Which is why, in early April, I'm writing about something that happened in September; because in truth it really happened for me in September 2013, and will happen again this September. So far, for me, Digital Design Weekend is very different each time, and each time new, amazing, things happen as a consequence. <br />
Ian and Jasmine of BBC R&D wrote a blog post about <a href="http://www.bbc.co.uk/rd/blog/2014/09/open-collaborative-making-at-the-va" target="_blank">Open Collaborative Making at the V&A</a>.
<br />
<br />
It was also a pleasure to be joined by Genevieve Smith-Nunes and dancers who rehearsed and performed the digital ballet [arra]stre in a room shared with hackers and museum visitors. There's an interesting blog about the data and visualisations by <a href="http://animateddata.co.uk/articles/arrastre/" target="_blank">Peter Cook - [arra]stre Data Animations</a>.<br />
<div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-IAU0iCGdTdw/VSQxwgRME2I/AAAAAAAAKg4/NQ4uF3r0F00/s1600/20140920_130950.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="192" src="http://3.bp.blogspot.com/-IAU0iCGdTdw/VSQxwgRME2I/AAAAAAAAKg4/NQ4uF3r0F00/s1600/20140920_130950.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">[arra]stre</td></tr>
</tbody></table>
<iframe allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/_ujLfLzHa3w?t=580" width="560"></iframe>
</div>
Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-71208210580775191912014-05-15T21:14:00.002+01:002014-05-15T21:14:34.138+01:00Why is science beautiful?<div class="storify"><iframe src="//storify.com/Creative_Data/why-is-science-beautiful/embed?border=false" width="100%" height=750 frameborder=no allowtransparency=true></iframe><script src="//storify.com/Creative_Data/why-is-science-beautiful.js?border=false"></script><noscript>[<a href="//storify.com/Creative_Data/why-is-science-beautiful" target="_blank">View the story "Why is Science Beautiful?" on Storify</a>]</noscript></div>Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-14596766799682032682014-04-06T23:02:00.000+01:002014-04-06T23:25:31.538+01:00SensorTag and Raspberry Pi revisted<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-g4hAnuZMIgI/U0G9cBiqbbI/AAAAAAAAGxk/LbzV388CLhg/w1213-h730-no/20140406_214341.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-g4hAnuZMIgI/U0G9cBiqbbI/AAAAAAAAGxk/LbzV388CLhg/w1213-h730-no/20140406_214341.jpg" height="192" width="320" /></a></div>
A year ago I posted some notes on my experiments with the Texas Instruments SensorTag and the Raspberry Pi - <a href="http://mike.saunby.net/2013/04/raspberry-pi-and-ti-cc2541-sensortag.html">Raspberry Pi and TI CC2541 SensorTag</a>. From the comments received it's apparent that several others have done much the same. So, thanks to their feedback this weekend I updated my <a href="https://github.com/msaunby/ble-sensor-pi" target="_blank">ble-sensor-pi github repository</a> with a fix for more recent versions of the Bluez bluetooth library. You'll also find in the README some notes on installing gatttool and enabling the bluetooth adaptor.<br />
In the repository I've added a few extra files for anyone wanting to try sharing their data using Xively. If you'd like to try this out then you'll need to register - it's free - and create a new 'device'. I've called mine 'Wearable Pi' which give a hint as to what I'm hoping to do with it. Once you've created the device entry on Xively you'll need to create the following channels -<br />
<div class="p1">
<span style="font-family: Courier New, Courier, monospace;">t006, </span><span style="font-family: 'Courier New', Courier, monospace;">accl_x, </span><span style="font-family: 'Courier New', Courier, monospace;">accl_y, </span><span style="font-family: 'Courier New', Courier, monospace;">accl_z, </span><span style="font-family: 'Courier New', Courier, monospace;">humd_t, </span><span style="font-family: 'Courier New', Courier, monospace;">humd_rh, </span><span style="font-family: 'Courier New', Courier, monospace;">baro_t, </span><span style="font-family: 'Courier New', Courier, monospace;">baro_p, </span><span style="font-family: 'Courier New', Courier, monospace;">magn_x, </span><span style="font-family: 'Courier New', Courier, monospace;">magn_y, </span><span style="font-family: 'Courier New', Courier, monospace;">magn_z, </span><span style="font-family: 'Courier New', Courier, monospace;">gyro_x, </span><span style="font-family: 'Courier New', Courier, monospace;">gyro_y, </span><span style="font-family: 'Courier New', Courier, monospace;">gyro_z</span></div>
<div class="p1">
<span style="font-family: Times, Times New Roman, serif;">As the code is at present it will collect 10 measurement from each sensor at the default rate of one per second and then upload to Xively. I did try uploading every second, but the Xively API only allowed this for burst of a few seconds. There's obviously an opportunity here for some clever optimisation - upload at a high rate when the data is changing rapidly (shake the SensorTag) and at a lower rate when readings are stable. It will depend on your intended application.</span></div>
<div class="p1">
<span style="font-family: Times, Times New Roman, serif;">As before I'm happy to take corrections and questions in the comments. It would also be nice to know what others are doing with their SensorTag Raspberry Pi combo - so please share.</span></div>
<div class="p1">
<span style="font-family: Times, Times New Roman, serif;">I'll be taking mine along to the <a href="https://2014.spaceappschallenge.org/" target="_blank">3rd International Space Apps Challenge on 12/13 April 2014</a> and maybe hacking some prototype space wearable tech. </span></div>
Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com3tag:blogger.com,1999:blog-35352432.post-27052321122522439722014-03-13T19:52:00.001+00:002014-03-13T19:52:41.433+00:00The shed projectAs some of my friends already know, for the last year Kathryn and I have been working with a local architect to design a new workshop at our home. Planning consent has now been granted so if all goes to plan construction starts this summer.<br />
<br />
This is what it should look like when complete.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-EMf85zIL2DA/UyILsVB9qlI/AAAAAAAAGmQ/GzKwGrMyfAE/s1600/extension_shot2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-EMf85zIL2DA/UyILsVB9qlI/AAAAAAAAGmQ/GzKwGrMyfAE/s1600/extension_shot2.jpg" height="222" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-Idoox4SUgn8/UyILo73eD-I/AAAAAAAAGmI/E4qXkIZmWZQ/s1600/extension_shot1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-Idoox4SUgn8/UyILo73eD-I/AAAAAAAAGmI/E4qXkIZmWZQ/s1600/extension_shot1.jpg" height="222" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
And here's what it looks like now.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-LOYGyxy2WUA/UyH1Rp81t1I/AAAAAAAAGlI/GaK5O8q9Mmc/s1600/2013_09010006.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-LOYGyxy2WUA/UyH1Rp81t1I/AAAAAAAAGlI/GaK5O8q9Mmc/s1600/2013_09010006.JPG" height="240" width="320" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-25240456780911700952013-11-14T20:28:00.003+00:002013-11-14T20:28:53.021+00:00Climate Change and Fashion - a hackathon story<div class="storify">
<iframe allowtransparency="true" frameborder="no" height="750" src="//storify.com/msaunby/climate-change-and-fashion-a-hackathon-story/embed" width="100%"></iframe><script language="javascript" src="//storify.com/msaunby/climate-change-and-fashion-a-hackathon-story.js" type="text/javascript"></script><noscript>[<a href="//storify.com/msaunby/climate-change-and-fashion-a-hackathon-story" target="_blank">View the story "Climate Change and Fashion - a hackathon story" on Storify</a>]</noscript></div>
Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-33900808403987503382013-09-25T16:05:00.003+01:002013-10-08T10:32:35.689+01:00Climate Change and Fashion Hackathon<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; font-family: 'Open Sans', sans-serif; font-size: 14px; line-height: 20.15625px;">On September 21st and 22nd 2013 a group of scientists, artists, and designers spent the weekend in the V&A Museum in London imagining future fashions in a world adapting to changing climates.</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="background-color: white; color: #939598; font-family: 'Open Sans', sans-serif; font-size: 14px; line-height: 20.15625px;"><br /></span></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="http://4.bp.blogspot.com/-paWN-3zqRSQ/UkGw0_5Ek2I/AAAAAAAAE4o/kNDccBNdEgc/s1600/IMG_1871.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: left;"><img border="0" height="240" src="http://4.bp.blogspot.com/-paWN-3zqRSQ/UkGw0_5Ek2I/AAAAAAAAE4o/kNDccBNdEgc/s320/IMG_1871.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
A design by Professor Helen Storey.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://3.bp.blogspot.com/-FxBbORR65r8/UkGxBQvxjKI/AAAAAAAAE4w/F4thWRoq0Sk/s1600/IMG_1872.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://3.bp.blogspot.com/-FxBbORR65r8/UkGxBQvxjKI/AAAAAAAAE4w/F4thWRoq0Sk/s320/IMG_1872.JPG" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
And another from Exeter College fashion students.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://1.bp.blogspot.com/-nb-5mJLhbr4/UkMI428V6II/AAAAAAAAE7I/UtZgnlr8IcA/s1600/DSCF2715_r.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-nb-5mJLhbr4/UkMI428V6II/AAAAAAAAE7I/UtZgnlr8IcA/s320/DSCF2715_r.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Ross tells a story, with his Peltier wrist band at the ready.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Some of the amazing items created by the teams.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-EhDvVw5sWvw/UkGyhYJS9JI/AAAAAAAAE6I/9wtq9hYLlwU/s1600/IMG_1891.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-EhDvVw5sWvw/UkGyhYJS9JI/AAAAAAAAE6I/9wtq9hYLlwU/s320/IMG_1891.JPG" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-qGSJyFVkVE0/UkGyppSrngI/AAAAAAAAE6Q/PmQER1xc7m8/s1600/IMG_1892.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-qGSJyFVkVE0/UkGyppSrngI/AAAAAAAAE6Q/PmQER1xc7m8/s320/IMG_1892.JPG" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-4sWmSOqYG8w/UkGyYlI3iBI/AAAAAAAAE6A/8bPSxWFNljU/s1600/IMG_1882.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-4sWmSOqYG8w/UkGyYlI3iBI/AAAAAAAAE6A/8bPSxWFNljU/s320/IMG_1882.JPG" width="240" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />
<br />
Listen to the judges thoughts on this event.
<iframe frameborder="no" height="450" scrolling="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fplaylists%2F11193970" width="100%"></iframe>
<p>On other blogs -<br />
<a href="http://productresearch.dundee.ac.uk/hacking-in-front-of-an-audience-met-office-at-the-va/">Hacking in front of an audience</a><br/>
<a href="http://www.sustainable-fashion.com/2013/09/fashion-meets-climate-change-at-the-va/">Fashion Meets Climate Change at the V&A</a>
</p>
Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-32489643343526600382013-09-24T21:39:00.000+01:002013-09-25T14:57:32.385+01:00Geohack at FOSS4G MappinghamA week ago I was at Nottingham University with other from the Met Office hackathon team setting up tables, chairs, and the rest, ready for the two day Geohack geospatial hackathon. Of course the preparation for the event started months earlier as part of the even bigger effort of preparing for the FOSS4G conference. FOSS4G is an international gathering of open source geospatial developers, and although I wasn't able to stay for the whole conference several of my colleagues did and it seems like it was a really well organised and interesting event. There were certainly some great folks there judging from those who turned up a couple of days early to join the hackathon.<br />
The hackathon was open to delegates and others who registered on the <a href="http://2013.foss4g.org/geohack/">Geohack website</a>. It was free to attended and you even got the traditional hackathon pizza and beer.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://farm4.staticflickr.com/3758/9784135504_cfcdd1106a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://farm4.staticflickr.com/3758/9784135504_cfcdd1106a.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://farm8.staticflickr.com/7419/9788735004_32eab78723.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://farm8.staticflickr.com/7419/9788735004_32eab78723.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
It was an international gathering, so I got to meet and hack with folks I wouldn't normally get to meet back home in Devon. Here I am with <a href="http://civic.mit.edu/users/willowbl00">Willow Brugh</a> and <a href="https://twitter.com/TheSteve0">Steve Citron-Pousty</a> doing that thing where everyone stares at their gadgets rather than have a conversation.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://farm3.staticflickr.com/2883/9785050794_f774f41b2a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://farm3.staticflickr.com/2883/9785050794_f774f41b2a.jpg" width="320" /></a></div>
Seriously though, we had a good chat and hopefully we'll find more chances to work together if only for a couple of days. Once Steve got over his jet-lag, or more likely just learnt to live with it he got stuck in and managed to "sell" OpenShift as the solution most of the teams needed. He even found time to write <a href="https://www.openshift.com/blogs/foss4g-geohack-maps-and-environment-running-on-openshift">a great blog post</a>.<br />
<br />
All the teams produced excellent work, and I wouldn't be at all surprised to see at least one or two turned into real services over the next few months.<br />
<br />
So why didn't I stay for the whole of the excellent FOSS4G conference? Well I had another hackathon to go to - of course. More on that in the next blog post.Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-91457523596553797402013-09-08T19:22:00.002+01:002013-09-08T22:30:46.921+01:00Fashionably late - the Raspberry Pi bat phone<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-uE7eR9RVRns/UhkJOt6RkxI/AAAAAAAAEkg/1c2eccyqmfs/s1600/2013_08240001.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="http://2.bp.blogspot.com/-uE7eR9RVRns/UhkJOt6RkxI/AAAAAAAAEkg/1c2eccyqmfs/s320/2013_08240001.JPG" width="320" /></a></div>
A few weeks ago I posted some early pictures of this project and promised I'd blog about it. Although the hardware is done it still needs some software tweaks but I've decided to post some more pictures because I'm going to be really busy for the next few weeks and won't get much time for this project.<br />
<br />
[ The reason I'll be busy is I'm doing two hackathons for my work, a geospatial hack - <a href="http://2013.foss4g.org/geohack/">http://2013.foss4g.org/geohack/</a> and a fashion hack - <a href="https://climate.makes.org/thimble/climate-change-and-fashion-hackathon">https://climate.makes.org/thimble/climate-change-and-fashion-hackathon</a> ]<br />
<br />
Hardware list -<br />
Bakelite telephone. The earpiece is the original one but the microphone was a carbon type so I replaced this with an electret capsule.<br />
USB audio adaptor. These can be imported from China via ebay.<br />
Toggle switch and microswitches. I've put a "sound/silent" toggle on the front, plus and LED with chrome bezel - all from the junk box. The "sound/silent" plate for the toggle switch is from an old cine projector.<br />
MCP23008 port expander. To interface the switches and LED to the Raspberry Pi using I2C (SMBUS).<br />
WiPi - wifi adapter.<br />
5V PSU.<br />
Other than a few bits of wire, stripboard and the odd connector and nuts and bolts that's about it.<br />
<br />
More pictures -<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-yLfxANsZzj0/UgfbnuZxOQI/AAAAAAAAEio/LF4qtw8RXFU/s1600/2013_08110009.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="http://2.bp.blogspot.com/-yLfxANsZzj0/UgfbnuZxOQI/AAAAAAAAEio/LF4qtw8RXFU/s320/2013_08110009.JPG" width="320" /></a></div>
<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-oQFf135qJ-g/UhkJXrfNPKI/AAAAAAAAEko/_Mb7vxm-8_g/s1600/2013_08240002.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="http://4.bp.blogspot.com/-oQFf135qJ-g/UhkJXrfNPKI/AAAAAAAAEko/_Mb7vxm-8_g/s320/2013_08240002.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-fJP3PPm4kHk/UglHrAmEY3I/AAAAAAAAEjw/Fn_3uHnKdyg/s1600/2013_08120006.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="218" src="http://2.bp.blogspot.com/-fJP3PPm4kHk/UglHrAmEY3I/AAAAAAAAEjw/Fn_3uHnKdyg/s320/2013_08120006.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-IO3PdtiV__0/Ugfb5olIceI/AAAAAAAAEi4/vUr2QwjoxPw/s1600/2013_08110011.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="219" src="http://4.bp.blogspot.com/-IO3PdtiV__0/Ugfb5olIceI/AAAAAAAAEi4/vUr2QwjoxPw/s320/2013_08110011.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-53968789636978725702013-07-25T20:08:00.000+01:002013-07-25T20:11:39.390+01:00Cassette is not dead inspired Raspberry Pi caseThis idea for a Raspberry Pi case came a couple of months ago when I saw this<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://24.media.tumblr.com/tumblr_lu0665ZwZv1r5jq94o1_r2_1280.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://24.media.tumblr.com/tumblr_lu0665ZwZv1r5jq94o1_r2_1280.jpg" width="129" /></a></div>
- it's from <a href="http://ooomydesign.tumblr.com/post/12212416868/cassette-is-not-dead-this-is-a-personal-tribute">OOO My Design</a>.<br />
Other than a cassette tape all you need to make it is a few nylon standoffs, or spacers. I used nylon bolts too. On the base I added an extra bolt to create a third foot for it to stand on.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-uhn5Cw-dRKg/Ue-nO8swDWI/AAAAAAAAEgs/6Vi_Pq8SViQ/s1600/2013_07230004.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-uhn5Cw-dRKg/Ue-nO8swDWI/AAAAAAAAEgs/6Vi_Pq8SViQ/s320/2013_07230004.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-vm9sz3qvFDI/Ue-nXDJOvnI/AAAAAAAAEg0/0n-KEDdl8Rk/s1600/2013_07230005.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://1.bp.blogspot.com/-vm9sz3qvFDI/Ue-nXDJOvnI/AAAAAAAAEg0/0n-KEDdl8Rk/s320/2013_07230005.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
A short length of leader tape is used to keep the case square. Tie one end and use one of the cassette screws to fix the other end.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-gI8BeuonfIA/Ue-njnVRXMI/AAAAAAAAEg8/nrUB09EOzlo/s1600/2013_07230006.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-gI8BeuonfIA/Ue-njnVRXMI/AAAAAAAAEg8/nrUB09EOzlo/s320/2013_07230006.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
An extra bolt to the right provides a third foot.</div>
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-58007698199803171082013-07-23T20:39:00.001+01:002013-07-23T20:43:28.707+01:008 pin MSP430 microcontroller - MSP430G2230In earlier posts I've covered some experiments with NFC and UV sensors. I'm keen to take both these projects a little further and develop them into wearable devices. The Raspberry Pi and Ardunio are great for prototyping such things, but to make something the size of a button will require a surface mount microcontroller. At the weekend I came across the TI MSP430G2230, like the other MSP430 "value line" range these are very cheap low power 16 bit microcontrollers. Unlike the 14 and 20 DIL devices that are supplied with TI's incredibly cheap Launchpad these can't be plugged straight in. You'll need to either connect the programming lines to the SOIC chip somehow, or as I've done, build a couple of adaptors. The first adaptor makes the MSP430G2230 into an 8 pin DIL device, and the second makes the 8 pin devices match the pins of the typical 14 pin DIL MSP430.<br />
<br />
In pictures -<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-J4oWcGhmBUI/Ue7UAQCxm-I/AAAAAAAAEe0/IGQD8EdKxDE/s1600/2013_07230002.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="http://1.bp.blogspot.com/-J4oWcGhmBUI/Ue7UAQCxm-I/AAAAAAAAEe0/IGQD8EdKxDE/s320/2013_07230002.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-4IoGoOGHerA/Ue7UOpEyPnI/AAAAAAAAEe8/ZHAjvAT8_Mw/s1600/2013_07230003.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="211" src="http://4.bp.blogspot.com/-4IoGoOGHerA/Ue7UOpEyPnI/AAAAAAAAEe8/ZHAjvAT8_Mw/s320/2013_07230003.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-bEqYzZ8H1N0/Ue7T3rHn0PI/AAAAAAAAEes/pDqIRjwzKWA/s1600/2013_07230010.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="231" src="http://2.bp.blogspot.com/-bEqYzZ8H1N0/Ue7T3rHn0PI/AAAAAAAAEes/pDqIRjwzKWA/s320/2013_07230010.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-Rb1k13j81bM/Ue7Ucbt62gI/AAAAAAAAEfg/lKp9F7jDayM/s1600/2013_07230009.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="261" src="http://1.bp.blogspot.com/-Rb1k13j81bM/Ue7Ucbt62gI/AAAAAAAAEfg/lKp9F7jDayM/s320/2013_07230009.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
As simple as that!<br />
I've found that it can be programmed in CCS as either MSP430G2230 or MSP430G2231 - it's the same device, but with some of its pins not exposed to the outside world. The internal temperature sensor works fine, so I reckon my first project will be to use the I2C interface to log temperature measurements to an M24LR dual interface (NFC/I2C) EEPROM.Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com3tag:blogger.com,1999:blog-35352432.post-9562118574694115242013-07-14T20:39:00.000+01:002013-07-14T21:17:58.475+01:00Building a UV Index recorder for MSP430, Arduino, Raspberry Pi. Part 1 - the sensorA couple of weeks ago I found this is Lidl.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-wrxCHovlV48/UeL1m8Wxl_I/AAAAAAAAEdM/EXlA9J0KuhY/s1600/2013_07060001.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://2.bp.blogspot.com/-wrxCHovlV48/UeL1m8Wxl_I/AAAAAAAAEdM/EXlA9J0KuhY/s320/2013_07060001.JPG" width="243" /></a></div>
<br />
I did what any right minded person would do - took it apart to see how it works. <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-QlVMWq3zlyQ/UeL10xHLSxI/AAAAAAAAEdU/kb8bQv1V8tg/s1600/2013_07060002.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="http://3.bp.blogspot.com/-QlVMWq3zlyQ/UeL10xHLSxI/AAAAAAAAEdU/kb8bQv1V8tg/s320/2013_07060002.JPG" width="320" /></a></div>
<br />
<br />
OK, so modern electronic gadgets aren't easy to disassemble and reassemble. Thankfully I had no great desire to put it all back together again. One nice thing was that the UV photodiode was on its own board. One interesting thing is that there's a skeleton potentiometer so presumably these things are calibrated/adjusted at the factory.<br />
<br />
Google led me to this manufacturer as the likely source of the photodiode <a href="http://www.eoc-inc.com/UV-detector-GaN.htm">http://www.eoc-inc.com/UV-detector-GaN.htm</a> and here's the datasheet for a device designed for UV Index monitoring <a href="http://www.eoc-inc.com/genicom/GUVB-S11SD.pdf">http://www.eoc-inc.com/genicom/GUVB-S11SD.pdf</a><br />
Good news is that device current increases linearly with UV Index, bad news is it's measured in nano amperes. Well I suppose that does mean the resulting device could be very low current; given the application it might as well be solar powered!<br />
First things first, I'm going to need an amplifier, so I went for a low power device I bought a few of a while ago but lacked the frequency response I needed, the TLV2252. Hooking this up on a breadboard with a circuit based on this one from <a href="http://www.ti.com/lit/an/sboa035/sboa035.pdf">http://www.ti.com/lit/an/sboa035/sboa035.pdf</a> I used 10M resistors and a 3.3V supply.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-aYpqO-f0Kto/UeL78bGvMRI/AAAAAAAAEdg/C-jBOZSRX3Y/s1600/photodiode.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-aYpqO-f0Kto/UeL78bGvMRI/AAAAAAAAEdg/C-jBOZSRX3Y/s1600/photodiode.jpg" /></a></div>
<br />
<br />
Covering and exposing the photodiode did nothing, so I started thinking I'd damaged it or the circuit wasn't right. I swapped the UV photodiode for an LED and it worked like magic throwing the output to max when I directed a bright torch at it, so I swapped back the UV photodiode and went outside. Yes it worked giving about 20mV per UVI. OK, that's not a lot, but there's a second OP amp in the package so I used a 10K and 100K resistor to give extra gain of 10 and hey presto it's ready to interface to a ADC. As it is the circuit draws less than 0.2 mA.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-so77z3Z1_94/UeLW3ELcG8I/AAAAAAAAEc8/MQr2M-wZSGI/s1600/2013_07140012.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://1.bp.blogspot.com/-so77z3Z1_94/UeLW3ELcG8I/AAAAAAAAEc8/MQr2M-wZSGI/s320/2013_07140012.JPG" width="284" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-HFzFL7g-f0E/UeLWpZpBp0I/AAAAAAAAEc0/BIA93rut0cg/s1600/2013_07140014.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="246" src="http://2.bp.blogspot.com/-HFzFL7g-f0E/UeLWpZpBp0I/AAAAAAAAEc0/BIA93rut0cg/s320/2013_07140014.JPG" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-59819784081952151332013-06-23T20:54:00.000+01:002013-06-24T10:42:20.414+01:00It's Not For Crows - more NFC dabbling Back in March I wrote about some simple experimenting with the <span style="background-color: white; color: #333333; font-family: Arial; font-size: 15px; line-height: 19px; text-align: justify; white-space: pre-wrap;"> </span><a href="http://www.st.com/web/catalog/tools/FM116/SC1444/PF253360" style="-webkit-transition: color 0.3s; background-color: white; color: #009eb8; display: inline; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; line-height: 19px; outline: none; text-align: justify; transition: color 0.3s; white-space: pre-wrap;">ST M24LR Discovery kit</a> which feature a dual interface EEPROM - both NFC and I2C. That kit got me thinking about how I might use NFC to move data to and from low cost devices. Not just storing data on a tag, but mini data loggers and the like. So I ordered a few parts to experiment with and yesterday I finally got around to building some I2C/NFC tags. Here's one -<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-fbcP-2cX--I/Ucczsmgna-I/AAAAAAAAEZU/Cjmk9ybUcN8/s1600/2013_06230012.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-fbcP-2cX--I/Ucczsmgna-I/AAAAAAAAEZU/Cjmk9ybUcN8/s320/2013_06230012.JPG" width="320" /></a></div>
I wound my own antenna. It this seems bizarre, consider that I grew up making crystal sets and the like - why would I miss the opportunity to wind a coil? For anyone wanting to do the same, it's 8 turns around a 4cm diameter former - in this case a plastic lid from a spice jar. Slip the windings off and apply a few dabs of hot glue and it's done. So far all I've done with this is read and write to it with my Nexus 7 tablet (NFC) and an Arduino Uno (I2C). With this EEPROM no power, indeed no connections, are required when using NFC, just the antenna coil.<br />
There was no particular project in mind when I assembled the parts, which is why I included the 0.1" pitch connectors to plug them into a breadboard. What I notice once they were on the desk it that it's an ideal size to include in a Raspberry Pi case. So I built another slightly different one.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-6lx9nS0d00I/Ucc0SDw7R8I/AAAAAAAAEZs/6CdxTKP1zQA/s1600/2013_06230009.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://3.bp.blogspot.com/-6lx9nS0d00I/Ucc0SDw7R8I/AAAAAAAAEZs/6CdxTKP1zQA/s320/2013_06230009.JPG" width="320" /></a></div>
This will fit inside the usual cheap type of case. Making this got me thinking about making a smaller one closer to the size of the pre-made tags you can buy but with the advantage of I2C. So I built this -<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-RHnqRUZeUtU/Ucc0D1BbmUI/AAAAAAAAEZk/z1bFDD5B7QY/s1600/2013_06230010.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-RHnqRUZeUtU/Ucc0D1BbmUI/AAAAAAAAEZk/z1bFDD5B7QY/s320/2013_06230010.JPG" width="320" /></a></div>
The wire I used was Verowire, and the coil former is from the 1980s too. (12 turns on 2.2cm former)<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-JUQVCgu15Cw/Ucc0liEyJfI/AAAAAAAAEZ8/8DX6zi2TKOE/s1600/2013_06230007.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://4.bp.blogspot.com/-JUQVCgu15Cw/Ucc0liEyJfI/AAAAAAAAEZ8/8DX6zi2TKOE/s320/2013_06230007.JPG" width="320" /></a></div>
Yes, I reckon I'm going to build something gadgety into a cassette tape. Not sure exactly what, but pretty sure it will use an ultra low power MSP430 microcontroller. <br />
As for the Raspberry Pi interface, what I'd like to do with that is use it to change settings that are loaded on rebooting - so I can set up Wifi access codes using a phone or tablet, ideal for a "headless Pi". Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-78827899679281322152013-06-10T20:36:00.002+01:002013-06-10T20:39:46.748+01:00International Space Apps Challenge<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-rZxum2UJF5o/UbYporIWxTI/AAAAAAAAEYk/_QR7srLb92c/s1600/2013-04-21-382.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="http://4.bp.blogspot.com/-rZxum2UJF5o/UbYporIWxTI/AAAAAAAAEYk/_QR7srLb92c/s320/2013-04-21-382.jpg" width="320" /></a></div>
<br />
What an amazing event! Described by some as "a contest" - <a href="http://science.nbcnews.com/_news/2013/05/23/18452683-nasa-unveils-winners-in-space-apps-contest">science.nbcnews.com</a> though conceived as a hackathon in the Random Hacks of Kindness model. See <a href="http://www.theatlanticcities.com/technology/2013/05/designing-apps-astronauts-and-chicken-farmers/5668/">theatlanticcities.com</a> for a different take.<br />
<br />
Thanks to some incredibly enthusiastic and hard working colleagues the Met Office was able to host both Exeter and London events.<br />
<br />
If you've never heard of hackathons or hack-days then most likely you don't work in IT, or you do, but don't surf the web, use social media, own a cat... please keep reading.<br />
<br />
For those who work in IT and haven't been to a hackathon - it's like a free training course, with beer and good company. Why do I say it's like a training course? We'll it isn't really, but experience now tells me there's one type of IT guy (always a guy) it doesn't suit - the one that already, thinks he, knows everything.<br />
<br />
For those who aren't IT experts, and more and more are coming to such events, a hackathon is a chance to meet some really cool people who like making digital stuff, and prefer prototypes over long winded presentations and reports. At a hackathon you'll see impossible ideas turned into amazing examples of digital genius.<br />
<br />
What am I going to do next? We'll I don't have total control of anything much, but I'm always happy to share ideas and try out new things.<br />
<br />
Now some quick notes to self -<br />
<br />
<br />
<ul>
<li>Back at the V&A in September. This may well become a "fashion hack", more on how we're working with the V&A in another post soon.</li>
<li>Working with other organisations in the South West of England, Exeter and Plymouth Universities, DigPen. It's great that the Met Office was able to bring hackathons to Devon, but they really belong to the community and I want to find a way to hand them over, perhaps through sponsorship.</li>
<li>On sponsors. Our events, including Space Apps have been supported by a few great sponsors. We're not selling advertising, we're encouraging others to be a part of what we are doing and they seem to get this. I'm sure there are other organisation out there who'd like to join the party. </li>
</ul>
<br />
What I'd really like to do - so will put some effort into, and yes do contact me if you'd like to help - is create events that wouldn't happen otherwise.<br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-84436553803795979912013-04-06T18:23:00.004+01:002013-04-21T20:38:20.185+01:00Raspberry Pi and TI CC2541 SensorTag<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-zBIAxy5xdnY/UWBh4OdjVJI/AAAAAAAAEVc/644w5S85fLo/s695/2013_04060030.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="239" src="http://3.bp.blogspot.com/-zBIAxy5xdnY/UWBh4OdjVJI/AAAAAAAAEVc/644w5S85fLo/s320/2013_04060030.JPG" width="320" /></a></div>
<br />
Texas Instruments have yet another low cost development kit. The SensorTag is a Bluetooth Low Energy (BLE) key fob filled with the sorts of sensors that you'll find in the latest smartphone - pressure, temperature, humidity, accelerometer, gyroscope and magnetometer. See the <a href="http://processors.wiki.ti.com/index.php/SensorTag_User_Guide" target="_blank">SensorTag User Guide</a> for full details.<br />
<br />
If you're interested in experimenting with the SensorTag and you've got one of the latest iPhones, or iPads, then there's no need for you to be reading this, pop over to <a href="http://processors.wiki.ti.com/index.php/Bluetooth_SensorTag" target="_blank">Texas Instruments SensorTag page</a> and the <a href="http://www.byteworks.us/Byte_Works/Blog/Entries/2012/10/31_Controlling_the_TI_SensorTag_with_techBASIC.html" target="_blank">ByteWorks blog</a>. For Raspberry Pi and other Linux users I'll describe what I've figured out so far.<br />
<br />
<h3>
What you'll need</h3>
The hardware is really simple, in addition to the SensorTag which can be bought direct from TI post free, you'll need a BLE (aka Bluetooth 4.0) capable dongle. I'm using a <a href="http://plugable.com/products/usb-bt4le" target="_blank">Plugable USB-BT4LE</a> which can be bought on Amazon. A PC running Linux - Ubuntu 12.10 seems to have everything needed as standard, and it was by testing on a laptop with the Plugable dongle I was able to prove to myself that the dongle and SensorTag both worked and would communicate. However, the rest of this post will be about using the RaspberryPi, because that's what I set out to make work.<br />
<br />
<h3>
Software</h3>
This is my first RaspberryPi project so I started with a standard Raspbian "wheezy" image.<br />
<br />
<h3>
Testing</h3>
<b>Finding the SensorTag</b><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">$ sudo hcitool lescan</span><br />
<br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">LE Scan ...</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">90:59:AF:0A:A8:4E (unknown)</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">90:59:AF:0A:A8:4E SensorTag</span><br />
<div>
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;"><i>ctrl c</i></span><br />
<br /></div>
<div>
<span style="background-color: white; font-family: inherit;"><b>Connect to the discovered tag</b></span><br />
<span style="background-color: #93c47d; font-family: 'Courier New', Courier, monospace;">$ sudo hcitool lecc </span><span style="background-color: #93c47d; font-family: 'Courier New', Courier, monospace;">90:59:AF:0A:A8:4E</span><br />
<span style="background-color: #93c47d; font-family: 'Courier New', Courier, monospace;"><br /></span>
<span style="background-color: white; font-family: inherit;"><b>Switch on a sensor and read its value</b></span></div>
<div>
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">$ gatttool -b 90:59:AF:0A:A8:4E --interactive</span></div>
<br />
<br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[ ][90:59:AF:0A:A8:4E][LE]> connect</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[CON][90:59:AF:0A:A8:4E][LE]> char-read-hnd 0x25</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[CON][90:59:AF:0A:A8:4E][LE]></span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">Characteristic value/descriptor: 00 00 00 00</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[CON][90:59:AF:0A:A8:4E][LE]> char-write-cmd 0x29 01</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[CON][90:59:AF:0A:A8:4E][LE]> char-read-hnd 0x25</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[CON][90:59:AF:0A:A8:4E][LE]></span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">Characteristic value/descriptor: a3 ff 7c 06</span><br />
<span style="background-color: #93c47d; font-family: Courier New, Courier, monospace;">[ ][90:59:AF:0A:A8:4E][LE]></span><br />
<div>
<br /></div>
<div>
The values 0x25 and 0x29 are "handles" that we either read from (0x25 holds the thermometer reading) or write to (0x29 must be set to a value of 01 to turn on the thermometer)</div>
<br />
See <a href="http://processors.wiki.ti.com/index.php/SensorTag_User_Guide#Gatt_Server">http://processors.wiki.ti.com/index.php/SensorTag_User_Guide#Gatt_Server</a> for details of the sensor handles. We can also ask the sensors to send a continuous stream of readings. To do this enter "char-write-cmd 0x26 0100", a value of 0000 will turn the stream off.<br />
<br />
<h3>
A working program</h3>
Having figured that out I wrote a simple python script that uses pexpect to drive gatttool. Grab a copy from <a href="https://github.com/msaunby/ble-sensor-pi" target="_blank">github</a> if you're interested.<br />
<br />
<h3>
Building gatttool</h3>
I had to build my own copy of gatttool as the version included in wheezy wasn't able to write values to the sensor. To build bluez-5.2 you need to "apt-get install" the following - libglib2.0-dev libdbus-1-dev libusb-dev libudev-dev libical-dev systemd libreadline-dev<br />
<br />
<span style="font-family: inherit;">See comment from Klaus Seiler on how to build.</span><br />
<br />
<br />
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com56tag:blogger.com,1999:blog-35352432.post-79475345884427975852013-03-03T18:54:00.002+00:002013-03-03T18:54:50.871+00:00Internet of little things<h2>
<b id="internal-source-marker_0.23943335143849254" style="font-weight: normal;"><span style="font-family: Arial; font-size: large; vertical-align: baseline; white-space: pre-wrap;">Not for consumers</span></b></h2>
<h2>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Yesterday I read <a href="http://www.bbc.co.uk/news/technology-21609157">Rory Cellan-Jones' article</a> about NFC which pretty much shows that so far there isn't a consumer killer app for NFC. I'm not a professional pundit, so I'm not going to argue with him, but reading his article made me decide to do some first experiments.</span></b></h2>
<br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Before Christmas I had an idea that low cost lower power data loggers could use NFC to send data to a mobile phone. I mean really low cost, pence, and really low power, like a watch battery. In fact a watch would be a good example of the kind of device I'm thinking of, it could be set to current time anywhere in the world just with a tap from a phone. More recently I saw that Farnell are now stocking the new <a href="http://www.st.com/web/catalog/tools/FM116/SC1444/PF253360">ST M24LR Discovery kit</a>, it costs a few pounds and features an energy harvesting NFC/I2C EEPROM and everything needed to read and write data, including an LCD display.</span></b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-PWU1k7WIxvw/UTOavu_keDI/AAAAAAAAEUo/peqSj6ujyNk/s1600/2013-03-03-355.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="http://1.bp.blogspot.com/-PWU1k7WIxvw/UTOavu_keDI/AAAAAAAAEUo/peqSj6ujyNk/s320/2013-03-03-355.jpg" width="320" /></a></div>
<br />
<h2>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: large; vertical-align: baseline; white-space: pre-wrap;">Learning with the Arduino</span></b></h2>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">I'm an infrequent Arduino user as I feel cheap though it is, it's overkill for much of my tinkering. However it's an ideal system for experiments with I2C bus devices.</span></b><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Here's what I wrote. It's a fairly simple program that writes some text to the M24LR04E, which it then reads back. The text can also be read using an NFC phone, or the Discovery kit USB NFC transceiver. The program also reads the current temperature from the I2C temperature sensor included on the Discovery board.</span><br /><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<br />
<pre><span style="color: #7e7e7e;">// Use the Arduino to talk to ST M24LR-discovery board.</span>
<span style="color: #7e7e7e;">// Michael Saunby. March 2013.</span>
#include <<span style="color: #cc6600;">Wire</span>.h> <span style="color: #7e7e7e;">//I2C library</span>
<span style="color: #7e7e7e;">// Deviceaddress is a 7 bit value. i.e. the read/write bit is missing and the rest</span>
<span style="color: #7e7e7e;">// is shifted right.</span>
<span style="color: #7e7e7e;">// i.e. deviceaddress = 0x53 is sent by Wire as 0xA6 to write or 0xA7 to read.</span>
<span style="color: #7e7e7e;">// Dual interface (I2C+NFC) eeprom</span>
#define M24LR04 0x53
<span style="color: #7e7e7e;">// I2C temperature sensor - see table 1 of data sheet. Resistor selects address. </span>
#define STTS751 0x39
<span style="color: #7e7e7e;">// See also - </span>
<span style="color: #7e7e7e;">// http://playground.arduino.cc/code/I2CEEPROM</span>
<span style="color: #7e7e7e;">// http://www.developer.nokia.com/Community/Wiki/Understanding_NFC_Data_Exchange_Format_(NDEF)_messages</span>
<span style="color: #7e7e7e;">//</span>
<span style="color: #cc6600;">void</span> i2c_eeprom_write_byte( <span style="color: #cc6600;">int</span> deviceaddress, <span style="color: #cc6600;">unsigned</span> <span style="color: #cc6600;">int</span> eeaddress, <span style="color: #cc6600;">byte</span> data ) {
<span style="color: #cc6600;">int</span> rdata = data;
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">beginTransmission</span>(deviceaddress);
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)(eeaddress >> 8)); <span style="color: #7e7e7e;">// MSB</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)(eeaddress & 0xFF)); <span style="color: #7e7e7e;">// LSB</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>(rdata);
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">endTransmission</span>();
}
<span style="color: #cc6600;">void</span> i2c_eeprom_write_bytes( <span style="color: #cc6600;">int</span> deviceaddress, <span style="color: #cc6600;">unsigned</span> <span style="color: #cc6600;">int</span> eeaddresspage, <span style="color: #cc6600;">byte</span>* data, <span style="color: #cc6600;">byte</span> length ) {
<span style="color: #cc6600;">byte</span> c;
<span style="color: #cc6600;">for</span> ( c = 0; c < length; c++){
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">beginTransmission</span>(deviceaddress);
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)(eeaddresspage >> 8)); <span style="color: #7e7e7e;">// MSB</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)(eeaddresspage & 0xFF)); <span style="color: #7e7e7e;">// LSB</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>(data[c]);
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">endTransmission</span>();
<span style="color: #cc6600;">delay</span>(10);
eeaddresspage++;
}
}
<span style="color: #7e7e7e;">// 03 | nbytes | D1 |01 | payload_length | type | id | payload | FE</span>
<span style="color: #7e7e7e;">// nbytes = payload_len + 4</span>
<span style="color: #7e7e7e;">// payload_length = ‘enSome text here \FE’</span>
<span style="color: #7e7e7e;">// type = ‘T’ (text), ‘U’ (URI)</span>
<span style="color: #7e7e7e;">// id = 02, 03 (http://)</span>
<span style="color: #cc6600;">void</span> i2c_eeprom_write_ndef( <span style="color: #cc6600;">int</span> deviceaddress, <span style="color: #cc6600;">unsigned</span> <span style="color: #cc6600;">int</span> eeaddresspage, <span style="color: #cc6600;">byte</span>* data, <span style="color: #cc6600;">byte</span> length ) {
<span style="color: #7e7e7e;">// Write NDEF header</span>
<span style="color: #cc6600;">char</span> header[] = <span style="color: #006699;">"\003\000\xD1\001\000T\002"</span>;
header[1] = length + 5; <span style="color: #7e7e7e;">// Total bytes after D1 marker.</span>
header[4] = length + 1; <span style="color: #7e7e7e;">// Will add \xFE to payload.</span>
i2c_eeprom_write_bytes( deviceaddress, eeaddresspage, (<span style="color: #cc6600;">byte</span> *)header, sizeof(header) );
i2c_eeprom_write_bytes( deviceaddress, eeaddresspage+sizeof(header)-1, data, length );
i2c_eeprom_write_bytes( deviceaddress, eeaddresspage+sizeof(header)+length-2, (<span style="color: #cc6600;">byte</span> *)<span style="color: #006699;">"\xFE\0\0\0"</span>, 4 );
}
<span style="color: #cc6600;">byte</span> i2c_eeprom_read_byte( <span style="color: #cc6600;">int</span> deviceaddress, <span style="color: #cc6600;">unsigned</span> <span style="color: #cc6600;">int</span> eeaddress ) {
<span style="color: #cc6600;">byte</span> rdata = 0xFF;
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">beginTransmission</span>(deviceaddress);
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)(eeaddress >> 8)); <span style="color: #7e7e7e;">// MSB</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)(eeaddress & 0xFF)); <span style="color: #7e7e7e;">// LSB</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">endTransmission</span>();
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">requestFrom</span>(deviceaddress,1);
<span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">available</span>()){
rdata = <span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">read</span>();
}
<span style="color: #cc6600;">return</span> rdata;
}
<span style="color: #cc6600;">byte</span> i2c_sensor_read_byte( <span style="color: #cc6600;">int</span> deviceaddress, <span style="color: #cc6600;">int</span> eeaddress ) {
<span style="color: #cc6600;">byte</span> rdata = 0xFF;
<span style="color: #cc6600;">int</span> rc;
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">beginTransmission</span>(deviceaddress);
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">write</span>((<span style="color: #cc6600;">int</span>)eeaddress);
rc = <span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">endTransmission</span>();
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">requestFrom</span>(deviceaddress,1);
<span style="color: #cc6600;">if</span> (<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">available</span>()){
rdata = <span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">read</span>();
}
<span style="color: #cc6600;">if</span>(rc != 0){
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">print</span>(<span style="color: #006699;">"Error "</span>);
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">println</span>(rc);
}
<span style="color: #cc6600;">return</span> rdata;
}
<span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><b>setup</b></span>()
{
<span style="color: #cc6600;">char</span> message[] = <span style="color: #006699;">"enHello World"</span>; <span style="color: #7e7e7e;">// data to write. N.B. language prefix 'en'</span>
<span style="color: #cc6600;">Wire</span>.<span style="color: #cc6600;">begin</span>(); <span style="color: #7e7e7e;">// initialise the connection</span>
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">begin</span>(9600);
i2c_eeprom_write_ndef(M24LR04, 4, (<span style="color: #cc6600;">byte</span> *)message, sizeof(message));
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">println</span>(<span style="color: #006699;">"Setup done"</span>);
}
<span style="color: #cc6600;">void</span> <span style="color: #cc6600;"><b>loop</b></span>()
{
<span style="color: #cc6600;">int</span> addr=13; <span style="color: #7e7e7e;">// location of text string in NDEF payload.</span>
<span style="color: #cc6600;">byte</span> b, lo;
<span style="color: #cc6600;">signed</span> <span style="color: #cc6600;">char</span> hi;
<span style="color: #cc6600;">float</span> temperature;
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">print</span>(<span style="color: #006699;">' '</span>);
<span style="color: #cc6600;">while</span> (addr<53)
{
b = i2c_eeprom_read_byte(M24LR04, addr);
<span style="color: #cc6600;">if</span>(b == 0xFE)<span style="color: #cc6600;">break</span>;
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">print</span>((<span style="color: #cc6600;">char</span>)b);
addr++;
}
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">println</span>(<span style="color: #006699;">" "</span>);
<span style="color: #7e7e7e;">// read temperature</span>
hi = i2c_sensor_read_byte(STTS751, 0);
lo = i2c_sensor_read_byte(STTS751, 2);
<span style="color: #cc6600;">if</span>( hi > 0){
temperature = hi + lo * 1.0/256.0;
}<span style="color: #cc6600;">else</span>{
temperature = hi - lo * 1.0/256.0;
}
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">print</span>(temperature);
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">println</span>(<span style="color: #006699;">" "</span>);
<span style="color: #cc6600;">delay</span>(1000);
}
</pre>
<pre>
</pre>
<h3>
<span style="font-family: Arial, Helvetica, sans-serif;">Lessons learnt</span></h3>
<div>
<ul>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Read the data sheet. When it doesn't work, read it again.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">Wire uses I2C_device_address / 2. It that makes no sense, compare datasheet addresses with those used in the code. Yup, that caught me out.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">The onboard microcontroller can be disabled with a jumper on reset. But it's not necessary, two masters works in this case as the default ST code only reads.</span></li>
<li><span style="font-family: Arial, Helvetica, sans-serif;">NDEF - yet another data format. Yipee! </span></li>
</ul>
</div>
<h2>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: large; vertical-align: baseline; white-space: pre-wrap;">What next?</span></b></h2>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Now I've figured out how to use these NFC EEPROMs I've ordered a few chips, they're less than a pound each. Of course I'll need to make my own antenna, but that should be easy and fun. For the microcontroller I'll use the absurdly low power and very cheap MSP430.</span></b><br />
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b>
<b style="font-weight: normal;"><span style="font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Oh, and if you want to create your own Internet Of Little Things, then I suggest as a minimum you edit the code to write a URI to the EEPROM, then hey presto, you're little thing is on the Internet, sharing it's temperature, or whatever else it wants to share. </span></b>Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com4tag:blogger.com,1999:blog-35352432.post-11183380533054703362012-11-21T16:04:00.005+00:002012-11-21T20:09:27.220+00:00Random Hacks of Kindness - Exeter 1/2 December 2012This year my blog seems to have turned into a Met Office hackathon noticeboard. I'll have to make a real effort to get a better mix of stuff here next year as I never subscribed to the view that blogs should have a narrow scope - unless your life is that way.<br />
<br />
So the last <a href="http://www.metoffice.gov.uk/conference/RHoK">Met Office hackathon</a> of the year will be supporting the Random Hacks of Kindness global hackathon on 1st and 2nd December. If all goes well, and we're all doing our best to ensure it does, then this will be much more than just offering a place for altruistic coders to come a do their thing for good causes, but also an occasion on when things will happen that might not have happened otherwise. Broken things are fixed, new tools are forged and new friendships made.<br />
<br />
If you're able to spend the weekend in Exeter and want to join us, please sign up here -<br />
<br />
<a href="http://www.rhok.org/event/exeter-uk">http://www.rhok.org/event/exeter-uk</a><br />
<br />
If you can't get to Exeter. Wrong continent perhaps? Then do look on <a href="http://rhok.org/">rhok.org</a> for somewhere nearer.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-60225953533695100662012-10-12T14:57:00.001+01:002012-10-12T15:03:35.378+01:00Weather for fun (#wx4fun)My hackathon project came third at the Met Office Weather for Fun hackathon in Exeter on 6/7 October.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-6BacsTVjjtA/UHgjK8HhXrI/AAAAAAAAEQA/SuhCJOdAg40/s1600/2012-10-07-238.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="http://1.bp.blogspot.com/-6BacsTVjjtA/UHgjK8HhXrI/AAAAAAAAEQA/SuhCJOdAg40/s320/2012-10-07-238.jpg" width="320" /></a></div>
<br />
The idea was to build a very low weight (less than 10 gram) temperature sensor that could be carried by a toy helicopter. OK, not a very practical, or useful thing, but an interesting challenge. We did get it working using a Texas Instruments eZ430-RF2500 wireless micocontroller and TMP006 thermal infra-red sensor. The ground station used an eZ430-RF2500 and Arduino Uno.<br />
<br />
Read about this and the other projects on Storify <a href="http://storify.com/hackdayhack/weather-for-fun-hackathon">http://storify.com/hackdayhack/weather-for-fun-hackathon</a>
Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-3948738698212780882012-06-24T23:14:00.000+01:002012-06-24T23:14:01.635+01:00bat detector hack<b id="internal-source-marker_0.355225776322186" style="clear: left; float: left; font-weight: normal; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">OK, for those who have been waiting for the bat detector schematics for the #FSCHACK bat detector, here's a sketch</span></b><b id="internal-source-marker_0.355225776322186" style="clear: left; float: left; font-weight: normal; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">.</span><img height="293px;" src="https://lh4.googleusercontent.com/r8n7O9Cur3fcq4b0b3I4Oeq8xgYLufC3EJyRRaoOPuam3LECZAjAJG6nY1EMax0pYj3mrn8WU4j_Dkk2T1ac_N7Sw7toHoQwDP6mifimKsqMG0fwjJM" width="427px;" /><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Here's what it looked like on a breadboard at the hack day.</span><img height="320px;" src="https://lh3.googleusercontent.com/D3FjqmbrxwWUm0txUp4sPbncYDMgfDCbEa6S80TDQFLUIi_M2i01Q1Rbkx2IUK-E5h0OyNwm3rkZz3qC_sZsn2UL7zh4yZl-Juhiv0imtEoykKxuTNM" width="427px;" /><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">And here's the prototype that I knocked up in my workshop near Okehampton and found its way to Slapton via MozSpace London.</span></b><b id="internal-source-marker_0.355225776322186" style="clear: left; float: left; font-weight: normal; margin-bottom: 1em; margin-right: 1em;"><img height="320px;" src="https://lh3.googleusercontent.com/jHcI8z8oTmRBhQpSGLlw-WgWaLjoZeDXjfdamFYS4uYlhoc6PPfscFneZklpzSehjKgAicCa8--vzG9y2lh_tiapdl7gJxeKutAf9rTIjic6JuN71uU" width="427px;" /><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">So what about the component values you ask? Well I could post them here, I might yet, but over the weekend I've been experimenting with another design which I believe will be cheaper, more sensitive and easier to use.</span><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">What is really exciting for me about the new design is that it replaces most of the electronics with maths. I like maths! Even better if the maths isn't right, or could perhaps be better, it can be changed and no soldering is required and no unwanted components are discarded - or more likely added to the junk box.</span><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Part of my inspiration for this change was this diagram.</span><img height="295px;" src="https://lh5.googleusercontent.com/hwk9BsVMFxgyKf0ljRxCmw8DKTc_9ISfWihcJmnyRO_7SvNwGol1T7BY_cxThHNQ0FyVVs0IqotIC9rRHVrR1uoYDHHa488lEwYAej9K0UxQu2mKhEk" width="427px;" /><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"></span><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">The diagram comes from a datasheet for a 3mm x 3mm integrated circuit sold to mobile phone makers to add FM radio receive, and transmit, capability to their phone. That's very clever, and ridiculously tiny, but for those of us familiar with radio circuits, this is clearly not an FM radio. So what is it? Well it's a device for converting analogue signals to digital and digital to analogue with a DSP (</span><a href="http://en.wikipedia.org/wiki/Digital_signal_processing"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">Digital Signal Processor</span></a><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">) in between.</span><br /><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;">So the plan now is to create something very similar for listening to bats.</span></b><b id="internal-source-marker_0.355225776322186" style="clear: left; float: left; font-weight: normal; margin-bottom: 1em; margin-right: 1em;"><span style="background-color: transparent; font-family: Arial; font-size: 15px; vertical-align: baseline; white-space: pre-wrap;"><br /></span></b><br />
<span id="goog_1672501470"></span><span id="goog_1672501471"></span>Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-61128584563791264612012-06-17T20:16:00.002+01:002012-06-17T20:16:42.961+01:00Hack days, Space Apps, etc.OK, I'm not going to write much, because I've got too much to say and a cold that's making it hard to focus. So here come the links...<br />
<br />
<h4>
Space Apps Challenge </h4>
Well done to all the winners. <a href="http://spaceappschallenge.org/">See their videos</a>, and <a href="http://gov20radio.com/spaceapps-outcomes/">hear their stories</a> (thanks to Gov2.0 Radio).<br />
<br />
<h4>
Field Studies Hack Day</h4>
This was fantastic fun, thanks to everyone at Slapton Field Studies Centre for being such wonderful hosts.<br />
Read about it at <a href="http://fschackday.org/">fschackday.org</a><br />
The bat detector project continues. There's already a little bit of code at <a href="https://github.com/msaunby/softbatkit">https://github.com/msaunby/softbatkit</a> and more to come over the next few weeks.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0tag:blogger.com,1999:blog-35352432.post-78867556165830576352012-05-07T20:08:00.003+01:002012-05-07T20:51:27.037+01:00Reflections on Space AppsFirstly - thanks to everyone who has said nice things about the Space Apps Challenge "hack-day" at the Met Office Exeter. Yes, now it's over I think it's safe to use the hack word.<br />
<br />
I should also thank those who have said unpleasant things, though fortunately any criticism has been private and constructive. One day I'll write a blog post about "constructive criticism" as it's, yet another, topic on which I have a slightly non-standard position.<br />
<br />
Secondly I should mention that the Space Apps Challenge isn't really over. This week sees the start of global judging including a "peoples' choice" category, so expect to see lots of social media plugs for the nominated solutions.<br />
<br />
Right now for my reflections on the event, which if nothing else might just serve as a reminder to me next time I do something like this.<br />
<br />
Back in January I was thinking seriously about organising an internal hack-day at the Met Office; that hasn't happened yet because in mid-January I was asked if the Met Office would like to host NASA's Space Apps Challenge in Europe. Which was extremely cool, not expected, and created all sorts of interesting things to deal with. Fortunately I have, nearly, enough slack in my work and a willingness to work late and weekends for no pay to do interesting stuff. So here was an opportunity to do something fun with like-minded people.<br />
<br />
Before the event could go ahead I needed to get support and funding from the Met Office - NASA weren't going to pay for dozens of events around the world. Fortunately hack-days aren't expensive to run, a few thousand pounds. One of the things I did learn from the global teleconferences as planning progressed is that there's a fair range of hack-day cultures around the globe. Some places it's usual to pay an entrance fee, others there's vetting to ensure participants are real coders - not just using events for networking. Would I want to apply some kind of test? Probably not, but time will tell, as it was we had a few no-shows though a couple of these were people who knew me and so were good enough to let me know they couldn't make it.<br />
<br />
At this rate this post is going to be very, very long.... Short version of remaining thoughts.<br />
<br />
The are some useful resources on how to run hack days, e.g.<br />
<a href="http://www.youtube.com/watch?v=MRxz1hUt9zI">http://www.youtube.com/watch?v=MRxz1hUt9zI</a><br />
<a href="http://hackdaymanifesto.com/">http://hackdaymanifesto.com/</a><br />
These are NOT religious texts, so I reckon it's important to break some hack-day rules. For example we did have bands playing. I think this worked well for us, as there are no other distractions locally and a little distraction is healthy, as is standing up to eat if you're otherwise sitting for an entire day ( a tip for other organisers there maybe).<br />
<br />
Also hackers, please give some thought as to what the host and sponsors are expecting from the event. Chances are they're not expecting you to come up with a brilliant idea that will change the world. Large organisations in particular would rather the world didn't change. They just want to look good. Right now hack days are "cool" and they want it. The social media attention these events get is already seen as important by some, and chances are that will grow.<br />
<br />
Therefore getting sponsors ought to be easy, but it isn't. By the time the Space Apps Challenge was announced it was already too late to get sponsorship from most large organisations. Yes I had some very nice people from some outrageously big organisations telling me they would love to help next time. Seems marketing departments haven't gone "agile" yet. Also I get the feeling that for most big organisations the marketing dept is small, probably not as well funded as it once was, and not familiar with these sorts of events. Shame really, because a few freebies is all it would take - oh, thanks Red Bull!! <br />
<br />
I really am going to have to write a long version of this, but here are a few closing thank you remarks -<br />
<br />
To Exeter Girl Geeks and my female colleagues for believing that hack-days don't need to be all male, and making sure it wasn't.<br />
<br />
To the Met Office senior management for their quiet support. It was really great not having them there on the day, and not having government ministers or MPs, or other stuff that actually just gets in the way. I'm sorry you didn't get to join in with the fun, but now we all understand better how to do this I reckon we can fix that next time.<br />
<br />
To the judges - you were better than any prizes could have been.<br />
<br />
To everyone who came.<br />
<br />
To my Met Office colleagues who did their stuff behind the scenes, food, security, networks...<br />
<br />
To the NASA Open Government team for believing it would work.<br />
<br />
<b>Thank you!</b><br />
<br />Anonymoushttp://www.blogger.com/profile/00899702935992577808noreply@blogger.com0