PokittoLib API Reference
Here is listed and explained all Pokitto specific functions, part of the PokittoLib (see Getting started to install it).
Pokitto namespace
Core class
Functions
| Name | Description |
|---|---|
| begin() | Initialize Pokitto. |
| isRunning() | Check run state. |
| update() | Update screen, buttons, sound. |
| getTime() | Get value of time elapsed in milliseconds. |
| getTime_us() | Get value of time elapsed in microseconds. |
| wait() | Wait for n milliseconds. |
| jumpToLoader() | Call the loader. |
Display class
Functions
| Name | Description |
|---|---|
| drawBitmap() | Draw bitmap to the screen. |
| drawPixel() | Draw pixel to the screen. |
| drawLine() | Draw line to the screen. |
| drawRectangle() | Draw a rectangle to the screen. |
| drawCircle() | Draw circle to the screen. |
| drawTriangle() | Draw triangle to the screen. |
| fillScreen() | Fill the screen with the specified color. |
| fillRectangle() | Fill a rectangle with the specified color. |
| fillCircle() | Fill a circle with the specified color. |
| fillTriangle() | Fill a triangle with the specified color. |
| clear() | Clear the screen. |
| setInvisibleColor() | Set invisible color. |
| setColor() | Set color. |
| getPixel() | Get pixel color. |
| getHeight() | Get screen height. |
| getWidth() | Get screen width. |
| load565Palette() | Load a 565 palette. |
| loadRGBPalette() | Load a RGB palette. |
| print() | Print something to the screen |
| println() | Print to the screen and move the cursor to a new line |
| printf() | Print formatted data to the screen |
Sound class
Functions
| Name | Description |
|---|---|
| playSFX() | Play sound from internal flash. |
| playMusicStream() | Play sound file from the SD card. |
| pauseMusicStream() | Pause sound file playback. |
| ampEnable() | Enable/disable audio amplifier. |
| ampIsoOn() | Enable/disable audio amplifier. |
| setVolume() | Set Volume. |
| getVolume() | Get Volume. |
Buttons class
Functions
| Name | Description |
|---|---|
| pressed() | Check if button pressed. |
| released() | Check if button released. |
| held() | Check if button held for ‘n’ frmaes. |
| repeat() | Returns true every ‘period’ frames when ‘button’ is held |
| timeHeld() | Get The number of frames during which the button has been held. |
| aBtn() | Check if Button A pressed. |
| bBtn() | Check if Button B pressed. |
| cBtn() | Check if Button C pressed. |
| upBtn() | Check if Button up pressed. |
| downBtn() | Check if Button down pressed. |
| rightBtn() | Check if Button right pressed. |
| leftBtn() | Check if Button left pressed. |
| aReleased() | Check if Button A released. |
| bReleased() | Check if Button B released. |
| cReleased() | Check if Button C released. |
| upReleased() | Check if Button up released. |
| downReleased() | Check if Button down released. |
| rightReleased() | Check if Button right released. |
| leftReleased() | Check if Button left released. |
| aHeld() | Check if Button A held for ‘n’ frames. |
| bHeld() | Check if Button B held for ‘n’ frames. |
| cHeld() | Check if Button C held for ‘n’ frames. |
| upHeld() | Check if Button up held for ‘n’ frames. |
| downHeld() | Check if Button down held for ‘n’ frames. |
| rightHeld() | Check if Button right held for ‘n’ frames. |
| leftHeld() | Check if Button left held for ‘n’ frames. |