Just asking a quick question about implementing some python AI. I have a home built circuit running an ATmega32u2 chip and I was wondering if it’s possible to use this code on the chip? Or do I have to code that in C?
For that microcontroller yes, you need to program in C++. But likely it's not powerful enough to do what you want to do. You should consider using a Raspberry Pi, or doing the higher-level computations on a desktop or laptop and communicating decisions about motor control etc to the atmega over serial.