Closed guysoft closed 10 years ago
It is probably due to that the buffer is used by X. Does it work if you start it from a console, without running X?
Ah, I think I know why its not working, just took a look at the code.
I am using a pi-display, and their docs show export FRAMEBUFFER=/dev/fb0
And in your code I see: os.putenv('SDL_FBDEV' , '/dev/fb1')
I will try changing that and starting it once I get the time. If this is the case scanning for fb devices might be a good idea.
Ah, they use a different framebuffer then Adafruit does. Yes, scanning for framebuffer would be the way to do it :)
Ok, i managed to start OctoPiPanel, but I get a blank screen. I had to set the env variables like this:
os.putenv('SDL_FBDEV' , '/dev/fb0')
os.putenv('SDL_MOUSEDEV' , '/dev/input/mice')
However all I get now is a blank screen I am using a pi-display
That is odd. BUt looking at the pi-display docs that you link to above it seems that the correct framebuffer actually is /dev/fb1, and /dev/fb0 is the HDMI output. Perhaps chaning the os.putenv('SDL_VIDEODRIVER', 'fbcon')
to os.putenv('SDL_VIDEODRIVER', 'fbcp')
might help. BUt on the other hand, here is how you use Adafruits PiCamera app on your display, https://github.com/notro/fbtft-spindle/wiki/FBTFT-image#adafruit-camera-app and I use the same screen init code as Adafruit.
Also perhaps you need to do a touch screen calibration; https://github.com/notro/fbtft-spindle/wiki/FBTFT-image#touchpanel-calibration
Or you can just comment out the pygame.mouse.set_visible(False)
and see what happends...
Or perhaps the backlight is turned off: https://github.com/watterott/RPi-Display#the-display-stays-black
Does the screen show anything if you exits OctoPiPanel using Ctrl + C
?
The backlight is not off, there is a small visible small white cursor at the top of the screen.
The screen goes black when i run OctoPiPanel.py, and goes back to the console when I do Ctrl + C
I will try and get a photo here. @awatterott Any chance you know of the differences?
@guysoft You dont need fbcp. Pygame can directly write via SDL to the framebuffer. The only thing that is different between our RPi-Display and the Adafruit PiTFT is the touch controller and backlight control.
SDL_VIDEODRIVER = fbcon SDL_FBDEV = /dev/fb1
That's what I figured as well since the Adafruit PiCamera Python script seems to be working for @awatterott RPi display.
Success! The screen is visible, the mouse is not responding.
@awatterott
I am getting selected device is not a touchscreen I understand
After pointing the mouse device to /dev/input/mouse0
If I do cat /dev/input/mouse0
tapping on the screen produces output.
Note: This has to be run without X, with the shell visible, and with fb1.
@guysoft The input device is /dev/input/touchscreen
.
@guysoft @awatterott
this device /dev/input/touchscreen does not exist on my setup (2014-06-20-wheezy-octopi-0.9.0 with builtin version of your driver) what do i have to load or do, to get this inputdevice
getting mouse curser to go by setting /dev/input/eventX get the right event nr by watching cat /proc/bus/input/devices
then you have to calibrate the touchscreen sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/eventX ts_calibrate
@guysoft i think it would work with your api version this way on mine just the system commands are working....
@LowVideo /dev/input/touchscreen
is a symlink to the right event
device. Would be good to have this also on OctoPi...
https://github.com/notro/fbtft-spindle/blob/master/fbtft-stage2#L112
Pushed it to the rpi-display branch, I need to build and test it: https://github.com/guysoft/OctoPi/commit/286ad2237023f38cd101750dd29651d657344ee2
Tested, that commit solves the problem, however the screen needs to be calibrated first (not sure how to integrate that yet)
Awsome! I'm closing this now.
When starting OctoPiPanel from X using fbcp I get this error:
I can start an lxterminal with no problem using that shell, so its not an X server setting problem.