It all started from reading Linux magazine that had a feature article on WordPress and well I must liked it cause I’m still using it! Originally I was hosting my own website from home, but after quite a few years I then moved to hosting with Gandi and its lived there ever since… 😀
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 managed to get my hands on the much sought after Raspberry PiZero the smallest of the Raspberry Pi line. The PiZero was release with edition number 40 of the MagPi Magazine that included the PiZero board for free! (well you had to buy the magazine!) but now 3rd party distributors have limited stock and I managed to get mine from my favourite electronics supply Little Bird Electronics.
I was not quite sure what to do with the PiZero and then it struck me that it’s the perfect thing to host the current official OS Raspbian & the NOOBs bootloader. so it’s currently running Transmission-daemon and is seeding four files.
Obviously this won’t be it’s only role but until I find something better this will do!
I’m currently in the process of transferring my self hosted server to Gandi (domain and hosting) so there’s going to be some content that will no longer be available. I’m used to hosting my own server and have enjoyed it for the last 9 years but the costs of running gear and maintaining it has got to the point where It’s cheaper to off load it to someone else and free up some time on my end. Things that will go are Gallery3 and the phpBB Forum as I no longer use either and I’ve not been maintaining them anyway.
I was going to make this a fresh start, but there’s some content on this blog that still get hits so I figured that the original content should stay so it’s still available. I’m also hoping that the content with try to stay away from politics as the blog has been pretty much dominated by local and national events that have annoyed me or I’ve felt that I must say something! as with all things there’s no guarantees! 😉