Skip to content

igbit/micro-displays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

micro-displays

Micro Displays for Raspberry Pi

Why?

I'm super bored in lockdown. Add a Raspberry Pi 400 and a few tiny displays...

The top half of the micro display shows the full screen and the bottom half is a zoom centered around the mouse cursor.

ISP 240x240

Example of code editing using this set up :-)

ISP 240x240

Version with zoom around the mouse area only:

ISP 240x240

IPS 240x240

Important Note: A question came up in HN about being able to control multiple tiny displays. I'm pasting my reply here as well as this may influence the type of display you want to buy for similar projects. You should be able to control multiple SPI devices at the same time but that requires the CSX/CS ("Chip Select") pin to be present. The 240x240 displays I bought don't seem to have this feature (though someone found a non-trivial hack to enable them: https://www.instructables.com/Adding-CS-Pin-to-13-LCD/)

Dependencies

Requires a couple of python libs (see also below section Additional Raspberry Pi Settings as SPI must be enabled):

$ pip3 install pyscreenshot
$ sudo apt install python3-xlib

Testing

Full screen + zoom:

pi@raspberrypi:~ $ git clone https://github.com/igbit/micro-displays.git
Cloning into 'micro-displays'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 37 (delta 16), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (37/37), done.
pi@raspberrypi:~ $ cd micro-displays/
pi@raspberrypi:~/micro-displays $ python3 main240x240.py

Zoom around the mouse region only:

pi@raspberrypi:~ $ git clone https://github.com/igbit/micro-displays.git
Cloning into 'micro-displays'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 37 (delta 16), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (37/37), done.
pi@raspberrypi:~ $ cd micro-displays/
pi@raspberrypi:~/micro-displays $ python3 main240x240mousezoom.py

Using without a monitor

When a monitor is not connected you must force the Raspberry Pi to output HDMI.

In /boot/config.txt make sure the following lines are uncommented (sudo vi /boot/config.txt and edit):

max_framebuffers=2
hdmi_force_hotplug:0=1
hdmi_group:0=1
hdmi_mode:0=16 

See also https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=243886#p1488488

Start up on reboot

To enable at session startup on reboot (you may need mkdir /home/pi/.config/lxsession and mkdir /home/pi/.config/lxsession/LXDE-pi before the below cp):

pi@raspberrypi:~ $ cp /etc/xdg/lxsession/LXDE-pi/autostart /home/pi/.config/lxsession/LXDE-pi/

and add the following lines to /home/pi/.config/lxsession/LXDE-pi/autostart

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@python3 /home/pi/micro-displays/main240x240.py 2>&1 >> /home/pi/micro-displays/stdout.log & 

(you probably only need to add the last one)

Replace main240x240.py with main240x240mousezoom.py if you're only after a zoom around the mouse region.

IPS 80x160

Note: This display has a CS pin so you should be able to control more than one simultaneously.

ISP 80x160

Additional Display Info

See Important Note about this display in above section IPS 240x240

ISP 240x240 ISP 240x240

Discussion in HackerNews

https://news.ycombinator.com/item?id=25566132

Connections

I will add a diagram once I have more time.

ISP 240x240 ISP 240x240

Additional Raspberry Pi Settings

Enable SPI

RpiConfig RpiSpi

Keyboard

Someone asked for a keyboard. This one looks cool...

$ sudo apt install matchbox-keyboard

... accessible through the Accessories menu:

RpiKeyboard

Raspberry Pi ZeroW

It works... but as you can imagine it's very slow...

RpiZero

About

Micro Displays for Raspberry Pi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages