rm-hull / luma.examples

Companion repo for running examples against the luma.oled, luma.lcd, luma.led_matrix and luma.emulator display drivers.
MIT License
380 stars 147 forks source link

[question] Framebuffer #86

Closed nagualcode closed 6 years ago

nagualcode commented 6 years ago

How can I run these examples on the raspberry frambuffer (HDMI output) ?

thijstriemstra commented 6 years ago

I don't think you can, but @rm-hull knows more about this. @nagualcode you can use the emulator option which uses pygame and output that on regular HDMI.

rm-hull commented 6 years ago

Yes, make sure pygame is installed and run the examples with -d pygame

rm-hull commented 6 years ago

Note you also need to pip install luma.emulator

nagualcode commented 6 years ago

I am controling a raspberry attached to a monitor via SSH. python anyexample -d pygame shows this on the therminal:

Version: luma.emulator 1.1.0 (luma.core 1.7.2) Display: pygame Dimensions: 128 x 64

and the monitor continues blank.. am I missing something?

thijstriemstra commented 6 years ago

@nagualcode I thought you wanted to run it using HDMI. Try running the sample without ssh.

nagualcode commented 6 years ago

Yep, the monitor is attached via HDMI. I dont have a USB keyboard... Only ssh access. Also, I dont have X server installed, do I need it?

Maybe I need to add this somewhere the pygame emulator code?

os.putenv('SDL_VIDEODRIVER', 'fbcon') pygame.display.init()