Reference

Here is listed and explained all Gamebuino specific functions, part of the Gamebuino Library (see Getting started to install it).

See Arduino Reference for general purpose/basic functions and data types.

Note: Arguments in italic are optional.

Core

User interface :

Physics:

Perfomance monitor :

Buttons

buttons:

BTN_A, BTN_B, BTN_C, BTN_UP, BTN_RIGHT, BTN_DOWN, BTN_LEFT

Sound

  • Sound : overall explanation of how the sound library works

Tracks

  • gb.sound.playTrack(track, channel)
  • gb.sound.stopTrack(channel)
  • gb.sound.changePatternSet(patternSet, channel)

Pattern

  • gb.sound.playPattern(sound, channel)
  • gb.sound.stopPattern(channel)
  • gb.sound.setPatternLooping(boolean, channel)
  • gb.sound.isPlaying(channel)

Notes & commands

  • gb.sound.playNote(pitch, duration, channel)
  • gb.sound.command(command, X, Y, channel)
  • gb.sound.changeInstrumentSet(instrumentSet, channel)

Build-in sounds

  • gb.sound.playOK()
  • gb.sound.playCancel()
  • gb.sound.playTick()

Misc

  • gb.sound.setVolume(volume, channel)
  • gb.sound.getVolume(channel)
  • gb.sound.setInstruments(instruments, channel)
  • gb.sound.prescaler

Battery

Backlight

  • gb.backlight.set(brightness)
  • gb.backlight.automatic = true/false
  • gb.backlight.backlightValue
  • gb.backlight.ambientLight

The following should be set using SETTINGS.HEX

  • gb.backlight.backlightMin = 0 to 255
  • gb.backlight.backlightMax = 0 to 255
  • gb.backlight.ambientLightMin = 0 to 1024
  • gb.backlight.ambientLightMax = 0 to 1024

Display

Useful constants: LCDWIDTH, LCDHEIGHT, gb.display.fontWidth, gb.display.fontHeight

General :

Pixels :

Lines :

Rectangles :

Circles :

Triangles :

Bitmaps :

  • rotation: NOROT, ROTCCW, ROT180, ROTCW
  • flip: NOFLIP, FLIPH, FLIPV, FLIPVH

Text :

Advanced :