Flavien OpenCat code reviews
Hi fellow Bittle and Nybble owners ! Do you want to understand better the code of OpenCat to tinker with your robot friend ? 🐱❤️🐶 The flavien code reviews are here for you ! They contain both concrete tutorials to apply almost without knowing how to code (like change the IR remote buttons assignment) as well as code analysis for people who already know how to code and want to quickly start tinkering.
Here the links:
1) Main structure of the code 2) IR remote buttons assignment
3) Opencat.ino code explanation
4) ... Stay tuned for more post ! Have fun ! 😸
1031 Views



The Arduino source code uses many pointers and classes to improve efficiency and fit in the chip's limited storage. Some algorithms were written when I was preparing for the interview with Google. The tricks to combine complex cases into one-line conditions can take hours to explain. in Variables that may also correlate with many files and the circuit. Even I will make mistakes when modifying the source code. So it takes a lot of work to explain the code. It can be a thick book.
To make it easier for people interested in Arduino programming, there's also a simpler interface that only requires an understanding of the application layer. It's the taskQueue method. It uses the same serial command rules in an altered format and can run directly within the Arduino source code. You can refer to the extensible modules, and check how the robot can read sensor data and react within the scope of a single file. For example, you can activate the macro of DOUBLE_TOUCH, and the code defining all its behaviors is in src/doubleTouch.h.