Scripting the DirectFB

Uncategorized Comments Off on Scripting the DirectFB
Mar 162012

There is a new version of NodeZ2.  The biggest addition is a module for scripting the DirectFB within Node.js.  No browser required.  How cool is that!

It’s not very tested and there are holes in the implementation, but it’s still very functional.  Included are several example scripts that should get you going.  No cross compiler needed.

If you decide to flash it to the onboard memory beware, there is very little memory left in the jffs2 file system.  There is enough to store quite a bit of javascript, but if you opkg anything it should be directed to the overlayfs.

There is a problem with the keypad not working shortly after bootup.  Symptoms include not being able to use the alt key.  Until the problem is resolved you’ll need to work around it… suspend the ZipIt by pressing the power button, then wake it up by pressing power again.  This should get the keyboard working again.


To start one of the example scripts… cd to /root/node/dfb_examples and enter the following:

root@OpenWrt:~/node/dfb_examples# node df_window.js

Use the escape key to end the program.

Other new features include color syntax highlighting for javascript in nano.  You can add other syntax maps for bash or cpp files, but they’re not included by default.  I compiled nano to use the mouse too, but no luck.  Additional packages must be needed, I didn’t troubleshoot much.

The source for the new bindings is on github.

© 2016 engine12