Today in Programming: Microsoft MakeCode
Since I’ve been making a lot of great progress programming with the kids in Scratch, I bought some Circuit Playground Expresses to program with the kids. The Circuit Playground Express can program in Arduino’s C dialect, CircuitPython, or Microsoft MakeCode, which uses blocks like Scratch. Today Scarlett and I made our first useful bit of code, a digital spinner we called The Sibling Chooser. Here’s the code, and you can see that it is indeed like Scratch:
Setting up my Raspberry Pi Zero W for the Pimoroni Enviro Mini pHAT
As I mentioned before, I got a Raspberry Pi Zero W to replace my Arduino MKR WIFI 1010 and ENV board in the bathroom. My Pimoroni Enviro Mini pHAT (or bonnet, as Adafruit calls them) finally arrived a few days ago, so I setup a git repository for my code. The Pimoroni git Enviro+/Enviro Mini repository has a one-line configuration, but I’d rather do things manually so I know what I’m doing and also so I can set up a proper requirements.txt in my Python venv.
Today in Programming: Python
I noticed that something had gone screwy with the Raspberry Pi 1B in the garage that was monitoring the garage door. I restarted it and discovered that last time I was coding and working on making it more robust if it had a temporary lapse in WiFi (so it wouldn’t crash), I’d created a little error. Fixing that error led me to realize that my new code for robustness had introduced an unfortunate artifact in that it would pass a status of “unchanged” to MQTT. So I fixed that. Code’s now in a good place. I just need to add a few more config options to make it more usable for others who aren’t me. Then I’ll make another release.
Vivaldi on Windows Part 2 (plus a teeny bit about Vivaldi on Linux)
I’ve been using Vivaldi as my default browser for about a week now. As I said in the penultimate paragraph of the post where I mentioned exploring various browsers, I don’t really use my browser on Windows for much more than uploading YouTube videos. And I mentioned last time that it wasn’t the best setup when squished to a half 1080p Window while trying to upload YouTube videos with the tabs on the right. I also had to close the bar on the left. Here’s what that looks like:
Today in Programming: Python and Scratch
Scratch
Once again I worked on some Scratch projects with the kids. This time it involved a sports theme. I let the kids choose which games they wanted to create and Sam chose to create the game where Scratch the Cat goes Skiing.
Having done this for a few weeks now, it wasn’t too much trouble to get things working and do a mod or two for Sam. The video below contains the code and a short video of Sam playing the game.
Upgrading main computer (Supermario) to Fedora 32
It’s been about a month since Fedora 32 was released, so I decided to try and upgrade Supermario to Fedora 32. First I had to disable the dropbox repo since they don’t have a Fedora 32 binary yet. Other conflicts included:
- bat in module
- gimp in module
- meson in module
- ninja in module
- pythnon3-pytest-testmon (doesn’t belong in a distupgrade repo)
- python2-beautifulsoup neds python2-lxml
The python ones are no-brainer to me. I use virtual environments now so I don’t care about the system libraries. I can get rid of those.
Raspberry Pi Zero W for new Projects
The next project I wanted to work on was to see if maybe my environment monitoring might be slightly more reliable with a Raspberry Pi than with an Arduino. So I wanted to do some comparisons. For my bathroom IoT project, I am using:
- Arduinio MKR Wif i 1010 - $32.10
- Arduino MKR ENV Shield - $34.40
- 5V 2.5A power supply - $7.50
That’s a total of $74 before taxes and shipping. To get the same measurements on the Pi platform I went with:
Vivaldi On Windows Part 1
This is the first post continuing my exploration of web browsers outside of Firefox and Google Chrome. You can read the introduction here.
Running Vivaldi for the first time.
For the first browser I wanted to check out on Windows, I decided to check out Vivaldi. My thought process is that I’m most likely to end up with Brave, so better to save that one for last. But as I went through the first-run process in Vivaldi and saw the nice polish the browser seems to have, it really started tugging on me, saying, “Are you sure you wouldn’t want to just stay with Vivaldi?” For this first post, I’d like to cover the first-run process and then a little video poking around the interface. This’ll be followed up in a while with any impressions I’ve come away from my usage of Vivaldi on Windows.
Are Web Browsers Getting Exciting Again?
It’s been a while since I last considered web browsers. I wrote this post in 2008 about which browsers I was using. And in 2011 I wrote this post about KDE Browsers. So that’s at least 9 years since I wrote about browsers. What is my current situation?
Well, on Linux I bounced back and forth between Firefox and Chrome, depending on which one was getting better performance. At this point, for what I do, Firefox is the winner for me. I use it on my laptop and desktop and it gets things done without getting in my way. I don’t necessarily have the most modern GUI setup because it tends to keep your GUI settings as you upgrade. This is what it looks like:
Yesterday and Today's Programming: Scratch
Stella’s Project
Because last week was busy with house projects, this week I continued the ocean/water-themed programming from the Raspberry Pi Foundation. The first project was a game I made with Stella (her first computer game creation), a boat race in Scratch. While we mostly stuck to the tutorial, we did partake in the challenges, including adding a shark and figuring how to have background music (which Stella chose on her own). That turned out to be really tough as my attempts to figure out how to use the loops led to stuttering. Eventually I figured it out and you can see what I did, the rest of the code, and how the game plays by watching the video below: