Thursday, October 13, 2022

Upgrading old iMacs

One of the nice things about the Apple ecosystem is that things really work well when you're current. One of the terrible things about the Apple ecosystem is that if you fall off the supported systems list you're left to wither, stumbling around closed-source code and proprietary hardware with no available parts. 

Our move to student BYOD was almost a decade ago which means we have some old computer lab hardware laying around such as late-2013 21.5" iMacs. If memory serves, they shipped with Mountain Lion which I think was the last OS X that Apple charged to upgrade. Mavericks was released shortly after we acquired the iMacs and the free upgrade was a nice touch. We opted for the wireless Magic Keyboard and Mouse, deciding to go all-in on the sleek aesthetics. It could have been interference, somebody microwaving their lunch, or our cinder block construction, but having 25 pairs of wireless devices in one room wrecked havoc on connections. Countless hours were wasted reconnecting devices and preventing peripherals from connecting to other iMacs.

As time goes on I'm going more and more portable. My current workflow involves a 13" Macbook and an iPad, but I have two external displays when I'm at my desk. (side note: at the time of me writing this Apple has dropped the term "notebook" and has adopted "laptop.") I still think there's a place for desktop computers, specifically permanent workstations/kiosks or terminals requiring a consistent setup, e.g. server monitors or readouts. Then there's the practicality of having a larger display. I think we're all waiting for the final merge of iPad and iMac by having a shell of a desktop with just a keyboard and mouse and you just slide in an iPad to "dock" it.

I guess this is a long way to say I haven't gotten rid of any old iMacs yet. So after yet another Makerspace reorganization I plugged one in, resynced to Meraki and Apple School Manager and ran all the updates. It took the better part of a day just because of how slow everything was running. It was on Catalina and just needed a big macOS update and some app updates but it was running ok. I then decided to compare it's lacklustre performance to a fresh install of Catalina. While it was installing I tried to upgrade to Monterey but realized it had dropped support to these iMacs, even though they were still Intel-based.

Thankfully, OpenCore allows patching of the bootloader to allow macOS installs on non-native hardware. It was a straightforward process to create a USB boot disk with Monterey get it up and running. OpenCore even detects that it's booting from USB and offers to load it into the HD!


So far Monterey seems slightly faster than a clean install of Catalina. But it still wasn't fast enough so I decided to swap in a $20 SSD and 16GBs RAM -- the RAM was double the cost of the SSD! Getting into the iMac was quite the chore. iFixIt had a nice teardown along with colour-coded screw placement which helped immensely in the rebuild. Some notes:

  • using a utility knife with max 3/8" blade length worked well for cutting display adhesive
  • cable connections are very fragile! I may have broken off an antenna connector
  • the logic board can be screwed in but still offset enough to have the ports not-aligned with the rear cutouts. Triple check all plugs are usable before closing it up
  • RAM may be replaceable without removing the logic board but you'll need to be agile enough to release the locking lever by touch alone
  • adhesive strips can be found cheap on Aliexpress


I haven't reattached the display with the adhesive strips yet and am relying on the Alien Tape-like holding power of dollar store painters tape. So far so good, but as expected there's only been a bump in SSD stats with negligible difference in RAM or CPU usage for now.
 



Coincidentally this week Oracle released version 7 of Virtualbox. I use it to run virtual machine instances of Windows and Linux on our Macs. They let me quickly run some legacy Windows software like our digital signage program and laser cutter software. For redundancy I rely on two machines: one running Virtualbox and one dual-booting using Bootcamp. Both work great and have their specific use cases. Anecdotally, the SSD is much faster in Virtualbox.











Friday, September 23, 2022

Managed Apple IDs and User Enrollment

A while back I posted some issues we were having with distributing apps to our Bring Your Own iPad students. The tl;dr is our school would purchase a few apps using our volume discount and then distribute the redemption codes to families. They would redeem the code in the app store and the app would download and they could retain ownership and responsibility to keep it updated.

The migration to Apple School Manager has sunsetted the use of redemption codes and relies entirely on ASM and MDMs to manage devices and users. This presented a logistical problem for us since we want a no-touch policy on BYOD to enforce an air gap from any of our internal networks.

Apple has started up a new online education community that includes teacher education, the Apple Teacher and Coach programs, and also a new forum. This form is interesting because it's education-focussed which hopefully reduces the amount of useless help or rhetoric posted on more public or generic technical forums.

I posted my issue to the Deployment forum and was suggested to look at User Enrollment. The use of federated authentication would play well with our current sync of AD and Google. We do not provide students with their login until Grade 4 though which would make for interesting management in the younger years. I suppose we could provide a simple password for first login then reset all passwords, but this may interrupt app updates down the road.

The siloing of personal data away from corporate data is a great feature and is a hallmark of Apple's push for privacy. Having separate volumes emphasizes the separation of data and how ti cannot be accessed.

I've started testing it with a few user accounts and am hoping for good news for next September!



Wednesday, August 31, 2022

Right to Repair

I try to disconnect from work and social media as much as possible over the summer but like any educator I get bursts of inspiration even on vacation. A long time ago I would collect old electronics, toys and computers for students to dissect. It's pretty satisfying to see kids tearing down devices using hand tools. Some would go to town destructively while others would methodically organize screws or parts. Most kids wanted to diagnose faults and/or combine parts to create frankenstein machines.

I have written previously about the advantages of understanding how things work by taking them apart. Destructive testing and reverse engineering are fantastic skillsets for curious makers that I try my best to foster in my spaces.

Unfortunately, some devices are designed to non-repairable. Companies may wish to protect intellectual property, save money by not supporting repair divisions, encourage planned obsolescence or maintain market capitalization by forcing participation in one ecosystem. Look over to iFixIt for a nice summary of Right to Repair.


This issue came up over summer when my electric toothbrush started acting erratically. It's an unnerving feeling when you get woken up at 3am by a strange buzzing from inside the house. Thankfully this was my second-go-round in dealing with faulty toothbrushes so I clued into the location pretty quick. 

There is already quite the library of resources online interpreting error codes and beeps, teardown steps, and suggested fixes. Most suggestions seem to be replacing the low-cycle factory battery. What I can offer is a few tips that saved me a bit of the time the second time around.

First, opening the devices and removing the board is probably the hardest part. For my Oral-B brush I found using channel lock pliers with a cloth wrapped around the base worked well since the base extended up the sides a bit. I also used the charging base once but I wouldn't really recommend it since it doesn't offer much friction fitting and there's the chance you'll have a broken charger and toothbrush.

My newer Philips brush had base plate that was flush with the bottom of the case making it impossible to use a gripping appliance. I found screwing a bolt with coarse threads into the bottom then pulling it straight out with pliers worked well. The first time around I wrapped some soft tissue around the threads to reduce the tapping in the soft plastic base. You may have to find a bolt width that works for your model, I think mine was around 1/4" or 5/16".

Take care to not break any locking tabs when you slide the board out. The Oral-B board was more difficult to take since you need to finesse motor threads and battery tabs out of the way. Once removed, liberally apply 99% isopropyl alcohol to degrease and expel any moisture. Inspect for any other kind of residue and corrosion. I was lucky that mine didn't have any physical damage, though there was a lot of residue and it was clear water had infiltrated the case.

Removing the batteries was straightforward, just take care to avoiding nicking any wires and be sure to note polarity and tab orientation. I was able to replace my Oral-B with a standard AA NiMH Eneloop but my Philips used a LC18650 3.7v li-ion. If you're soldering tabs onto the batteries make sure to use a wide solder tip to reduce the time you're applying heat. I find the negative terminal harder to solder because of the larger surface area.


This all seems like an awful lot of work for a toothbrush but I think it's an awful waste of work designing a product that a) isn't waterproof for a wet environment and b) isn't user-serviceable to replace a part that has a high failure rate.

Monday, March 28, 2022

Introducing Python with Astro Pi: Mission Zero


Astro Pi is a yearly Python coding challenge offered by the European Space Agency. It challenges students to write a simple Python program that will be run in space on the International Space Station.

It has been run since the first Raspberry Pi computers were sent to the International Space Station in 2015. It's open to European countries and, thankfully, Canada, a total of 25 participating countries. Last year we had 18 teams enter and they all received a nice certificate that had their team name and a map showing where the ISS was flying when their code ran:

As you can imagine there's lots of excitement that their program will not only be run in space, but astronauts may see their message! There are lots of jokes and alien greetings, but there are some minimal requirements:
  • the Python code must run with no errors
  • a humidity reading must be taken and displayed (using SenseHAT)
  • programs are cut off at 30-seconds runtime
Astro Pi uses Trinket.io, an online IDE with a Raspberry Pi and SenseHAT emulator so students can experiment and test their code in one convenient location. Trinket is also iPad and mobile compatible.


The Sense HAT module is quite limited in its scope (you can see the API calls here) but probably most students will be interested in drawing or animating pictures using the 8x8 LEDs. The simplest method would be to colour each individual pixel using a list:
picture = [
   g, b, b, b, b, b, b, g,
   b, g, g, g, g, g, g, b,
   b, g, b, b, g, w, g, g,
   b, g, b, b, g, g, g, g,
   b, g, g, g, s, s, g, g,
   b, g, r, g, g, g, g, g,
   b, g, g, g, g, g, g, b,
   g, b, b, b, b, b, b, g
   ]
This is incredibly tedious, though a spreadsheet with conditional formatting may help students conceptualize their drawings. Even using a pixel art program like pixilart.com with a canvas size of 8x8 would be easier.

Animations would be the next step up for students. Simple code to advance each colour to draw line by line:
r = (255, 0, 0)     # red
o = (255, 127, 0)   # orange
y = (255, 255, 0)   # yellow
g = (0, 255, 0)     # green
b = (0, 0, 255)   # blue
i = (75, 0, 130)     # indigo
v = (148, 0, 211)   # violet
w =(255, 255, 255)  # white
k = (0, 0, 0)       # black

rainbow = [r, o, y, g, b, i, v, w]


while True:
  for y in range(8):
      colour = rainbow[y]
      for x in range(8):
          sense.set_pixel(x, y, colour)
      sleep(0.25)
  for x in range(8):
      colour = rainbow[x]
      for y in range(8):
          sense.set_pixel(x, y, colour)
      sleep(0.25)
  sense.clear()


Monday, February 14, 2022

Wordle with Numbers (Part 2)

 In a previous post I explained how to use conditional highlighting in Numbers to make a Wordle-like game. It's simple enough for middle school students to create and have fun on their own and leaves open lots of extension opportunities. However, there are a few flaws in this clone: cheating can be rampant because each letter is checked immediately and individually so there's no waiting on submitting the entire word. Guesses are not limited to 6 since you can just erase a previous guess. There's no keyboard indicating which letters have been guessed or evaluated. Secret words must be manually updated, limited to one each game only, and cheaters could sneak peeks without anyone knowing.

Most of these issues could be overcome using advanced scripting like macros or visual basic (in Excel) but where's the fun in that? The whole rationale here is to clone something using a spreadsheet product to show students how formulas and spreadsheets work!

To hide the secret word a bit better and to create a word bank we can use a second sheet in Numbers, or a second worksheet in Excel/Google Sheets. Give that second sheet a name like "secret word list" and put a different word on each row, each letter separated into columns. In Column F insert the formula RAND and Numbers will assign a random number between 0 and 1.You can click the Column F menu arrow and sort by this column, thus creating a new random word to appear at the top of the list every time Numbers is open:


Now that we have a randomized word list we can reference the second table by updating our conditional highlighting rules. Back in table 1, open the rules by selecting the game area and clicking Format > Cell > Conditional Highlighting. Update the green rule first by typing in the first few letters of the second table name. When Numbers autofills the name press enter and type "$1$1" to reference the first row and double-check that "Preserve Row" is checked.
Update the remaining rules in a similar manner, referencing the correct columns and rows on the second sheet instead of the current sheet.

Forcing Numbers to check the letters only when an entire is submitted should be accomplishable by using Applescript but I haven't tried it. Also, the mobile app version of Numbers apparently has a Forms feature that creates fillable forms that may allow you to capture a word guess and then calculate the correct letters. You can also probably use text splitting formulas like =LEFT, =RIGHT, and =LEN to split the text into individual columns.

As a final thought, I'm intrigued by the possibilities of numbers in Numbers, ie cloning Nerdle. But this poses an interesting programming challenge where you not only have to provide correct integer placement clues, but also evaluate the validity of the equation! As with most programming solutions there are elegant and inelegant solutions and it's always interesting to see what students come up with.


Sunday, February 13, 2022

Wordle with Numbers

Not Wordle the game with number as in integers (that game has already been made), but Wordle in Numbers the spreadsheet app!

This is one of those trendy projects ala Flappy Bird that will probably get outdated the moment it's published but it's still a nice introduction to spreadsheets, conditional formatting, and logic.

To recap the rules of Wordle:

  • Guess a 5-letter word.
  • White squares indicate unused guesses.
  • Dark grey indicates that letter is not present in the secret word.
  • Yellow indicates the letter is present but in an incorrect position.
  • Green indicates the letter is present in the correct position.
  • You have six guesses to guess the secret word.
Create a new Numbers spreadsheet. Type in a secret word in Row 1. Each letter should be in its own column:

The secret word is on row 1. Rows 2, 3, 4, 5, 6, 7 will contain our guesses. We can resize our playing area to make square cells and colour the borders by selecting our playing area: cell A2 to E7:

We can give rules to cells in spreadsheets. These rules can change data or the formatting of cells. We're going to have Numbers compare our guesses to the secret word and colour the cell if it's right or wrong.
Let's start with unused guesses. Unused guesses should be white. So, select our playing area of cells A2:E7 and click Format > Cell > Conditional Highlighting.
Add a rule that says Cell is blank and Color Fill it white:

Correct letter guesses that are also in the correct column position are coloured green. Highlight the playing area again (cell A2 to E7) and open Conditional Formatting again (Format > Cell > Conditional Highlighting) and add a rule that says Text is then click the cell reference button the Cell Reference button. Click on the number 1 in the first row to select the entire row:
Choose a green fill and make sure "Preserve Row" is selected. The rule should look like this, note the dollar signs that preserved the absolute reference to the cell:

Correct letters but in a wrong position are coloured yellow. So make sure the playing area is selected again and add a rule that says Text is and click the cell reference button the Cell Reference button. Select cell A1 to check against the first letter of the secret word and choose a yellow fill. Make sure "Preserve Row" and "Preserve Column" are selected:

Create five more rules that reference the next cells: B1, C1, D1 and E1. Make sure to enable "Preserve Row" and "Preserve Column" on each rule so it references the correct row and column with absolute references (the dollar sign $).

Now we can create a rule to show a dark grey if the letter guess is incorrect. With the playing area selected create another rules that says Cell is not blank and choose a custom colour fill of a dark grey colour:

Time to test! Enter a word in your playing area, one letter per cell. The cell colour should change to yellow if you have a correct letter. If it doesn’t work, time to debug or fix your code!
Common mistakes:
  • Not applying the rules to all cells in your playing area
  • Not including the "Preserve Row" or "Preserve Column" (the $ signs) in your formula rule, e.g. $A$1
  • Extra spaces or punctuation
If the game is working then it's time to hide the secret word. Do this by right-clicking Row 1 and selecting Hide row

There are a few issues with hiding the secret word this way. Unscrupulous players can unhide the row and cheat very easily. (nevermind that they can cheat by having endless guesses, and they can even check letter by letter and not submit a whole word like real Wordle!). Also, the secret word needs to be changed manually each time you want to play. It would be nice to create a word bank of many words that get randomly selected for a game. That way, the game maker and player would have no knowledge of the word before playing and more than one game can happen. This kind of game can be created using multiple worksheets, and if I'll try to publish those steps in a separate post.


Monday, January 31, 2022

Multitasking on iPad

 Multitasking on iPad has come a long way over the years. It used to be double-tapping the Home button to reveal all open apps was a huge deal. Recent iPadOS versions have introduced huge innovations in gestures, multi-touch awareness, accessibility, mouse control, and many other small improvements to improve multitasking. I'm really looking forward to Universal Control where I can control iPads and external displays from my main Mac, but I'm waiting for it come out of beta on MacOS and iPadOS before I update.

Split View and Slide Over are perhaps two of the most misunderstood multitasking features for me. probably because I can never be bothered to actually learn how they work. There are a couple of ways to invoke both of them.

With an app open, tap the three dots that appear at the top of the screen:


The icons represent Center, Split View and Slide Over:

Choosing Split View lets you select another app. This lets you view both apps together on the screen. Scrolling or tapping in one window will not affect the other.

Use the grey slider in the middle of the screen to resize either window. Pull it completely to either side to exit out of Split View and enlarge the current window to fullscreen.

Slide Over works similarly except it places the current app in a smaller movable window. This may help when you want to have more flexibility in moving the window to different parts of the screen while still allowing input in either app. You can use the three dots at the top to change to Split View, or tapping the Center button will fullscreen the app. Pull the Slide Over window completely to one side to make it disappear.

For either Split View or Slide Over I prefer to use gestures since I find it a bit easier. Pull up from the bottom starting outside the screen to open the dockbar, hold your finger on an app and pull the app onto the screen. Dragging it to one side will open in Split View while holding it more in the center will open it in Slide Over.

Gestures are also very useful when switching between apps. Enable Gestures by going to Settings > General > Gestures. Using Four & Give Finger Swap allows you to "swipe" between open apps using those fingers. I find I use this very often since it's so quick and intuitive.

Recent iPads will also allow dragging and dropping between apps using multitasking. For example, you can drag a photo from Safari into Pages by having Pages open in Split View. Or, selecting some text allows it be dragged into Pages.

If you use a Mac then you can use Sidecar to use your iPad as a secondary display wirelessly. Besides the usual benefits of having another display, Sidecar gives you Touchbar buttons on your iPad even if your Mac doesn't have a physical touchbar! See this support article for more info.





Thursday, December 16, 2021

Laser cut ornaments and gift tags

'Tis the season for some handcrafted gifts! Last year I had fun making dumpster fire ornaments. I grabbed a dumpster and fire SVG from Wikicommons, offset the path to create a cut outline and manufactured some a terrible momento of the year that was.


This year I thought I could be a bit more positive and help make egg nog a bit more palatable. I saw some ornaments online that cleverly held a mini liquor bottle and played on the "another shot" theme of vaccines and whatnot. I wanted to use a mini rum bottle because of eggnog so needed to draw the ornament around the shape:

Adobe Capture works really well in auto-tracing outlines from photos. It also kept the scale which made it easier to size the whole ornament. My first design had a huge bow on the top where I thought I could etch in names but it was much too large once the bottle was added. I was really close in making the cutout for the "Take another shot" text shape fit inside the bottle cutout with the syringe but it just didn't work out.

As with any large project I had lots of leftover scrap wood, most only a few square inches. A great project to use up scrap wood is making personalized gift tags:

Find or draw an outline of gift tag. If you're using an image you convert to paths by going Object > Image Trace > Make and Expand. You may need to force a certain Image Trace setting, for example "Black and White" or "logo." Delete any extra paths that get generated, and any other elements that you don't need such as the hole. Since I'm adding letters and cutting out the negative space the hole is useless.

Drop in a text block with your name. Choose a font that has appropriate vertical height and adjustable kerning. I used League Gothic and was happy with the default kerning so I just scaled the vertical to have a bit of overlap with the inner tag path. Each letter must enough overlap at the top and bottom so it remains attached.


Use the direct selection tool to select the gift tag anchors on the right side. Stretch out those points to enclose the whole name. Make sure to hold down Shift to lock the horizontal plane as you stretch.

We now need to merge the text with the ring but only keep the outside edges. In other words, we don't want to cut out the entire letter, just the parts that are not touching the gift tag. Select the text box, Type > Create Outlines. Remove the fill and change the stroke to match your laser cutter settings (I used black 0.25pt). With the textbox still selected direct selection only the inner path of the gift tag and use Pathfinder > Shape Mode > Minus Front. Tada!



Wednesday, November 24, 2021

3D printer control using OctoPrint

A big portion of our Makerspace is devoted to our fabrication lab (fablab!). 3D printers do the additive manufacturing and the laser cutter handles the subtractive. We currently have five 3D printers running pretty well: four cheaper, smaller Monoprice Select Mini V2s using PLA and a larger Creality Ender 3 that uses PETG. The Minis are maybe five years old now and have more than made up for their initial $200 cost. Even the Ender 3 was good value at ~$350 CAD a few years ago.

I'm still a big believer in running smaller, cheaper 3D printers. This is especially true in an elementary school environment where volume (ie class sizes) dictate production flow. The advantage of one larger, better printer (our Ender 3) is it can handle larger print volume (230mm x 230mm x 250mm) at much higher detail. The technology has advanced enough that cheap printers can be optimized or calibrated easily and can produce dependable prints before maintenance or parts are needed.

Student designs are typically handled through three different platforms. For early primary, we use hand-drawn designs that are converted to vector drawings using Adobe Capture. Simple 3D extrusions can be handled in Illustrator or Inkscape. Older primary use Blox 3D or Reality Composer on iPads. Intermediate students exclusively use Tinkercad, either manipulating 3D shapes or using Codeblocks.

A recent Grade 6 project involved making loaded dice for a Math UnFair project. Students used Tinkercad Codeblocks to create dice with an unfair proportion of outcomes. At a good-quality layer height of 0.175mm using PLA I was able to print a class of 25 dice in about four hours. This rapid production scheme allows for more iterative designs from students and greatly improves the speed of the design cycle.

The Minis apparently have wifi capability but I never bother to use it. Instead, I slice models in Cura and copy the resulting gcode to memory cards that are physically inserted in the printers and started. The Ender 3, however, has OctoPrint installed in addition to its memory card reader.

OctoPrint is a lovely web server built on Raspian and optimized for Raspberry Pis. It's intended as a web frontend for 3D printers physically plugged in. In our case, it runs locally without external connection and is connected to our Ender 3. OctoPrint allows for remote uploading and starting (even slicing!) of files, but I mostly use it to monitor longer print jobs.

Our Ender 3 is optimized for silky-smooth high-quality prints using PETG and mesh bed levelling. As a result, print jobs tend to be quite long. Benchy, for example, takes about 90 minutes! This timelapse was made using Octolapse, a fun plugin for OctoPrint that extrapolates timings for webcam snapshots to make models appear to grow out of the bed. You can configure it to take snapshots at specific times, such as when the extruder is out of the way or simple stop-motion effects.
The built-in timelapse feature of OctoPrint works well too

I used to run OctoPrint on an old Pi 2 Model B but it had quite a bit of lag on it, even when it wasn't communicating with the printer for a printjob. I swapped it out for a Pi 4 and it runs much, much better but that seems to be a bit of overkill. It tends to run quite hot so make sure you check temps using "vcgencmd measure_temp" every so often. There's probably a plugin for that, but it's easy enough creating a bash alias and having it displayed. (Edit: I just installed the Resource Monitor plugin that appears to poll the same info).

A few last tips: 
  • OctoPrint runs headless by default so make sure to have a spare monitor handy to check the IP on boot. 
  • If you're using the official Raspberry Pi imager you can also press Ctrl - Shift - X in the imaging menu to enable SSH, set locale and write wifi SSID login before flashing to a memory card. Very handy if you want to just connect to "http://octopi.local" on boot. 
  • When uploading files do NOT use the "upload to SD" card option; it runs painfully serial slow. You're better off uploading directly to the Pi memory card and running from there.
  • While OctoPrint works great on a Pi it would work similarly well on an old Chromebook. It may even be better since you don't really need the mobility/portability of a Pi, the GPIO pins or power constraints.

Thursday, November 4, 2021

RGB LED Matrix Panel

A while ago I had purchased a cheap LED matrix panel from Adafruit. I had intentions of using it as a scrolling menuboard for our Makerspace vending machine project. I re-discovered it and finally spent some time figuring it out.


The panels are relatively simplistic. Mine had 32 LEDs across and 16 down, totalling 512. They run off 5 volts with a maximum draw of 2.5 amps if all LEDs are on. The data interface is HUB75 with 12 total pinouts: 6 data and 6 control.

My first mistake was using the "official" tutorial Adafruit supplied. I spent some time wiring it with jumper wires to a Raspberry Pi, but of course just like Hal with his light bulb I ended up in a spiralling chicken-and-egg situation of missing power supplies, Linux distros, and diagnosing SSH connections when I forgot to enable it in the first place. I even had to build a HDMI monitor because I forgot how to run headless Pis. Ugh.
All I wanted to do was make a colourful sign...

Once I sorted everything it still didn't work! Unknown to me at the time, the Adafruit wiring diagram was outdated because the RGB libraries had been updated which switched around the wiring!

Long story short, I switched to an Arduino Uno. If you're looking to do a similar project here's what I noticed:
  • Adafruit's RGB Matrix library works well. Make sure you install it in your Arduino library.
  • Arduino Unos work but their limited memory makes flicker-free scrolling text a bit trickier. Either use a Mega or strip down the code to make it fit.
  • Maximum current is 2.5amps but for our static "Makerspace" message the draw was a constant 400mA so I powered the matrix off the Arduino 5V pin. I wouldn't recommend this if you have more LEDs lighting up since the maximum draw off the 5V pin is between 400mA-900mA.
  • The code uses the function matrix.Color333(r, g, b) to specify a colour of the LED. The range is from 0-7, so red is 7,0,0 and white is 7,7,7.
  • Ardunio Cloud's limit of 200 seconds/day in compile time is not nearly enough. Stick with the physical editor.






Tuesday, October 19, 2021

Extending a Chromebook past the Auto Update Expiration with BrunchOS

 I first ventured into the world of Chromebooks in 2014 with a class set of Acer C720s. We were coming from a fleet of repurposed ex-staff HP laptop bricks with terrible battery life and wifi, so getting a 2.5 pound 8-hour battery cloud terminal was magical! I think they cost $280 CAD each so that allowed us to get outstanding value, even with the addition of the exploitative $30 management console fee.

In 2018 we retired the fleet. They had worked outstandingly well, save for a few keypad issues. We had expanded the Chromebook program to our entire grade 5 population so replaced them with Lenovos. There are many build quality issues with the Lenovos around the camera, keyboards and screens that have frustrated me but those stories are for another day!

Even though the C720s were running great we would have had to retire them the next year anyway due to Google's Auto Update Expiration (AUE) that only guarantees ChromeOS updates to a certain date. Running Chromebooks past this date is like running iPads past their iPadOS end-of-life; they'll work but they receive no security patches or bug updates. This is problematic in a school environment and generates lots of e-waste.

For Chromebooks the easiest solution is using Neverware's Cloudready images. The process is fairly straightforward: download the Cloudready image, burn it onto a USB device using the Chrome Recovery Utility, and restore it on the Chromebook. Unfortunately, the C720 is not on their official supported devices list but I'm sure it would work fine. The pricing structure can work for larger 1:1 districts, but at minimum yearly $2500 USD I don't see value in maintaining an older set of Chromebooks for extended periods.


Replacing an aging fleet over a 3-year cycle is more cost-effective

Another solution is turning Chromebooks into simple Linux boxes. Crostini is Google's official Linux release but it's only officially supported on certain devices, not including the C720. The easiest chroot solution is Crouton but I've never tried it since I'd prefer to run Linux outside of ChromeOS. GalliumOS xubuntu seems to be the most popular option for single-booting.

Since I wanted to renew our C720s for student use I instead looked for a way to install a newer, updatable version of ChromeOS. This attempt had started a few years ago with the release of Croissant (love the food names, perhaps in the spirit of Android dessert release names?). Recently I discovered Brunch, a framework that uses a generic recovery image to install ChromeOS.

To start, you need to update the C720's firmware. Before you can flash a new firmware, remove the write protect screw. Then enable Developer Mode and reboot. Open a crosh shell and run the script provided by MrChromebox:
cd; curl -LO mrchromebox.tech/firmware-util.sh
sudo install -Dt /usr/local/bin -m 755 firmware-util.sh
sudo firmware-util.sh

With the updated firmware you can boot from the USB where you've placed Brunch. Note that on the C720 you must use the Rammus recovery image only

Wednesday, October 13, 2021

Assigning Apple Volume Purchasing licenses to Bring Your Own Devices

My school has enjoyed the myriad of benefits from Bring Your Own Device for a number of years now. Students in Grades 2-4 are expected to include an iPad as part of their school supplies. Over the years, we've experienced the longitudinal wave of app acquisition: from excitement and experimentation with dozens of free apps in the early years to paid apps and, recently, back to free apps.

In the beginning with a handful of iPad 2s (2011; over a decade ago!) our teachers were excited to try out such exciting digital opportunities as Calculator, Screen Ruler, or many other free apps that barely made it out of the substitution tier in Puentedura's SAMR model. Free was great for classrooms on a budget and we didn't need to worry about licensing since free apps could be transferred to different iPads using master backup images in iTunes. Shortcuts included using encrypted backups to save passwords and wallpapers, and 10-port USB hubs for simultaneous re-imaging

App development reached a crescendo with the refinement of the iTunes App Store. License agreements were refined and the Volume Purchase Program (VPP) was created to help with the influx of educators wanting paid versions to avoid advertisements or to unlock premium features. VPP in particular was a boon for me as it offered 50% discounts for 20+ quantity purchases and offered an easy distribution method for our BYOD model: redemption codes.

Redemption codes allowed me to transfer licenses of paid apps directly to our students. Ownership and updating remained with families and was completely hands-off from the school. We didn't need any device information, AppleIDs or any other identifying information. Redeeming a code downloaded the exact version of the app we wanted and eliminated any confusion that could happen with providing gift cards or having families deal with inputting payment information. We were also able to track which student received which code and stay on top of compliance.

A little too app happy?


In recent years, we've started to move away from paid apps back to free apps. But instead of ad-sponsored or freemium apps we're back to relying on a small number of legacy or enterprise apps: Keynote, iMovie, Google Docs and Slides and a number of free-to-download apps that use subscription models. One notable exception is Book Creator and their move towards a teacher-centered subscription model with unlimited students. Book Creator has removed the academic discount of 50% for their app (currently $3.99 CAD) and heavily promotes their web-based subscription model.

Last year we migrated to Apple School Manager (ASM) to ensure continuity of purchasing and managing our volume licenses. ASM works well with Meraki MDM which I use to manage our iPadOS devices. Last year also marked Apple's deprecation of redemption codes. This was a gut punch to our model of hands-off BYOD and required some thought to maintain our level of support.

We could use Apple Business Manager instead which still allows generation of redemption codes. Unfortunately ABM does not offer academic discount of 50% on 20+ quantities. This would add up to hundreds of dollars for us yearly. Instead, I am using ASM to purchase paid apps along with any applicable discount. These licenses sync with Meraki which allow for easy distribution to school devices. Family BYOD never engage with Meraki though, and I did not want to go down the path of registering of external devices with our MDM for privacy, security and logistical issues.

What is working well so far is using Apple Configurator to assign licenses to family devices based on device IDs and serial numbers. No personal or other identifying information is shared. Configurator also allows me to transfer the apps instantly without the need for families to log into an AppleID or initiate a download. Unfortunately, this requires a physical connection from the iPad to Configurator. This involved me visiting groups of students and plugging their devices in. Students needed to enter their passcode, after which I made sure to download the unlock token.

VPP apps in Configurator

It took me while to sort out the ASM and VPP accounts and syncing them with Configurator. Sometimes I would log in and could view non-migrated licenses, and other times I was able to view VPP licenses. This article was helpful but I ended up not needing to create another location in ASM. I highly recommend saving a copy of the .ipa file for each app you want to transfer. Configurator, for some reason, removes the .ipa after each transfer which means it downloads a fresh copy every time you plug a new iPad in. This adds minutes to each transfer. For me, the .ipa gets saved in:

~/Library/Group Containers/K36BKF7T3D.group.com.apple.configurator/Library/Caches/Assets/TemporaryItems/MobileApps/

You must copy the file before Configurator completes the transfer because as I mentioned, it'll get removed immediately after the transfer completes.

To transfer the app and assign the license plug in the iPad and select +Add App. Choose the apps and cancel the operation after Configurator assign the licenses. Now select +Add App again and choose the .ipa files from your computer. If the app does not open on the iPad when tapped it probably means the licenses weren't assigned correctly in Configurator and you'll need to repeat the process.

There are some unknowns about this process. I don't know what happens when an app needs updating, or if the apps gets removed by accident. I assume we'll need to plug everything back in to Configurator. I also wonder what happens if we revoke licenses; does the app stop functioning or is it similar to download an app then logging out of the AppleID? The biggest question would actually be: what's changing next?!