X11-Basic

From OpenTom

Jump to: navigation, search
X11-Basic
a basic interpreter which supports graphics.
Properties
Developer: Markus Hoffmann
Version: 1.15  (12.01.2008)
Architecture: linux, arm-linux
Language: {{{language}}}
Comment:
Dependencies
Requires: TTconsole
See also: Software

The Basic Interpreter (TomTom port)

(You need to install TTconsole before, recommended: Version 1.08 or later). The documentation and manual can be found on the X11-Basic homepage. Many example programs are availabe and most of them already work out of the box. Give me feedback on your experience since I am still working on the TomTom Port of X11-Basic.


Contents

Install

Unpack the binary package (zip file) and move the contents to your tomtom Directory (e.g. /media/INTERNAL) just as they are. Thats it. It is not necessary to rebuild the systems kernel. You do not need opentomlinux! You can use the device with navigation software as before. Al though you should user X11-basic via the console, An Icon appears in the setting menu. This starts X11-Basic with an example (basic)-program. Currently it is the sun and moon calendar. Since TTconsole is also running, you can display and use the keyboard, by tapping in the right upper corner of the screen.

Compile

This is only for people who like to improve the BASIC interpreter itself. If you just want to write BASIC programs, you can skip this section. Get the offical source code package from sourceforge. Then unpack it un the host computer (must be linux). Run the configure script once and then never again. You will have to modify the Makefile (replace all gcc with arm-linux-gcc, maybe adapt the path to your cross-compiler development environment.) modify options.h: Uncomment:

#define NOGRAPHICS

Maybe you also want to uncomment

#  undef HAVE_READLINE

if you have problems with it.

If you also want to use the framebuffer graphics, you will have to compile framebuffer.c manually (use -DFRAMEBUFFER). Compile the rest with -DFRAMEBUFFER. Link it together manually. Sorry, I do not have a makefile for the TomTom port yet. Be patient. It is still under heavy development. If you want to support this development, you can help me with sending information about:

  • algorithms to draw lines with linewidth>1 on raster displays.
  • algorithms for drawing such lines with a line pattern.
  • Algorithms which draw elliptical arcs. (and fileld arcs)
  • Algrithms for drawing graphical elements with fill pattern.
  • Algorithms for the use of different graphic modes (transparent, inverse etc. ) on 16 bit bitmaps.

known bugs

  • Following commands do not work (have no effect):
    • DEFFILL, DEFLINE
    • RBOX, PRBOX
    • GRAPHMODE

Useful Basic programs for the TomTom

A screenshot of X11-Basic running a Media-Player Fileselector.
A screenshot of X11-Basic running the Sun & Moon calculation.
  • A Media-Player with a nice touchscreen graphics user interface together with madplay (and probably mplayer).
  • A Sun and Moon calendar. done, sonnenaufgang.bas, see picture The Sunset, Sunrise, Moonset, Moonrise, Transits, Moonphases, disdances and positions on the sky are calculated based on the actual GPS time and position which we get from the ttn application via file interface. This could, in future, be extended to calculate and show the rise and set times, as well as the exact positions on the sky of all planets, comets etc. The picture view could also be enlaged to have a more detailed view including stars. Then, the TomTom becomes a valuable tool for (hobby)-astronomers who want to exactly position their telescopes to the objects of interest. This is the only other killer application of a TomTomdevice other that the car navigation I can imagine.
  • An ov2 file reader and creator.
  • tracklog a simple position and altitude track logger
  • Add your project here

Ideas for useful applications

Following ideas can be realized with X11-Basic:

    • A Media-Player with a nice touchscreen graphics user interface together with madplay (and probably mplayer).
    • A picture viewer. Very simple for .bmp pictures, but to support other graphics formats, one need to compile the convert tool of ImageMagic....
    • A gps-Track-Logger. The data is collected in a file and can later be shown with tools like GPS-Earth.
    • Some graphical representation of gps data, as altitude, compass etc.. (like the Offroad-Navigator, which does not run on the TomTom ONE V3).
    • A WEB interface (via bloutooth and cgi-scripts) using a webserver.
    • A dynamic Waypoint integration (A 2nd person with a 2nd gps-device moves and the first person can see a moving waypoint on the screen.) This could be realized together with a GSM-USB device (in case the TomTom is not itself a phone).
    • PDA applications. (Calendar with appointment dates etc...)
    • An alarm-clock. (well, the internal battery does not last long enough, but...)

see also: TTconsole

Personal tools