Still Nothing of Maisie 😢

It's now been 16 days since Maisie disappeared. We've done two letterbox drops of the street and I've been searching the local tracks close to our house and I've found nothing. No clumps of fur on the ground, no blood trails, it's just like she vanished.

Although I will never stop looking for Maisie, it's obvious that something or someone has taken or trapped her. As hard as it is to admit, I don't believe that Maisie is going to return…

Maisie will certainly be missed and I don't believe that I'll ever have such a strong bond with another cat…

Nextion 3.5 screen for Hotspots

I've used Pi-star now for around a year and a half. The first screen I used with the Zumspot was a 0.96" OLED screen (I thought it was awesome!) but after a while I started seeing other amateur radio guys were using the Nextion screen/s These are an amazing piece of equipment they run on 5v and have many uses, the main one I'll be using is the NX4832K035_011 this is the advance type. Basically the only difference between the two (normal & advanced) is the on board memory, RTC and GPIO available for use with external items (not used for MMDVM)

As you can see above there are six screens! I used a sheet of 400x400x8mm polycarbonate (plexiglass) and cut it down to make it match the border (25mm) There is still enough space to get access to the micro SD card for updating the screen code.

Here's the finished product in place, I'll need to do a bit of cable management as it's bit untidy but overall I'm happy with the end result.

Ten Years with WordPress!

So a thing happened…

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… 😀

LED Tea Light

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.

trinket3v

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…

#define FLICKER_LED_PIN 10
// the start of the flicker (low)
static int flicker_low_min = 200;
static int flicker_low_max = 240;
// the end value of the flicker (high)
static int flicker_high_min = 230;
static int flicker_high_max = 256;
// delay between each low-high-low cycle
// low->high |flicker_hold| high->low
static int flicker_hold_min = 40; // milliseconds
static int flicker_hold_max = 80; // milliseconds
// delay after each low-high-low cycle
// low->high->low |flicker_pause| low->high...
static int flicker_pause_min = 100; // milliseconds
static int flicker_pause_max = 200;  // milliseconds
// delay low to high and high to low cycle
static int flicker_speed_min = 900; // microseconds
static int flicker_speed_max = 1000; // microseconds
void setup() {
  pinMode(FLICKER_LED_PIN, OUTPUT);
}
int flicker_random_low_start = 0;
int flicker_random_low_end = 0;
int flicker_random_high = 0;
int flicker_random_speed_start = 0;
int flicker_random_speed_end = 0;
void loop() {
  
  // random time for low
  flicker_random_low_start = random(flicker_low_min, flicker_low_max);
  flicker_random_low_end = random(flicker_low_min, flicker_low_max);
  
  // random time for high
  flicker_random_high = random(flicker_high_min, flicker_high_max);
  
  // random time for speed
  flicker_random_speed_start = random(flicker_speed_min, flicker_speed_max);
  flicker_random_speed_end = random(flicker_speed_min, flicker_speed_max);
  
  // low -> high
  for (int i = flicker_random_low_start; i<flicker_random_high; <span="" class="hiddenGrammarError" pre="" data-mce-bogus="1">i++) {
    analogWrite(FLICKER_LED_PIN, i);
    delayMicroseconds(flicker_random_speed_start);
  }
  
  // hold
  delay(random(flicker_hold_min, flicker_hold_max));
  
  // high -> low
  for (int i = flicker_random_high; i>=flicker_random_low_end; i--) {
    analogWrite(FLICKER_LED_PIN, i);
    delayMicroseconds(flicker_random_speed_end);
  }
  
  // pause
  delay(random(flicker_pause_min, flicker_pause_max));
}

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
4,5c4,5
< static int flicker_low_min = 200;
< static int flicker_low_max = 240;
---
> static int flicker_low_min = 15;
> static int flicker_low_max = 175;
8c8
< static int flicker_high_min = 230;
---
> static int flicker_high_min = 180;
13c13
< static int flicker_hold_min = 40; // milliseconds
---
> static int flicker_hold_min = 20; // milliseconds
22c22
< 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. 🙂

Migrating to HTPPS

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)

So I suppose just watch this space? 😉