Hi I’m new to programming the 3pi and taking a class for doing so.
The teacher is forcing us to use Assembler
So i was wondering where I could find some assembler code examples.
One thing I’m trying to do is set PWM mode to slow the robot down.
Also one of the motors on the motors seems to run faster than the other, so I’m having a hard
time making the robot go in straight line. SO I’m assuming I need to set the motors to
different speeds by using the PWM. Or is there a better way??
I’m not sure if this will help much, but every project you make in AVR Studio has a .LSS file in the other files section after you compile the program. This is the assembly for that program. Also you might check out the AVR assembler guide. I’ve never programmed the AVR in assembly myself, so someone else might have more advice for you.
You are right about the motors. Motors have unit-to-unit variation, which needs to be compensated for in software; varying the PWM is a good way to do that.
Thanks for the response and for pointing me to the assembler doc, that will be very helpful.