Pokitto API Assitance

I will apologize in advance for some of the questions I will ask … I have programmed on the Arduboy and are finding the transition to the Pokitto a little harder than expected possibly due to my own lack of understanding and possibly due to a lack of good documentation with the API itself.

  • Is there a way to detect what frame number I am on? On the Arduboy, there is a method called everyXFrames(x) that allowed you to test this?

  • When using FemtoIDE, can I tell how big a program is - including progmem and statically allocated RAM?

  • When using FemtoIDE, can I print to the stdout and view it in any way?


Try this:


That should be Pokitto::Core::frameCount.

Everything in Core is static so the scope resolution operator (::) is needed,
the ‘member of object’ operator (.) is only useful if you’ve created an instance of Pokitto::Core.
(Which is allowed and shouldn’t incur any extra cost, but it’s completely superfluous and can complicate things more than necessary.)

To match what everyXFrames(x) does you’d have to use the expression:
((Pokitto::Core::frameCount % x) == 0),
or define your own function for it (using that expression).

I can’t answer either of your other questions because I know practically nothing about FemtoIDE,
but if you want to print things on the Pokitto then Display has all the print functions.

(FemtoIDE is @FManga’s domain.)


You can probably dig that info from the map file. You need to tweak compiler settings to make it to create a map file, this worked in the java project: ("-Wl,-Map=${projectPath}/${projectName}.map").

The size of the generated “.bin” file tells the whole rom image size.

This seems to do the trick:

This feature is in progress. If you want to have a sneak peak, under the log there’s an input bar where you can type nm(), press enter, and you should see a list of the top 20 things taking up flash and statically allocated RAM.

To see the size of the bin file, you can simply click on it in the file list.

Regular printf works, just remember to add a \n in the end.


Yep … I forgot the \n !

Thanks all for your comments - I guarantee that I will have more questions.