3.5" LCD for Pi is $15 at banggood right now

FYI, those '3.5" LCD cases' that recently became popular are on sale, $15, at banggood.

I think the screen (but perhaps not the touch part) will work with the built-in drivers. I'm going to pick one up because I keep thinking there's a way to make a small-screen "dashboard" on an octoprinted Pi.

2 Likes

Let me know how that turns out. If you get into any troubles with touchscreen orientation let me know since I've been there.

Thanks. I have an adafruit one on my desk, the real thing is trying to figure out some sort of panel/dashboard layout. I dislike frontend stuff and having to calculate pixel layouts is no fun.

I can recommend Kivy. It doesn't require the PIXEL version of Raspian but you do need to make sure that the touchscreen is properly oriented without the X11 configuration stuff.

1 Like

great. Part of the problem has been the inability to locally develop/iterate, that should help.

Kivy crash course
Docs
Examples
Discord
Donate

I develop in Visual Studio code here on my MacBook and I've added a macro to run a script called syncit (a = standalone, b = plugin) which is in my path:

#!/bin/bash

if [ $# -lt 2 ]
then
	echo "Usage: syncit push [a]|[b]"
        echo ""
        echo "  1st arg: push or pull"
        echo "  2nd arg: folder under ~/foo to act upon"
	echo ""
	exit 1
fi

if [ "$1" = "push" ]
then
	if [ "$2" = "a" ]
	then
		echo "Pushing/syncing ~/foo/$2 to octopi.local:~/$2 with hidden folders ..."
		rsync -avz ~/foo/$2/ pi@octopi.local:~/$2
		echo ""
		exit 0
	fi
	if [ "$2" = "b" ]
	then
		echo "Pushing/syncing ~/foo/OctoPrint-Bar to octopi.local:~/OctoPrint-Bar with hidden folders ..."
		rsync -avz ~/foo/OctoPrint-Bar/ pi@octopi.local:~/OctoPrint-Bar
		echo ""
		exit 0
	fi
	echo "Folder $2 is not supported at this time, aborting."
	echo ""
	exit 3
fi

echo "Verb $1 is not supported at this time, aborting."
exit 2

During the standaone app's existence, this was combined with a python-watch script on the Raspi.

#!/bin/sh

killall python
python /home/pi/foo/__init__.py &

#while inotifywait -e modify -r /home/pi/foo; do     # recursive version
while inotifywait -e modify /home/pi/foo; do
    command=`ps -x -ocommand |grep python | grep -v grep | grep -v python-watch`
    echo "$command"
    killall python
    python /home/pi/foo/__init__.py &
done

So, running python-watch in the ~/foo folder would bring up the interface and reload whenever changes are pushed into this folder. Note that you should run under the virtual environment of OctoPrint and to not install/compile the Kivy application itself. Install with pip.

1 Like