GoogleAIY, a box and a Scrollphat


#1

So, after I got my Google box to talk nicely to both Google and the Scrollphat I thought that I’d put it all together.

All the bits:

The full pHAT board and headers.
I soldered a female header in the middle, that way the GPIO cable can fit relatively flush.
I know I could have put the female end of the GPIO cable to a male header but my Scrollphat had already been soldered with male headers.

Extending the headers.
As I was a few millimeters of space short between the boards I had to extend the headers and standoffs.
Again as I only had a header with extra long pins I had to pad the top of each standoff with a bolt to meet the bottom of the AIY board.

Boards in place.
If you look closely you can see the gap between the top of the standoffs and the bottom of the top board.
I could have trimmed all of the header pins by a bit, but didn’t want the hassle.


Testing
Making sure that both the AIY and Scrollphat processes were working before putting it all in the box.

Will it all fit?
Not a lot of room in there especially as the LED button has to be squeezed in as well.

Longer cable needed.
So the Hat isn’t sitting quite where I want it.
Time to disassemble and fit a longer GPIO cable.
It was all a bit of a squeeze and of course I managed to ding one of the acrylic clips.

All done.
And here is the finished article running the test-all.py script.

Code.
At the moment I’m running a very simple clock script.

#!/usr/bin/env python

import sys
import time

import scrollphat

while True:
try:
scrollphat.write_string(time.strftime("%A %B %d %H:%M "))
scrollphat.update()
scrollphat.scroll(1)
time.sleep(0.05)
except KeyboardInterrupt:
scrollphat.clear()
sys.exit(-1)

Any suggestions as to other stuff greatly received.


#2

I do something very similar on my sense hat LED matrix. I use,
dateString = "%A %B %-d %-I:%M:%p"
I truncate leading zero’s and show time as 12 hour with AM PM
I also show weather info I get from the Sense Hat sensors, Temp Humidity and Barometric Pressure. You could likely do the same but pull the local weather info off of the web. I don’t know how you do that, but have been tempted to try it once or twice. My message just repeats in an endless loop updating each time with new readings from the sensors.


#3

Pimoroni still stock the scroll pHat


#4

lol, completely forgot to say “well done” “nice build” =)


#5

Hi,

Thanks for the reply.

Pimoroni now make the Scroll pHAT HD which has more pixely goodness.

The original Scroll pHAT which I had lurking in a box is no more.

Maybe I should upgrade, at least I’d get a display that will hold a static time.

Cheers,

Simon.


#6

Yes!

This would be something interesting.

Personally I would prefer a static piece of text saying:

  • Date
  • Time
  • Weather

And the ScrollpHAT to cycle through them.

Consider this WIP.

I’ll post my results here.

Cheers,

Simon.


#7

I don’t know how I missed the "discontinued’, lol. Yeah HD is the way to go. At some point I’m going replace my sense hat with a Unicorn Hat HD and BME680. Mine is headless and portable in a case, the only button is a shut down button and a power switch. The scrolling message works better for me. Your way should be doable too. If you use evdev you could code certain buttons on your keyboard to select which one is displayed at any one time. Likely even by voice via the AIY. I don’t have an AIY, yet. Its on my want list though.


#8

Ha,

Thanks for the reply.

I’m tenacious.

I also have one of the original Unicorn HATs but I’m kinda thinking it would be a shame to show those RGBs through blue acrylic.

It’s also 8x4 so I don’t think I’d gain much.

Same reason I’ve not plugged a display-o-tron into it.

I’m going to persevere with the Scrollphat.

Seeing as I’ve wired it up the way it is, it will be fairly straightforward to swap out the HATs if I need to.

Thanks for the feedback.

Simon


#9

I have a ninja diffusor on my sense hat. I find it makes the text look a lot better.


I tried the frosted one but liked the ninja better. The sense hat LED matrix is Red, Green, Blue. Without the diffusor you can see little pin pricks of Red when showing Yellow (Red and Green). With it its just the one color all nicely blended into one dot. It makes it softer and nicer to look at.
If you have a dremel, with a cutting wheel, and take your time. You could likely make a square cutout in the case. Just drill 4 very small holes where the corners will be and connect the dots. I’ve done it a few times cutting square holes in PIBOW cases for heat sinks.


#10

If you mount a diffusor over your cutout hole, cut slightly bigger. It will hid any imperfections or slipups you may make. ;) .


#11

Ah,

I didn’t mean that.

I meant that a white Scroll pHAT was inside the blue acrylic of the ModMyPi case.

It looks nice. Maybe I need to adjust the brightness but it is readable.

I’m not sure how RGB would look diffused by blue acrylic.

However, I do have diffuser in a box somewhere.

(I have a few boxes of bits in a cupboard.)

I Like the idea of internally mounted HAT, with externally mounted diffuser. That would work OK.

So, tomorrow is Dremel day.

Thanks for the input !

Simon.


#12

Time to dig out some boxes !

Thanks everyone !


#13

I’d mask the panel with masking tape or something similar. If you put it over twice, double layer, it may save any marks from slips with the dremel. Also makes it easy to mark things off with a pen.
I’m always adding stuff like diffusors, stand offs etc to orders so I have extras on hand. It takes a week to ten days for my stuff to reach this side on the big pond.


#14

Thanks for your input.

I’ll post back how I get along if I go down the autopsy route !


#15

Put the diffuser over that hat and have a look see before you cut anything. Maybe the blue is Ok? I had nothing, just open air.


#16

I probably should have mentioned the sense hat LED matrix is only 8 x 8. It doesn’t lend itself to showing static numerical info. Anything more than 1 digit gets tricky if the first digit is anything other than a 1. Which is why I went with scrolling info.
I’ve wanted an AIY kit for a while now so I’m keen to see how yours turns out. I’m not trying to rush you, just very interested. ;) Take your time and get it the way you want it.


#17

Hi,

I tried the diffuser and it didn’t really work for two reasons:

  • There was not a lot of room in the case I’m using.
  • It diffused it too much. Turning the brightness of the Scrollphat works a lot better.

Here’s the code I’m running, it’s very simple right now and dims after 8pm. (Thanks @gadgetoid)

#!/usr/bin/env python

import sys
import datetime
import time

import scrollphat

while True:
try:
now = datetime.datetime.now()
brightness = scrollphat.set_brightness(10)

    if now.hour >= 20 and now.hour <= 8:
       brightness = brightness / 2

    scrollphat.write_string(time.strftime("%H:%M     "))
    scrollphat.scroll(1)
    time.sleep(0.5)

except KeyboardInterrupt:
    scrollphat.clear()
    sys.exit(-1)

I am actually getting the occasional weird IO errors which seem to be python related to passing integers but I’ll sort that somehow.

Looking forward, I think I’ll pass the GPIO out of the case so that I can have interchangeable HATS, then I can use my display-o-tron or any old HAT I buy as they all have the same dimensions between fixing holes.

If I do, I’ll update with pics, but right now it’s in the same state as the final pic.

Also, the AIY stuff is great fun to play with, I now have voice activated lights, can tell the TV to turn on Netflix, tell it to send a text message, and I’m only starting with it.

A couple of links for you:

Tomy.
Big list of mods (some outdated).


#18

How close you have the diffusor to the LEDs affects how it looks. The more space between the LED and the diffusor the more washed out it will look. Closer = crisper text. That’s what I found anyway. Good that you tested first before making any holes. ;)
The sense hat I have in the house defaults to low light, which I think is half brightness.
My portable has an Si1145 light sensor board. In dim light (dark room) it goes to low light mode automatically which is easier on the eyes. In bright lightt it goes to full bright. In very bright light the text changes color to all white, which is easier to see in bright light. Normally my message is color coded based on conditions. Temps below zero change the temp part of the message Blue, above 25 c and it turns Red. Each element of my message does that, and they each have their own color. The Sense Hat LED matrix is Red, Green, Blue.
Thanks for the links. =) A buddy of mine is thinking of selling me his AIY kit. If he does I’ll post back with what I setup.


#19

Hi,

To be honest, the 3mm thick blue acrylic does a really good job of diffusing the LEDs.

It kinda looks like a 1970’s alarm clock, which I approve of.

I think the Sense HAT is one of the only HATs I don’t have in a box somewhere.

You did remind me of an old project I have though, a Nanode, which I used to hook up to a breadboard and my router to pipe temperature settings to a simple webpage, just in case the house was on fire, (it never was).

I like the concept of colour coding when criteria are met, for that, and next week, I thnk I’m going to set up my Unicorn HAT which I think will give me more flexibility and scope.

Oh, and the AIY kit, yeah, get it, it’s a lot of fun.

Cheers,

Simon.


#20

My friend just dropped off his AIY kit. Its mine now. I’m just getting ready to put it all together. I have to pull a Pi 3B from another project first. My new and first 3B+ won’t get here for another week or more. Only just ordered it the other day and selected the cheapest shipping method. It’s coming by snail mail, lol.