View Single Post
Old 02-16-2012, 12:33 PM   #1
KevinShort
Addict
KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.KevinShort can program the VCR without an owner's manual.
 
KevinShort's Avatar
 
Posts: 342
Karma: 165069
Join Date: Jan 2012
Location: Virginia, US
Device: Kobo Wifi, Kobo Glo
Python/Pygame successfully running on Kobo Touch

I recently managed to get python and the pygame module working on my Kobo Touch.
So I whipped up a couple of quick examples, and I put them, along with python and
pygame, in a KoboRoot.tgz file. Here's a download link.

Install it by extracting the zip file and copying the KoboRoot.tgz file to the .kobo
folder on your Touch. Now telnet into your Touch and run:
Code:
ln -s /mnt/onboard/.python/bin/python /usr/bin/python
To start the examples, just do:
Code:
python menu.py
Pressing the Kobo's home button when running an example will take you back
to the example menu. In pong, the power switch will flash the screen.

As would be expected, pygame has a couple of problems on the Kobo.
  • Sometimes pygame will hang when trying to start its display. When this happens,
    pressing CTRL+C seems to snap it back into action.
  • The refresh rate of the e-ink is pretty bad. I know it can do better, the web browser
    can display black-and-white animated GIFs quite well in partial-refresh mode.

You'll most likely want to stop the Kobo's graphical application, Nickel, before you
start the pygame examples. You can do so with:
Code:
killall nickel
Please note that when you want nickel to start running again, you'll have to press
the small reset button on the back of the Touch, or run the command:
Code:
reboot
How it was done
I compiled python and pygame on a virtual debian arm machine,
and I then copied python and the necessary lib*.so files to my Kobo. Quite easy.
Here are the tutorials I followed to setup a virtual debian arm machine.
Attached Thumbnails
Click image for larger version

Name:	menu.JPG
Views:	961
Size:	73.2 KB
ID:	82619   Click image for larger version

Name:	input.JPG
Views:	853
Size:	78.8 KB
ID:	82620   Click image for larger version

Name:	pong.JPG
Views:	757
Size:	71.7 KB
ID:	82621  

Last edited by KevinShort; 03-19-2012 at 05:34 PM.
KevinShort is offline   Reply With Quote