Introduction: Tiny Mac II (Pi Zero 2) and Tiny Mac III (Pi 4) As Telegram Picture Fame (TeleFrame), Activity-LED, Safe Shutdown and More

All relevant resources like logos, icons and the statements for all config files can be downloaded from my Tiny Mac Resources Repository ... and now the story:

------------------------------------------------------------------------------------------------------------------------------

1 1/2 years ago I discovered the wonderful Tiny Mac-Project developed and published by cgenco and it was obvious, I have to do it as well.

But when the 1st one was done and I was holding it in my hands, I wanted to have it a bit more advanced with an activity LED to see if it's doing something and a safe shutdown-button for safe shutdown when using it without mouse and keyboard. And it should be ready to be used for multiple use cases as well like a TeleFrame or electronic photo frame, or a weather forecast station, a Recalbox station and and and. .... And what about a cool logo?

And while I was developing the Tiny Mac II (the small one), cgenco released the bigger Pi 3 version. It was so great that I thought, why not changing it to a Pi4-ready case for more power, RAM and use cases like pihole, or using it with multi boot or what ever.

So that was the story and here are the results. Have fun with it and again, thanks to cgenco and John Leake who started it all with his 1/3 scale Mac.

I'll only describe the steps I've added. Beside the hardware enhancements, I did some software enhancements as well:

  • Silent boot with RaspiApple-splash logo screen during startup and shutdown
  • automatic re-copy of the RaspiApple-splash logo when an update overwrites the splash screen picture
  • Display nightshift function: the display will turn off and on at a specific time to keep to off at night
  • Activity LED configuration to have it constantly on during no activity and keep it blinking during activity
  • safe shutdown configuration
  • Using TeleFrame as electronic photo frame with Telegram push service
  • As an alternative option if you don't use or don't like to use Telegram, you can realize the electronic photo frame using xscreensaver with Owlfiles to push photos from your smart phone to your Tiny Mac
  • Adding gnome-weather

Some of the pictures are from hand filed prototypes before I've changed the 3D files but they should work anyway.

I've designed the logo and the stickers in Corel Draw. If somebody wants to get the source files, just sent me a mail and I'll share

Have fun :-)

Supplies

Displays

I've used the following displays:

Every information for installation, configuration and the software downloads can be found on the linked Waveshare Wiki sites. It's a really good and always up to date companion.

Suppiles

You can use the same supplies as cgenco just published. For Tiny Mac II & III, you'll need the following parts:

Tiny Mac II and III:

  • Hot Glue Gun for glueing the display and the floppy disk drive (Tiny Mac III)
  • I've used this filament for all parts which is quite nice

Activity LED:

  • S/PDIF cable, aprox. 2.5mm thin. This one may work. Per Tiny Mac you'll need about 15cm of cable
  • 1mm drill and 2.5mm drill for the holes in the front plate
  • a combination pliers like this for squeezing the fiber optic cable
  • a cutter for stripping the isolation from the fiber optic cable

Display Cable:

  • 40 pin cable socket for the motherboard. I never used the upper clip
  • 40 pin cable connector for the display
  • 40 GPIO flat ribbon cable
  • key files like these to file the cutout for the safe shutdown button cable into the cable connector
  • Bench vise to splash the plugs with the cable

Safe Shutdown Button:

  • push button switch like these. The body should be 7mm thin to fit in the hole on the back of the case.
  • 2-pin jumper cable
  • Soldering iron

Floppy Disk Drive:

  • Micro SD to SD Extension just aprox. 15cm long. Longer versions doesn't work well.
  • Color printer for the floppy disk sticker

The Tiny Mac III works with the internal Pi 4 SD card slot. But for a more realistic optic, I've created stickers for the SD Card cases. I'm using it for the Tiny Mac II SD Card with the OS on it and as a fake floppy disk for the Tiny Mac III without a real Micro SD Card mounted in it.

For the Tiny Mac III I've cutted the cable from a card reader just and used the reader itself with the floppy case - this is much more realistic with the fake floppy disk in it then :-)

Tiny Mac III only:

Case:

  • 1 25mm long 3mm screw with screw nut for optical cable holder
  • 3mm drill if 3mm screws are used (like I did)
  • a little piece of 1mm thick sponge rubber

Step 1: Updated 3D Printing Files Tiny Mac II

Here are all 3D files you'll need for the Tiny Mac II:

  • new: RaspiApple-Logo - use it as you like :-)
  • updated: Case Back with hole for the safe shutdown button, cut out for the fiber optic cable, cut out at the top left display number
  • the disk back and front are still original
  • new: display clip for better display fitting
  • updated: front slightly changed at the display surrounding top right
  • new: optical cable holder
  • Toggle - still original

Step 2: Updated 3D Printing Files Tiny Mac III

Here are all 3D files you'll need for the Tiny Mac III:

  • new: RaspiApple-Logo - use it as you like :-)
  • updated: Raspberry Pi 4 compatibile case back with hole for the safe shutdown button, cut out for the fiber optic cable, cut out for access to the Micro SD card and RaspiApple-Logo on the back
  • the disk back, front and drive front as an alternative for the fake floppy are still original
  • updated: front slightly changed with a mini deepening where to drill the LED hole
  • new: optical cable holder

Step 3: Tiny Mac II and III: Constructing the Display Cable

The display cable is the most complex part because a cut out for the safe shutdown button connector is needed.

I've used a precision mechanic bench vise for having the connector in different angles. That made it easier filing the cut out of the socket with the key files. This must be done very precisely. I've reduced the size of the the jumper cable connector as well with sand paper.

Follow the pictures - there's not much to add.

The cable should be about 15cm long. Especially the connector should be assembled very careful.

Step 4: Tiny Mac II and III: Constructing the Safe Shutdown Button

This is pretty easy. Just cut the 2-pin jumper cable to a length of about 15cm and solder the 2 wires to the switch. That's it :-)

Step 5: Tiny Mac II - Building the Front

First drill the hole for the LED.

  • mark the position at the front and start with the 1mm drill from the front through the entire piece
  • then use the 2.5mm drill from inside and stop before drilling it through the entire piece. The hole should then have a cross section like in picture 2.

For a better centralized display fit, my good friend Gerry developed the display clip. I've used two of them for different parts of the display, so you have to print two of them as well.

  • Cut one of the longer display clip bones to fit at the right border of the display case and glue it there (pictures 3 and 4)
  • When you place the display in the borders, surround it with the display clip as you can see on picture 5. If it fits perfectly, hot glue it for good an and stable fit.

Step 6: Tiny Mac III - Building the Front

The printed Tiny Mac III-front should have this mini deepening to help identifying the right position for the LED hole. The other steps are exactly the same as with the Tiny Mac II-front just without the need to use the display clip. But it's a good idea to hot glue it as well.

The floppy disk case should be hot glued as well, especially when inserting the card reader. Hot glue the case parts and the card reader, too. Otherwise it can happen that you pull the reader out of the case when pulling out the fake floppy disk.

Step 7: Tiny Mac II and III: Motherboard Test and LED Cable Assembly

Before mounting the motherboards to the cases, you should put all parts together and test the functionality. This is the time to prepare the SD cards with the necessary display drivers, because then you can test every function of the display and the touchscreen, the display cable and the safe shutdown button. After testing the LCD display, disable the drivers again and do all the installation and configuration below.

LED cable assembly

Cut a 15cm piece with a cutter out of the S/PDIF cable and strip the isolation by cutting the isolation art one end at a length of about 2mm. Keep the other end clean and make sure that the optical cable is fee of isolation.

Tiny Mac II LED assembly with optical cable holder

You can screw the Tiny Mac II-cable holder directly at the right position of their board and move it in a position that, when you boot the Pi, the activity LED shines right through the hole. This should work quite easy and straight forward. The attached picture shows how it looks like on the Pi 4-board with the 2 LEDs.

Then put the optical cable in the hole and test it again. it should shine/flicker like in picture 7. If the cable is too thin and glides easily out of the holder, use a combination pliers to press the isolation wider. If it's too thick, you can use sandpaper to makle the isolation a bit thinner until it fits.

Tiny Mac III LED assembly with optical cable holder

You can test the function in general by putting everything together for testing. But the final assembly has to be done in the case as part of the board assembly by using the longer 25mm screw. It's a bit tricky, but you'll make it.

Done.

Step 8: Tiny Mac II Assembling

Your Pi Zero 2-board should be connected with all relevant cables. The cables should be drilled in a special way to fit best in the case after mounting it (see pictures 1-3). Don't forget to plug the safe shutdown button cable on the board, too.

  1. Screw the safe shutdown button switch in the back of there case
  2. Then mount the board in the case. That's a bit tricky. Make sure, that the board locks into the clip correctly (picture 4-5). 
  3. Secure the board by screwing the toggle in its position (picture 6-7)
  4. Take the front and insert the fiber optical cable into the hole provided. Ideally, it should protrude slightly from the front for the best lighting effect (picture 8-9).
  5. Screw the front on the back.

Done.

Step 9: Tiny Mac III Assembling

The steps for the Tiny Mac III are different to the Tiny Mac II steps:

  1. First mount the Pi 4-board in the case with the 3 * 15mm screws and the single 25mm screw like in picture 1.
  2. Then mount the optical cable holder and the fiber optic cable. It's tricky to find the best position for the holder with the cable for perfect and strong lightning (pictures 2-4). For testing you'll need to plug a sd card with installed Raspberry Pi OS in to get activity from the on board LEDs.
  3. Then screw the safe shutdown button switch in the back of there case (picture 5)
  4. Plug the safe shutdown connector first and then the display cable on the board (picture 6-7).
  5. Take the front and and Insert the fiber optical cable into the hole provided. Ideally, it should protrude slightly from the front for the best lighting effect (picture 8).
  6. Screw the front on the back.

Done.

Step 10: Tiny Mac III - Working Floppy Drive Concept ... to Be Developed

It would have been really nice if the floppy disk drive in the Tiny Mac III would work as well. But the board connector is too long to fit into the case. So I was looking for a solution to bend the connector to fit into the case. The pictures are showing my try to replace the flat ribbon cable with individual cables to get a shorter connector. I think my investigation of the connector layout and cabling was right. But unfortunately it never worked.

So if somebody has a working solution, it'll be really great sharing int with me ...

Step 11: Tiny Mac II & III Software Installation and Configuration

For the initial OS setup as well as creating the Mac OS environment, just follow the steps 6-11 and 13 from cgenco in his instructuble. It also makes sense to have a look at the descriptions from the waveshare-website, the display vendor, for driver installation and configuration.

I'll only describe the steps I've added for my version of the Tiny Macs:

  • Silent boot with RaspiApple-splash logo screen during startup and shutdown and splash picture re-copy
  • Theme and desktop configuration
  • Display nightshift function: the display will turn off and on at a specific time
  • Activity LED configuration for having it constantly on at power and keep it blinking at memory activity
  • safe shutdown configuration
  • TeleFrame installation and how to create a Telegram-bot
  • Alternative to TeleFrame: using xscreensaver as electronic photo frame and therefore how-to copy pictures to the Tiny Mac using Samba and Owlfiles
  • Adding gnome-weather as a weather forecast screen

Step 12: Tiny Mac II and III: Implementing TeleFrame and Bullseye Upgrade

TeleFrame from LukeSkywalker92 is a photo frame project originally developed for Raspberry Pi 2, 3 and 4 only. Per accident I've discovered that the method I've developed for installing TeleFrame on the Pi 4 works for the Pi Zero 2 as well although it was never meant to work on a Pi Zero 2. But yes, I works ;-)

The really nice thing is that a Telegram-Bot can be used to push pictures from everywhere to your TeleFrame client, means to your Tiny Mac III at home.

Luke's actual manual is not up to date, so it's not a no brainer to install it on the current Bullseye-based OS. I've been running into massive problems installing actual npm, node and electron-environments on Bullseye what brought me to the decision to start with the latest Buster-release and upgrade to Bullseye when TeleFrame has been installed successfully.

If you decide to go with TeleFrame, follow these instructions first and start with the desktop settings etc. when TeleFrame works fine and Buster has been upgraded to Bullseye.

TeleFrame Installation

But before you begin with the installation, you need a Telegram Bot.

Creating a Telegram Bot

If you don't use Telegram, download it to your smart phone and create an account.

Then go to the search bar and search for BotFather. The BotFather is the API that helps you to create a Bot. A bot is a generic Telegram user you can then send your pictures to. It can be identified from the Telegram client with the bot's token (the long and cryptic string on the bottom) provided during the creation process.

See picture 1 for "Peter Parker's" Bot-creation-dialogue with the BotFather.

Installing and updating Raspberry Pi OS Buster

All steps are equal for Tiny Mac II and III except the Bullseye upgrade, which should only be done with the Tiny Mac III. The upgrade is working with a Pi Zero 2 as well, but WLAN stops working after the upgrade and until today, I have no clue why. So if you go with the Tiny Mac II, go ahead with Buster.

Use the Raspberry Pi Imager to flash your SD card with Raspberry Pi OS Buster. Therefore you have to choose from the main menu

  • Choose OS
  • Raspberry Pi OS (other)
  • go down in the provided list to the first legacy Buster release and choose it

Flash your SD card with this image and install it on your Tiny Mac III.

After you've installed Buster, update it to the latest versions:

  • sudo apt update
  • sudo apt full-upgrade

Reboot the system.

npm, node and electron-installation

The TeleFrame installation procedure is using the packet manager npm,the cross-platform runtime environment for executing Javascript code outside of a browser Node and Electron, a framework for building desktop applications using JavaScript, HTML, and CSS. I don't know why, but it's not straight forward to install npm and Electron under Bullseye. I was always running into problems with version conflicts, unclear dependencies and errors so that I made the decision to go with Buster. Here's the installation path that worked fine - even with lots of warnings during the installation.

Follow this path in the Terminal:

  • Install npm: sudo apt install npm

Now npm and Node has been installed (picture 3).

  • Reboot: sudo reboot
  • Install Electron: npm install electron --save-dev

The installation should be successful despite the warnings. You may have to do the whole thing several times if you forget to reboot at the correct points. It is not a really stable thing anyway (picture 4-6).

  • Install TeleFrame: bash -c "$(curl -sL https://raw.githubusercontent.com/LukeSkywalker92/TeleFrame/master/tools/install_raspberry.sh)"

Right after submitting the automatic installation statement, you'll be asked 4 questions:

  • Do you want to disable the screen saver? The answer should be Y
  • Do you want your mouse pointer to be autohided?The answer should be Y
  • Do you want to use pm2 for auto starting of your TeleFrame? pm2 is a watchdog that will restart TeleFrame automatically every time you try to stop it. You'll not be able to start other applications like the Mini vMac on your Tiny Mac. Sot it'll be good idea to say N here to be free to stop and restart TeleFrame any time you want.
  • Please tell me your Telegram bot token. Token: Here you have to provide the token code the BotFather provided to you. I had it in a text file on an USB-stick and copy/pasted it ...

The installation should work then despite the warnings (picture 7-10).

Edit main.js config file

Then you have to add a statement to a TeleFrame config file for getting images displayed on the screen (thanks a lot, Tim, for that hint in your posting at the teleFrame issues discussion list #183). You can also use the main.js-file from the Tiny Mac Resources Repository with these changes already made:

  • cd TeleFrame
  • nano main.js

See picture 11 for the changes:

  • find the "Create the browser window"-section. It's about 42 lines below the top
  • add a comma at the end of the statement enableRemoteModule: true
  • add the statement contextIsolation: false

Save and exit.

Tiny Mac II only: correcting theme settings

During the TeleFrame installing process, a different boot theme has been installed. To set it back on default settings for using your own splash-screen at startup, you have to submit the following terminal command:

  • sudo plymouth-set-default-theme -R pix

Enhanced TeleFrame configuration

The default configuration file with values for e.g. the number of images to be used, fade time to the next image etc. is config.json in the config folder. It makes sense to change some values like the number of images etc. I've included my config.json file in the Tiny Mac Resources Repository with changes like 500 images to be used, image interval of 50 seconds (10 seconds originally). This config worked for me perfectly. Maybe you want to use it also.

If you use TeleFrame with a Tiny Mac II, you should set the "fadeTime"-value in config.json to 0 because a Pi Zero 2 is not able to fade the pictures smoothly as a Pi 4 - it looks better this way.

First start

Start your TeleFrame from the TeleFrame-folder (picture 12):

  • DISPLAY=:0 npm start

If everything went fine, you'll see after some seconds a white screen for a second and then a black TeleFrame-screen which will be replaced by your first photo posting.

First Telegram-to-TeleFrame post

Just go to your smart phone's Telegram search bar and search for your bot's name, in my example MyTinyMac3. You'll find the bot and you can then send pictures and videos to it. Just look at the TeleFrame GitHub-repository for more information.

Tiny Mac III only: Upgrading to Bullseye from Buster

You can keep Buster if you like, but I prefer having an actual OS on my Tiny Mac III. More details about the upgrade process can be found here.

The upgrade process from Buster to Bullseye is straight forward. Please keep in mind that no reboot should be done until the end of the process. Here's the step-by-step guide:

Check for updates and add kernel- and firmware-updates:

  • sudo apt update
  • sudo apt full-upgrade
  • sudo rpi-update

Then it is necessary to adjust the source list for Bullseye:

  • sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
  • sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/raspi.list

The next step is to update the necessary sources and installing gcc-8:

  • sudo apt update && sudo apt install libgcc-8-dev gcc-8-base

Now we have done all prerequisite for the upgrade:

  • sudo apt full-upgrade

This will take some time. The upgrade process will be interrupted from several installation processes which are requiring your attention and acknowledgment (see pictures 16-18).

After the upgrade, the last buster reboot has to be done (picture 19).

Bullseye - update config.txt display settings

After the reboot, Bullseye should appear with its unique cloudy background. But it's necessary to update the display statements according to the display you're using, 2.8 or 3.5 inch because they're different between Buster and Bullseye. Please take a look at the corresponding Waveshare websites.

WLAN-Settings

Bullseye is using Connman to handle the network settings which is different from Buster. You have to connect to the WLAN using a different approach then:

  • Menu / Preferences / Conman Settings --> connect manually to the network of your choice

Remove the panel network applet which is no longer working properly. To remove it, right click it and choose Remove "Wireless & Wired Network From Panel".

To add the one that works, right click the panel, choose Add / Remove Panel Items - > Add and add the Network Manager panel plugin.

Creating a TeleFrame Desktop Shortcut with a nice icon

It'd be not suitable to start an application with a shell command if you don't have a mouse and keyboard attached. Having a desktop icon may be nice a nice add-on then.

Therefore we have to create a short shell script in the TeleFrame folder called TeleFrame.sh - or use the one from my Tiny Mac Resources Repository:

  • cd TeleFrame
  • nano TeleFrame.sh

Add there following statements in the script:

  • cd TeleFrame
  • DISPLAY=:0 npm start

Save the file and close nano.

Then use the File Manager to change all file permissions from TeleFrame.sh to "Anyone".

To create a TeleFrame menu entry, start the "Main Menu Editor" from the Preferences menu. Choose a menu you like to have the TeleFrame in, e.g. the Accessories menu, and klick the New Item button. Find the TeleFrame.sh file in the its folder and give the the entry a name. As desktop icon you can use the icon I've created from my Tiny Mac Resources Repository. Don't use the "Launch in Terminal?"-option.

After clicking okay, you'd have a TeleFrame entry in the Accessories-menu. With a right click on the menu item, you can create a Desktop icon as well.

Done.

Step 13: Tiny Mac II & III: Desktop/Theme Settings

The desktop changes and GUI-based application installations should be done as long as the LCD-display drivers are not activated and you're using a big display. The xscreensaver configuration menus are too big for the small display. It makes it much easier that way.

If the desktop would be visible from time to time, I thought it should look nice. And I like the idea to give the Tiny Mac a personality in the network it's working in.

Theme changes using Rasperry Pi Configuration

Therefore I did the following changes:

  • rename the hostname to "TinyMacII" or "TinyMacIII"
  • change the background color to black and add the nice multicolor Apple-logo as a centered image
  • moved the task bar from top to bottom
  • and changed the start button picture to the TinyMac-logo
  • disable the "Screen Blanking"-option in the display section

File Manager

The File Manager-option for should be changed as well to let applications start without letting Raspberry Pi OS asking if the application is allowed to start:

  • Edit - Preferences --> activate the option "Don't ask options on launch executable files"

Changing start button picture

The start button pictures are located at /usr/share/icons/PiXflat/. There are multiple resolution sets of theme pictures.

Under PiXflat are 4 folders with each apps and places-folders with PNGs to be replaced:

  • 16x16, 24x24, 32x32 and 48x48
  • apps-folder, files: launch.png, rip.png
  • places, file: rip-logo.png

You can replace the pictures with the ones attached in this section (all resolutions are here), you have to change the folder and file permissions, here as an example for the 32 pixel picture:

  • sudo chmod 777 /usr/share/icons/PiXflat/32x32/apps
  • sudo chmod 777 /usr/share/icons/PiXflat/32x32/apps/rpi.png
  • sudo chmod 777 /usr/share/icons/PiXflat/32x32/apps/launch.png
  • sudo chmod 777 /usr/share/icons/PiXflat/32x32/places
  • sudo chmod 777 /usr/share/icons/PiXflat/32x32/places/rpi-logo.png

Therefore you can use the permission.sh script from the Tiny Mac Resources Repository. Copy the script to the home directory and change the permissions to "Anyone" using the File Manager. From the shell, you can execute the script with this command:

  • bash permissions.sh

Now for example the rip-logo.png-file can be replaced via drag/drop from an USB Stick. The 3 additional links in the places-folders distributor-logo.png, gnome-main-menu.png and start-here.png are linked to rip-logo.png and will be updated automatically.

Done.

Step 14: Tiny Mac II & III: Silent Boot, Splash Screen Configuration and Re-copy

Silent Boot

Silent boot means disabling the rainbow screen, the raspberries reflecting the number of cpu-cores etc. It's a feels-like-an-Apple-device-is-booting configuration.

Disabling the rainbow screen

config.txt needs to be updated:

  • sudo nano /boot/config.txt

Add below the statement disable_overscan=1 another statement:

  • disable_splash=1

Disabling other boot information

cmdline.txt needs to be updated:

  • sudo nano /boot/cmdline.txt

Add at the end of the 1-line statement the statement

  • logo.nologo

Changing the splash screen picture

To change the splash screen picture - per default a big white screen with Raspberry Pi-logo and version information shown at startup and shutdown - some folder and file permissions needs to be updated:

  • sudo chmod 777 /usr/share/plymouth/themes/pix
  • sudo chmod 777 /usr/share/plymouth/themes/pix/splash.png

Then you're able to overwrite the original splash.png with the RaspiApple-logo. The name has to be the same. Alternatively you can update the theme_image-statement from the pix.script config file in the same folder.

Re-copy the splash screen picture when updated from an OS update

It can happen that an OS update updates the splash.png as well. A cronjob helps to to bring back the new logo automatically. Basically we're changing the folder- and file-permissions for overwriting the existing splash.png with the ours from the Documents-folder.

You need an original splash.png e.g. in the Documents-folder. If you choose a different username than mac or folder than Documents, you need to change the statements accordingly.

Editing the cronjob-file and add a command

If you edit a cronjob for the first time, you'll be asked which editor you'd like to use.

  • crontab -e

Add the following lines to overwrite the current splash.png with the one on your Documents-folder. Don't forget to change the 3rd statement according to your home/user/folder-structure.

  • @reboot sudo chmod 777 /usr/share/plymouth/themes/pix
  • @reboot sudo chmod 777 /usr/share/plymouth/themes/pix/splash.png
  • @reboot cp /home/mac/Documents/splash.png /usr/share/plymouth/themes/pix/splash.png

After saving the crontab-file and quitting nano, you'll get the information, that the new crontab has been installed.

Now with the splash picture will be overwritten with out splash.png at every boot.

Done.

Step 15: TeleFrame-Alternative: Samba and Owlfiles for Xscreensaver-Picture Transfer From a SmartPhone

To transfer pictures from a Smartphone photo library, we need Samba on Tiny Mac-level and a transfer software like Owlfiles on the SmartPhone.

Installing and configuring Samba

First, install Samba:

  • sudo apt install samba samba-common-bin

Samba only supports folders on file system root-level. I name my picture folder for transfers ands xscreenserver usage "RasPictures":

  • sudo mkdir -m 1777 /RasPictures

Then add the folder and its permissions to the Samba configuration:

  • sudo nano /etc/samba/smb.conf

Add the following paragraph corresponding to the folder name you've chosen at the bottom:

[RasPictures]

comment=Pi Sambashare

path = /RasPictures

browsable=yes

writeable=yes

only guest=no

create mask=0777

directory mask=0777

public=yes

Reboot the system and install e.g. Owlfiles.

Owlfiles configuration

Owlfiles is a file transfer application for smartphones. I'm using it with my iPhone and it's very easy to transfer pictures from the smartphone's picture library to a folder on any 3rd party system like a Raspberry Pi.

Connection configuration

  • after installing Owlfiles on your smartphone, go to "More - Settings - Image", activate "Export HEIC as JPG" and deactivate the "Export Video in Live Photos" because GL Slideshow needs supported formats
  • then go back to the main menu and klick the lightning-button in the top right corner to open the Connection-configuration dialogue
  • choose "New Connection"
  • choose Linux as new connection type
  • then fill in the credentials of your Tiny Mac in the provided form - or if your Tiny Mac appears in the list of devices of your network neighborhood below the form, just choose it
  • your connection should be set up correctly now
  • now you can go to "My Files - Photo Library" and choose the photos you'd like to transfer to the Tiny Mac's RasPictures-folder provided

Done.

Step 16: Tiny Mac II & III: TeleFrame-alternative XScreensaver

If you want to use the Tiny Mac II as an electronic picture frame, the gl-slideshow from xscreensaver is a perfect match therefore. For Tiny Mac III, TeleFrame may be the more sophisticated solution (see section 12).

To installation it, type in the terminal the following statement:

  • sudo apt install xscreensaver xscreensaver-gl-extra

The xscreensaver-gl-extra-option extends the set of screensavers with gl-slideshow and many more gl-screensavers. After restarting the Tiny Mac, you can find the Screensaver-application in the Preferences-menu.

Start the application and configure it like this:

  • change the default mode from "Random Screen Saver" to "Only One Screen Saver" and choose the GL Slideshow option
  • in the Settings-menu
  • slide the "Time until loading a new image"-slider to the middle/more to the right to have a picture more than just some seconds on the screen
  • push pan/zoom duration and crossfade duration to 0 because these actions are not working as smooth as expected - but try it for yourself
  • open the Advanced-menu from the main menu to choose the folder from where xscreensaver takes its photos:
  • In the menu "Image Manipulation", choose "Choose Random Image"
  • Browse to the picture-location you've created after installing Samba at Step 14 - here /RasPictures

Change Picture Cache Refresh

xscreensaver is doing a picture cache-refresh per default every 3 hours only. Because I'd like to have new uploaded pictures at the time I've copied them to the Tiny Mac used as well, the cache refresh rate can be changed e.g. to 1 refresh per minute.This can be don easily by changing the xscreensaver config-file.

Change the file-permission:

  • sudo chmod 777 /usr/bin/xscreensaver-getimage-file

Edit the config-file:

  • sudo nano /usr/bin/xscreensaver-getimage-file

Goto row 73 which should look like this:

  • my $cache_max_age = 60 * 60 * 3; # 3 hours

... into this:

  • my $cache_max_age = 60; # 1 minute

... and save it.

The original configuration is 60 seconds * 60 minutes = 1 h *3 = 3h. It should be easy to define the cache refresh rate you prefer.

Done.

Step 17: Tiny Mac II & III: Gnome-Weather Installation

Gnome-Weather is a small and nice application, that can detect and use a place in the region you're located for the weather forecast. Another option is to choose a city on your own right after starting the application.

Installing gnome-weather is pretty easy:

  • sudo apt install gnome-weather

After the installation, you can find the app called "Weather" in the Accessories-menu.

Place a link on your desktop for easier access later on the small screen.

Done.

Step 18: Tiny Mac II & III: Nightshift Configuration

To make sure the display goes dark in the evening and light again in the morning, we need to add some more statements to crontab.

  • crontab -e

Add the following lines:

  • @reboot sudo chmod 777 /sys/class/backlight/rpi_backlight/bl_power
  • 0 20 * * * echo 1 > /sys/class/backlight/rpi_backlight/bl_power
  • 0 9 * * * echo 0 > /sys/class/backlight/rpi_backlight/bl_power

Statement #1 changes the permissions as needed.

Statement #2 turns the display's backlight off at 8pm / 20 o'clock in the evening.

Statement #3 turns the display's backlight on again at 9am / 9 o'clock in the morning.

You can choose the time frame you like the display to be active by only changing the values.

Done.

Step 19: Tiny Mac II & III: Activity LED Configuration

Tiny Mac II

The Pi Zero 2 has per default the correct LED configuration which is actpwr for the one and only LED it has. actpwr means Activity and Power, so the LED is constantly turned on (Power) and flickering when memory activity happens. So for the Tiny Mac II, there's nothing to do.

Tiny Mac III

the Raspberry Pi 4 has two LEDs, the green one which is ACT and the red one which is PWR. You can choose which one you like to use - or use both. The optical cable holder for the Pi 4 supports both LEDs. I've chosen the green one - LED0 - because it looks nicer.

There are much more settings than only actpwr you can choose from. Just have a look here for more information.

To configure the green LED to actpwr, we need another statement in the crontab:

  • crontab -e

Add the following line:

  • @reboot echo actpwr | sudo tee /sys/class/leds/ACT/trigger

Done.

Step 20: Tiny Mac II & III: Safe Shutdown Button Configuration

I'm using the Raspberry Pi pins 37 and 39 because they're not used by the Waveshare displays. Pin 37 is GPIO Port 26 which can be used as trigger for a safe shutdown.

Now we need another statement in the config.txt file to let the system initiate the shutdown when the button was pressed:

  • sudo nano /boot/config.txt

Add the following line in the [all]-section and safe the file:

  • dtoverlay=gpio-shutdown,gpio_pin=26

After rebooting the Pi, you can press the button, release it after a second and the system will shutdown safely.

Done.