Sunday, June 29, 2008

Transperent Programming


The Mignon 2.0 is making the programming process transperent by a nice little sound. Sending the data up to the Game Kit sounds like a fax mashine. If you want to work in silence, there's a solder jumper, which you may disconnect.

Saturday, June 28, 2008

Gamekit Library Reference

void Begin();
Installs and starts the Gamekit library.

void set_pixel(row, colum, velue);
Places a “pixel” (illuminated LED) on the display in row 0 to 4 and column 0 to 6.
The last value is assigning a brightness from 0 to 15 to this dot. Higher values causes the dot to blink in different ways.

uint8_t get_pixel(row, column);
Reads the brightness/blink value of a pixel in row 0 to 4 and column 0 to 6.

void load_image(name);
Loads a “image” named “name” on to the display, which must be defined before. Have a look into the “load_image” example to find out, how to deal with that.

void load_map( (uint8_t *) name, pictureColumns, pictureRows, columnOffset, rowsOffset);
Loads a cutting of a bigger picture named “name” onto the display. With pictureColumns and pictureRows the size of the whol picture must be initialized. Use the last two values to move the visible part of the picture, with columnOffset und rowsOffset. (See also „load_map“ example)

void assign_pixelfunction(uint8_t, uint8_t(*)(uint8_t, uint8_t, uint32_t));
Advanced programmers can write there own pixel function and assign it to a value, which must be bigger then 15.

uint32_t get_systemcounter();
Reads the system counter, which is increased by one, when the display is redrawn.

uint8_t get_buttons();
Reads all buttons at once.

boolean button_pressed(button);
Chrecks if a key “button” is pressed.
The constants for the buttons:
butt_UP, butt_DOWN, butt_LEFT, butt_right, butt_FUNCA, butt_FUNCB

void wait_button_pressed(button);
Wait untill the key “button” is pressed.

void wait_button_released(button);
Wait untill the key “button” is released.

void set_button_timing(first, common);
If a button is pressed and hold down it can trigger more the one event. The interval time of this very useful automatic function can be set with this function. The fist value set the timing for the start of the interval and the second vale sets the timing of the interval. “See also “button” example.)

void play_tone(frequenz, duration, volume);
Plays a sound in the ton hight of “frequenz” over a time of “duration” in milliseconds. The volume can be set with the two constants “LOUD” and “SILENT”.

void play_melody(name);
Play the melodie named “name”. How to initialize a melodie is explaned in the „play_melody“ example.

uint16_t get_current_melody_event();
Checks what the “play_melody” function is currently playing.

void set_current_melody_event(nummer);
Jump inside the melody to melody event “number”.

-----------------------------------------------------------------------------------------
german:

Befehlskurzübersicht der Gamekit Library

void Begin();
Initialisiert und startet die Gamekit Library, die zuvor mit “#include ” importiert wurde.

void set_pixel(Reihe, Splate, Wert);
Setzt einen “Pixel” in Form einer leuchtenden Diode auf das Display. Dabei kann die Position mit den beiden Werten „Reihe“ von 0 – 4 und „Splate“ 0- 6 bestimmt werden. Der dritte Wert „Wert“ steht für die Helligkeit zwischen 0 und 15. Höherer Werte lassen den Pixel blinken o.ä. .

uint8_t get_pixel(Reihe, Spalte);
Liest den Helligkeits-/Blink-Wert des Pixels in der „Reihe“ und der “Spalte”.

void load_image(Bild);
Läd das Bild „Bild“ auf das Display (siehe Beispiel „load_image“).

void load_map(uint8_t *, uint8_t, uint8_t, uint8_t, uint8_t);
Läd einen Ausschnitt eines großen Bildes auf das Display (siehe Beispiel „load_map“)

void assign_pixelfunction(uint8_t, uint8_t(*)(uint8_t, uint8_t, uint32_t));
Fortgeschrittene Programmierer können mit dieser Funktion einem Pixelwert (muss größer 15 sein) eine selbstgeschrieben Funktion zuweisen.

uint32_t get_systemcounter();
Liest den Systemzähler. Der Systemzähler wird bei jedem Displayneuzeichnen um eins erhöht.

uint8_t get_buttons();
Liest alle Tasten auf einmal.

boolean button_pressed(BUTTON);
Überprüft ob die Taste „BUTTON“ gedrückt ist.
Die Konstanten sind:
butt_UP (Hoch)
butt_DOWN (Runter)
butt_LEFT (Links)
butt_right (Rechts)
butt_FUNCA (Funktion A)
butt_FUNCB (Funktion B)

void wait_button_pressed(BUTTON);
Wartet solange bis die Taste „ BUTTON “ gedrückt ist.

void wait_button_released(BUTTON);
Wartet solange bis die Taste „ BUTTON “ nicht gedrückt ist.

void set_button_timing(Erster, Folgende);
Ändert die Wiederholgeschwindigkeiten der Taste (siehe Beispiel „button“)

void play_tone(Frequenz, Dauer, LAUTSTÄRKE);
Spielt einen Ton der Tonhöhe „Frequenz“ über die Zeit von „Dauer“ (in Millisekunden) ab.
Lautstärke kann „LOUD“ für laut und „SILENT“ für leise sein.

www.mignongamekit.org

.

Thursday, June 12, 2008

Second Test Hard Ware


optimized and cleaned up the new Layou!