Monday, December 28, 2020

Show HN: Raspberry Pi 400 with a $2 IPS 240x240 micro display

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

IPS 240x240

Dependencies

Requires a couple of python libs:

$ pip3 install pyscreenshot
$ sudo apt install python3-xlib

Testing

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

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:

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:

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

and add the following lines

@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)



from Hacker News https://ift.tt/3o0oLMj

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.