Meeting your match
/According to the dating app which keeps pestering me I’ve got Anya(46) from Concord +23 others all waiting for me. I’m not sure that I need another 24 women in my life just now though.
Rob Miles on the web. Also available in Real Life (tm)
According to the dating app which keeps pestering me I’ve got Anya(46) from Concord +23 others all waiting for me. I’m not sure that I need another 24 women in my life just now though.
Don’t say Umm is a fun game which where you have to describe random two word phrases to your team-mates without saying um. As the game progresses other restrictions are imposed, like not using words starting with “O". The other team will be watching you carefully and ringing the little bell (and gaining a point) when you slip up.
I’m spectacularly bad at the game. In one turn I would have been more successful if I’d just said nothing. I did enjoy using the bell on the other team though….
I think if I had to play it for more than an hour or so my brain would start coming out of my ears, but for a quick blast it is a hoot.
We were watching the Winter Olympics today. The luge, a terrifying device that you lie on to hurtle down a tunnel of ice. The commentator said that the difference between winning and losing would be down to just a few thousandths of a second. “That’s nothing” I said. “If I took part I’d make the difference much larger than that. “
The box above took over three hours to print. It’s perfect in every way except one. I’m going to have to print it again. The problem is with the speaker fitting at the bottom of the box. The speaker fits into the circle and is supported by four pillars. But the pillars are too high.
You can see the problem here. If I put the speaker on top of the pillars there will be a gap between the speaker and the hole it fits in. This makes it sound awful. To understand why we have to learn about about how speakers work.
The cone in a speaker goes backwards and forwards, pushing the air in front of the speaker to make sound waves we can hear. We really don’t want to hear anything from the back of the speaker because, although it is also sound, it is going the “wrong way”. The sound term for this is “out of phase”. When air in front of the speaker is being pushed forwards, air at the back is being pulled. If sounds from the front and the back meet up they can interact in ways that don’t sound nice.
Some speakers use carefully designed boxes which take the out of phase sound from the back of the speaker and reflect it in some way to invert the phase so that it adds to the sound. Other speakers solve the problem by putting the speaker in a sealed box from which the sound from the rear of the speaker can’t escape. These are called “infinite baffle” speakers. If you call the thing that we put the speaker into a “baffle” (which sound people do) you can see that an infinitely large baffle would stop any sound from the back of the speaker getting to the listener.
I’m trying to make my device use the infinite baffle principle. That’s why I have the circle that the speaker fits into and seals against. However, if I have a gap between the front of the speaker and the baffle I get sound leakage from inside the box and the speaker sounds rubbish.
So that’s why I reduced the height of the pillars and printed the box again. It makes a surprising difference to the sound. As to why I got this wrong in the first place: I made all the pillars in the box the same height, then I increased the height of the pillars that support the PICO In the middle of the board and that made the speaker pillars higher too.
Update: It’s just occurred to me that I have a hole in the back in the form of the power cable entry. I might convert that into a socket (or add a seal) and see if that makes it sound even better.
It’s called the “Dead Cockroach” approach. The chip in the middle is the cockroach lying on its back, and you wire directly onto the pins. It’s a good idea if haven’t got the time or inclination to make a printed circuit board and you don’t mind fiddling around a bit. The device worked first time, which was nice. I’ll tell you what it is later..
Sharing a joke together
We didn’t have a quiet hardware meetup, the Furbies saw to that. Brian had three of them under the control of his software. We’re looking into downloading extra assets into them so that we can build a “Furbie Orchestra”. Code was written, bugs squashed and the Furbies sang a duet. Good times.
The next meetup will be in two weeks.
I’ve just invented the square tennis ball. I think it will be a real game changer.
I’m writing some code to drive a tiny mp3 player. These things are awesome. You can get them for a couple of quid each, pop in an SD card with some files on it and off you go. I’ve used them before, but I wanted a MicroPython driver to go with the Connected Little Boxes framework I’m building.
ChatGPT made me the driver, and helpfully included a demo program. I dropped it all in place and it worked, except that the music glitched after it started. This was a worry, so I spent a moment looking for power supply problems and checking the MicroSD card I was using. Then I took a proper look at the demo code that had been written for me:
df.play_track(1)
time.sleep(2)
df.pause()
time.sleep(1)
df.play()
Oh ha ha. The demo program pauses the playback and resumes it, giving me a glitch. ChatGPT was unmoved when I pointed this out. It told me it was just showing me another feature of the code…
The team admiring their handiwork.
The Spooky Elephant team was created a while back. We must be a proper team because we’ve got shirts and a logo. Anyhoo, we finished working on our Global GameJam game today. You can find it here. It’s worth seeking out just for the title sequence.
University of Hull in “STill Looks Awesome” shock
I’ve not done a Global Game Jam for a while. But this morning finds us in Fenner Lab on the University campus thrashing out ideas and getting to work. The theme for the competition is “Mask” and we’ve decided that we’re going to do bitmask themed take on a falling block game. I’ve taken it upon myself to do the sound/music. This removes me from complex gameplay discussions and means that if my bit doesn’t work the game will still run. Double win.
We’re using a game engine called Godot. I’ve never used it before. After a day spent playing with it I reckon it is really rather splendid. You write your scripts in a language a bit like Python using an IDE built into the engine. This is the first time in a long while that I’ve written code in something other than Visual Studio Code. I quite like it. The syntax error highlighting is neat and once you get your head around how things are organised it all works very well. It is also very easy to create a web-based version of your game. If you want to know more about what we got up to, and hear my very primitive sound stuff you can find it here. The game doesn’t do much at the moment, but it runs and that’s a start.
Base Camp
We’ll be back in the lab tomorrow adding the finishing touches.
I’m doing a game jam this weekend. What could possibly go wrong?
Behind the magic
I’m wiring a big red button onto a PICO. Above you can see the work in progress. Wiring buttons is easy, you just wire the button switch between an input pin and one of the many ground pins on the PICO. It should just work . Unless you’ve used AI to write the code (like I did) and forgotten to tell the AI to enable the internal pullup on the input pin. “What’s an internal pullup?” I hear you ask (actually I don’t, but let’s keep moving forwards).
Well, the principle of the circuit is that when I press the button it connects the input pin to the ground level, causing the input to go low. But that pre-supposes that the input pin is set high before the button is pressed. One way to do this to is to fit a fairly high value resistor (perhaps a few thousand ohms) between the input pin and the power rail. That works, but it means you have to find a resistor and solder it in place. A better way is to use an “internal pullup”. This is a switched resistor inside the microcontroller which you can turn on to pull the pin high. They are terribly useful, but only if you enable them.
pin = machine.Pin(pin_number, machine.Pin.IN, machine.Pin.PULL_UP)
You request an internal pullup by adding machine.Pin.PULL_UP to the constructor for the pin. If you do have a pullup resistor on your board (some hardware makers do this) then you should turn off the internal pullup to stop the two of them fighting…
AT least I managed to get out and take some pictures
Just spent a day paying off Technical Debt. Technical Debt is caused by doing the expedient thing rather than the right thing. It’s a project development term for putting things in the loft rather than taking them to the tip. In this case the Technical Debt was accrued by telling the AI to write some code and then assuming that it had done the right thing… Anyhoo, things that I didn’t realise were broken are now all working. Which has got to count as progress I suppose.
You can now register here for the conference. Free to attend, the food is great, the environment wonderful and I’m doing a session. So, that’s two out of three….
Just watched Linley and managed to get both the murderer and the other murderer. Very pleased with myself.
When in doubt, start with a joke:
What do you call an underwater dog?
A sub-woofer.
Well, I like it. But it does bring to mind my “technical problem of the week”. On Friday I was seduced by a massively reduced massive sound system that I could bung underneath my telly to boost the sound a bit. On Saturday I gave the system a quick test and having found that it seemed OK I then drilled holes and fixed things to walls. Today I discovered that it doesn’t work properly. The sound from the sub-woofer (see joke above) was intermittent. My least-favourite kind of fault, and usually the hardest to fix. Oh well. That explains the reduced price.
The sub-woofer is the speaker that brings all the crunchy bass sounds to the party and without it you haven’t got much of a party. And with a sub-woofer for only half the time you have a party that makes you feel seasick after a while. So I did what any sane person would do. I did a quick search of the Internets. Fortunately, this was one of those increasingly rare occasions where my search took me to a useful answer. Apparently the wireless connection to the subwoofer can be upset by proximity to Wi-Fi hardware. Like the access point I had right next to the TV. I moved things around a bit and the woofer now sounds great all the time. So, if you’ve got wireless sound stuff which isn’t behaving you might like to check for interfering signals.
Notice how I’ve left off the Number scale on the side
I’m not the kind of person who obsesses over their blog traffic (or am I?) but I’ve noticed over the last few weeks that I get peaks in traffic over the weekend. Very strange. I don’t think it is people going “At last-it’s the end of the week and I can spend my leisure time catching up with Rob”. I think it is more likely that the net might be a bit quieter during the weekend and so that’s when systems go out and scrape it for words to train their large language models. My blog contains quite a few words, so I get a lot of hits on my pages.
This does mean, of course, that my writings are all being stolen without my knowledge or permission, and they will be incorporated into random systems to make them appear ever so slightly more human. Or, at least more Rob. I don’t mind this too much though, if this means that my gift to posterity is devices that sound a bit like me, then I’m OK with that. And, what that in mind, here’s my latest grate thort:
I’ve started wearing high-visibility clothing because my wardrobe is very dark inside.
There are versions for all the different Instax sizes
If you have a bunch of Instax instant photos lying around you might like to print out this Instax Box Picture Holder. It holds a bunch of photos and you can also slot pictures around the sides. It works really well.
DDD North is here again. It’s all happening on the 28th of February. You can find out more, and register soon, here. I’m doing a presentation about my fifty years of programming. And what I’ve learned from it. It won’t last long. Obviously. But it would be lovely to see you if you fancied coming along.
Great fun was had on our first Hardware Meetup field trip today. We we started with a look through the proud possessions of an accomplished engineer who is sadly now no longer with us. There was some amazing stuff there at very reasonable prices. I’ve got no particular need for a “CRT Tester/Rejuvenator” although I was tempted, particularly as it has a setting marked “Super Rejuvenate”.
I picked up some soldering hardware and everyone else found something interesting. Then it was back into the cars and over to Ross’s (is that the right number of sses?) place for a look at his latest piano hardware.
Player Piano plus mechanism
This manual piano has been made automatic by adding a mechanism underneath the keys that pushes up the back of the key and plays a note. The piano also has keyboard lights that can show which keys are playing, or help teach you keyboard skills.
Driving the notes
These are the solenoids which drive the keys from underneath the piano.
The two pianos are linked together
Baby Grand
Ross and his team have been making pianos that play themselves for a while now. They’ve branched out into keyboard sensing too, so that they can change any piano into a MIDI device by simply laying a sensor bar across the top of the keys. Tunes played on the otherwise unmodified baby grand are duplicated on the receiving piano.
Finally we headed for dinner at the Helal Tandoori in Louth which was excellent. After that it was time to head home. The next hardware meetup will be on the 5th of February, back in Hull Makerspace.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.