Raspberry Pi 4 Android Control Console
2021-Nov-27, Saturday 03:30 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Previously on dreamwidth:chebe we played with setting up Android on a RaspberryPi 3. Which led us to ordering a RaspberryPi 4. Well friends, it arrived. I installed the LineageOS Raspberry Pi 4 port by KonstaKANG, and set up a few things, like the Play store. It worked beautifully. We're not talking lightning fast speeds, but. it. works. So now to make it usable.
First step is always a screen. I picked up one of these because Zack Freedman was using them, so I knew it would work, which removes a lot of slow trial and error. Zack then made a case for it. For different purposes, but close enough. You can take a closer look at the screen (and him designing the case) on one of his livestreams at these timestamps; 1 & 2.
I 3D printed the case in PLA, and even at 'fast print' settings the front part took about 4.5 hours, and the back part took about 11 hours. I do not have a speedy printer. This is also the largest-footprint print I've done so far.
Zack designed the case to fit M2.5 heat set inserts, but I was unable to find any of those on any of my local supplier sites, so I ordered M3s. And melted out bigger holes. It's not the prettiest, but I did get it all assembled!
I had to poke around a bit to get the right
I ended up using;
And
I tried using one of my cute little macro keypads, for the extra buttons (like volume), but they are circuit python powered and weren't recognised by Android as a keyboard. But I definitely needed a hardware power button for turning off the Pi. Good thing KonstaKANG shows how to set up a power button on a breadboard for this exact purpose.
Now I have a right jumble of wires and components, what to do? I scoured the internet looking for inspiration. Then found something pretty much in the form factor I was looking for. I ordered this kit, which is a collection of plastic beams you have to assemble together. I used the bottom two plastic stand-offs as a kind of shelf, and used strips of no-more-nails-tape to stick the screen case to the stand. I used the sticky pad already on the breadboard to stick it to the back of the stand. And I got a nice metal heat-sink case for the Pi. All that was left was to twist all the cables up under the stand, and put it to use!
And none too soon. The new version of my activity tracker arrived, and it immediately updated its firmware, twice. We know from my old tracker that my existing devices can no longer perform the firmware updates. It was serendipitous timing. All set up, sitting there, looking so much like a control console... I had to also install all the apps to control my various light sources, all from one convenient location! It really is working out great.
Okay, there are issues. The brightness controls within Android don't have any effect on the screen brightness. Even locked, showing a black screen, it glows. Knowingly. Which means it can't live in the bedroom. But otherwise I'm very pleased.
First step is always a screen. I picked up one of these because Zack Freedman was using them, so I knew it would work, which removes a lot of slow trial and error. Zack then made a case for it. For different purposes, but close enough. You can take a closer look at the screen (and him designing the case) on one of his livestreams at these timestamps; 1 & 2.
I 3D printed the case in PLA, and even at 'fast print' settings the front part took about 4.5 hours, and the back part took about 11 hours. I do not have a speedy printer. This is also the largest-footprint print I've done so far.
Back piece of case just finished printing
Photo by chebe
Back piece of case taking up much of the base plate
Photo by chebe
Zack designed the case to fit M2.5 heat set inserts, but I was unable to find any of those on any of my local supplier sites, so I ordered M3s. And melted out bigger holes. It's not the prettiest, but I did get it all assembled!
Heat-set inserts in the back piece corner holes
Photo by chebe
Case assembled
Photo by chebe
I had to poke around a bit to get the right
config.txt
settings./opt/vc/bin/tvservice -m DMT DMT has 1 mode; mode 4: 640x480 @60Hz 4:3, clock:25MHz progressive /opt/vc/bin/tvservice -m CEA CEA has 11 modes; mode 1: 640x480 @60Hz 4:3, clock:25MHz progressive mode 2: 720x480 @60Hz 4:3, clock:27MHz progressive mode 3: 720x480 @60Hz 16:9, clock:27MHz progressive mode 4: 1280x720 @60Hz 16:9, clock:74MHz progressive (prefer) mode 5: 1920x1080 @60Hz 16:9, clock:74MHz interlaced mode 16: 1280x720 @60Hz 16:9, clock:148MHz progressive (native) mode 17: 720x576 @50Hz 4:3, clock:27MHz progressive mode 18: 720x576 @50Hz 16:9, clock:27MHz progressive mode 19: 1280x720 @50Hz 16:9, clock:74MHz progressive mode 20: 1920x1080 @50Hz 16:9, clock:74MHz interlaced mode 21: 1920x1080 @50Hz 16:9, clock:148MHz progressive
I ended up using;
hdmi_group=1 hdmi_mode=4 disable_overscan=1
And
resolution.txt
left blank.
Lineage OS booting up on Raspberry Pi 4 with display in case
Photo by chebe
I tried using one of my cute little macro keypads, for the extra buttons (like volume), but they are circuit python powered and weren't recognised by Android as a keyboard. But I definitely needed a hardware power button for turning off the Pi. Good thing KonstaKANG shows how to set up a power button on a breadboard for this exact purpose.
Now I have a right jumble of wires and components, what to do? I scoured the internet looking for inspiration. Then found something pretty much in the form factor I was looking for. I ordered this kit, which is a collection of plastic beams you have to assemble together. I used the bottom two plastic stand-offs as a kind of shelf, and used strips of no-more-nails-tape to stick the screen case to the stand. I used the sticky pad already on the breadboard to stick it to the back of the stand. And I got a nice metal heat-sink case for the Pi. All that was left was to twist all the cables up under the stand, and put it to use!
Stand and all parts assembled
Photo by chebe
Stand, back view with power button visible
Photo by chebe
And none too soon. The new version of my activity tracker arrived, and it immediately updated its firmware, twice. We know from my old tracker that my existing devices can no longer perform the firmware updates. It was serendipitous timing. All set up, sitting there, looking so much like a control console... I had to also install all the apps to control my various light sources, all from one convenient location! It really is working out great.
Okay, there are issues. The brightness controls within Android don't have any effect on the screen brightness. Even locked, showing a black screen, it glows. Knowingly. Which means it can't live in the bedroom. But otherwise I'm very pleased.
My Android control console
Photo by chebe
no subject
Date: 2021-12-06 11:44 pm (UTC)https://konstakang.com/devices/rpi4/LineageOS18/
Image to sdcard
Delete contents of resolution.txt
Q: How to enable developer options?
A: Settings -> About tablet -> Click ‘Build number’ several times.
Q: How to enable advanced reboot options?
A: Settings -> System -> Gestures -> Power menu -> Advanced restart
Q: How to find several Raspberry Pi specific settings options?
A: Settings -> System -> Advanced settings
(reboot to take effect)
Q: How to create a DIY hardware power button?
A: You can send power button events by connecting GPIO21 to ground.
You can enable the feature by using a settings option found in Settings -> System -> Advanced settings -> Power button.
Q: How to enable audio through 3.5mm jack?
A: You can enable the feature by using a settings option found in Settings -> System -> Advanced settings -> Audio device.
Q: How to install Google apps?
A:
Download open_gapps-arm64-11.0-pico-xxxxxxxx.zip and save it to (your device’s internal storage or use) an external USB drive
Boot to TWRP recovery (see FAQ) (does not work with screen, attach another hdmi monitor)
Install open_gapps-arm64-11.0-pico-xxxxxxxx.zip from your selected storage
Wipe -> Factory reset!
Boot out of recovery (see FAQ)
Install
select storage
select zip
swipe to install
Wipe Dalvik
Reboot