My a-code program (See here) is currently run on my PC and communicates via a serial cable to Peter Penguin. I’d like to make him more self-contained, and was wondering if I could convert the FreeBASIC code to something that could run on a BotBoard.
Is there any way I could estimate the requirements or if it would fit onto a BotBoard? Are there alternatives to this approach? The current FreeBASIC source code is 30kb, but contains lots of comments and some code/features which I would remove, making it less than the 32kb of program space if I understand the specifications correctly.
It’s been a while since I’ve worked on this and this idea seems to be a way to continue development. There are other challenges I will face (such as the possibility of interfacing with external storage and a wav playback device), but I was starting here.
Thinking more about this, and I can split my program into two parts - the first part can still run on my PC and “compile” the a-code into an array of integer tokens that could be written to EEPROM. Then, I would only need to convert the second half of the program from FreeBASIC into the Basic required for the Botboard to actually control the animatronic.
It is hard for me to say how the sizes will compare. I don’t know if the 30K you mention includes the comments and the like or only the tokens that are generated from it. Likewise if it includes any support stuff…
The Basic Micro stuff compiles the stuff into a set of tokens and the like, which does not include any of the comments, but that 32K size also has to include the support code (interpreter and the like). The size of the interpreter depends in part on which parts of their system you include. HServo, Hserial… brings in additional code.
Also sometimes more important than the code size is the data size. On a PC you have lots of memory. On a Bap28 you have 2K, with some of that being used up by other things as well…
I figure that my data is about 1.5k - so less than the 2k limit. But it will be tight!
If my compiled code is 30k and I separate it into two programs (15k apiece), hopefully that will allow room for the Basic Micro interpreter. My code is basically just integer and string manipulation. The only ‘complex’ libraries I see are for serial communications. I feel right now that some version of the a-code can fit into a Botboard.