On September 28th the STEMTera bread board was launched on Kickstarter. This is an Arduino compatible micro controller inside a modified solder less bread board. This caught my attention because I mainly tinker with Arduino stuff whilst sitting on the couch! So there are times when I'd have multiple pieces of gear with a rat's nest of wires (that's pretty much the norm for this kind of thing!) However the STEMTera bread board essentially removes the need to have your micro controller then a bread board for components , in that you can place items directly on the STEMTera thus saving some space (if that's a concern) so I pledged for the $45 backing with delivery for mid to late December. Oh and I got mine in black as that to me seemed logical for the least amount of light bleeding through the plastic cover.
Skip forward a few weeks and I'm now using the STEMTera board as my go to board for anything Atmel 328p based. I'm kind of hoping that a SAMD (M0) or STM32 (M3) will become a reality in the not to distant future.
With Xmas not far away I'd ordered some LED tea Lights for the wife to make some decorations to give away to the family. I was interested to find out what was driving the LED, but because all the candles were required I was not able to autopsy one to find out. This got me thinking, I have an Adafruit Trinket that would be great to drive an LED via PWM and create the desired flame effect.
Now after searching the web for examples of what it was I wanted to do, I finally settled on this one from .ledhacker This is pretty much what I was after! Here's a copy of that original code…
So I loaded this on the Trinket and at first I didn't include a current limiting resistor and the LED showed a slight flicker, but not anything like a flickering tea light! After adding the current limiting resistor (220Ω)and that didn't really change much except for dim the LED ever so slightly. So obviously I needed to tweak the code and see what I end up with..
Now my first thoughts on why it didn't work out as expected is that the code was obviously written for a 5v logic, however this trinket is 3.3v logic. I made the following changes (after a little fiddling)and got more of what I was after 🙂
< #define FLICKER_LED_PIN 10
> #define FLICKER_LED_PIN 0
< static int flicker_low_min = 200;
< static int flicker_low_max = 240;
> static int flicker_low_min = 15;
> static int flicker_low_max = 175;
< static int flicker_high_min = 230;
> static int flicker_high_min = 180;
< static int flicker_hold_min = 40; // milliseconds
> static int flicker_hold_min = 20; // milliseconds
< static int flicker_speed_min = 900; // microseconds
> static int flicker_speed_min = 800; // microseconds
As you can see I only made small changes to some timings and they seemed to work better for the 3.3v logic
The next thing was how long would this run on a 1000mah lipo battery? well, somewhere between 4 to 5 days!
I've placed the code and supplement files on github should you wish to make one. 🙂
Over the next coming weeks I'll be gradually updating old blog posts to be fully compliant to https, Should I find anything that can't be done then depending on the content I'll most like just delete it!
For now I've forced a redirect from http to https at the server level, hence why some content may not display correctly (especially links to external sites that are http only)
I've only ever backed one project on Kickstarter, and so far I've never seen the product and just keep getting updates claiming that things are going well, oops no there's a problem with X… Ok we're back on track… Nope now there's problems with Y.
So I backed the ZNAPS project in July 2015 and the initial statement made was that a product would be delivered by December (2015) so here we are now August 2016 and still nothing has even been confirmed as being complete and ready to ship. Ok so this isn't an issue with Kickstarter, because they are just a means of advertising your product and gaining funds (they take a percentage) so the problem solely lies with the people who are ZNAPS. If you read through the comments on Kickstarter you'll see comments after comment all stating their dissatisfaction with the way the whole thing has unfolded.
It's that time again where my phone contract had expired and my Nexus 5 battery was spending more time on the charger than active use. So I was going to look into replacing the battery, but the last time I got a so-called OEM battery (Galaxy Nexus) I got something that said one thing but its actual capacity was something totally different. So I was cautious about getting stung again, plus there was the possibility that I'd bugger up the replacement process and end up with a phone that's only good for a paperweight!
So I decided to look at what my provider had on offer and was surprised to see that they had the Google Nexus 5X and 6P. I'm not interested in a phone that is borderline to the size of a tablet so we went with the Nexus 5X. I was a little hesitant at first about the Nexus 5X because I initially just thought it would be just a re-release of the original Nexus 5. I was wrong! it's a new phone altogether and with some noticeable differences.
The next thing to decide on was a suitable case to protect the phone from the day-to-day abuse it will endure. After looking at what was available from the Google Play Store. I was surprised at the costs! really they were expensive with prices ranging from $34AUD to $59AUD. Because you have to purchase them sight unseen, I wasn't keen to shell out for say the most expensive without seeing some kind of review or similar. Now this is where YouTube is your friend! so after watching several videos on all of the cases, I opted to go with the Adopted Case.
Adafruit like experimenting with products to see what will inspire the electronics enthusiasts around the world. Now I've been after the ESP8266 Feather, however they have been unavailable for some time (so damn popular!) so I started looking for something else that had a wifi option. Released on March 23rd was the WICED Feather and I thought that should do the trick and give a challenge as it's using a cpu I've not had much experience with. I'm kind of hooked on Neopixels and from version 1.0.5 of the Adafruit Neopixel Library includes support for the WICED Feather (STM32F2 MCU)
This started back on December 21st 2015 when it was reported there was a failure in the Basslink HVDC cable. This links between Loy Yang Victoria to Georgetown Tasmania. At first Hydro Tasmania believed the issue would be resolved within 60 days. So all should be good… not to be, after delays in locating the cable, then not being able to ascertain where the fault was, the initial cutting was delayed until a better idea of where the fault was. When the Basslink HVDC cable was laid down, this also included a Dark Fibre cable that would be run by Basslink Telecoms. This was to be a crucial new link for Tasmania as a way of not being held to ransom by Telstra, who have a monopoly on the wholesale of data passing to & from the state at the time. Basslink announced on February 22nd that the revised timeline for the cable repair was unknown.
So we jump forward to March 11th, this is where things get interesting! Basslink Telecom switched off the fibre at 08:15 and services that had made prior arrangements with Telstra were transferred. This is the moment when Tasmania's internet slowed to a crawl, with customers on iinet, Internode, Westnet affected the worst. This naturally sparked an immediate social network backlash on Twitter and Facebook with customers venting their complaints.
So how did it come to this? How could a situation that's been known about be left like a last minute suck it a see approach? The fibre line had to be cut so repairs could take place on the HVDC line. It's not like it was going to be left in situ while the other was repaired, after all the HVDC cable is 60kg/meter so it's heavy and requires special teams to do the work Well this is where things get a little messy, there's been claims that helpdesk staff have been saying that the problem has nothing to do with Basslink, or that the helpdesk staff had no idea about Basslink and it's effect it was to have. Now I can't vouch for such, I mean after all you can't believe everything you read on the internet right? 😉
Over the years I've tinkered with having a live webcam taking a picture of the weather conditions in my local area. Recently I rediscovered an old Logitech E3500 webcam that I figured would serve the purpose quite well. There's a limitation with USB on a Raspberry Pi, some things will work as expected without any trouble and some things not so well. It turns out that the E3500 camera suffers from over exposure and the sensor simply gives you a blank image! at first I figured is was a v4l2 driver issue but the webcam behaves just fine on my notebook (both in Linux & Windows) so some further experimenting with things simply didn't work out to well, so basically provided there wasn't too much light or too much glare you'd get a good image captured using fswebcam and when things weren't you'd just have a plain black image being produced. So I decided to abandon the idea of using the E3500 and turned to the PiNoIR camera for raspberry pi. this camera although lacking a UV filter produces a good picture. I decided to place the included blue filter over the lens to see if that makes much difference with the captured image.
This is the PiNoIR camera facing south and upwards, yes it's and overcast day with patches of drizzle! anyway you'll notice that there's some foliage from a plant on the next door neighbours property that looks a little strange that's because you're seeing the effects of photosynthesis and can only be seen in the IR band of light (normally filtered out) So that picture is acceptable so I've started uploading and image every 5 minutes.
This is a capture done with the Logitech E3500, mid morning and facing south-east with yet another overcast day! but it wasn't long after this picture and the remainder of the day was just a black image. so it was a FAIL!
The Raspberry Pi is resting on the window seal with a ball of Blu-Tack preventing it from moving or falling off. One of the problems with pointing cameras outside in a suburban area is making sure that you don't have it facing directly into your neighbours window (or similar)
The Raspberry Pi is using Raspbian Jessie Lite and this is missing ftp so that will need to be installed before you can start to sending your pictures. I have the following two scripts running from crontab, pinoir.sh captures the image and saves it locally in /tmp Then wuftp.sh uploads the image to weather underground via ftp. The "MAILTO=" prevents crontab from flooding you with an email for every time its run! However there's no mail server on the raspberry pi but if you were going to use something like on a standard Debian install you'll soon like that "MAILTO=" trick! also the ">/dev/null 2>&1" should also prevent anything from triggering an email as it's piping all stdout to the bit bucket of /dev/null
# m h dom mon dow command
14,29,44,59 * * * * /usr/local/bin/pinoir.sh >/dev/null 2>&1
*/15 * * * * /usr/local/bin/wuftp.sh >/dev/null 2>&1
Things to do… put an overlay on the captured image with a time/date stamp or similar and possibly get the standard raspberry pi camera so that the images are true colour instead of the slightly washed out type they currently are. 😉