Hi,
I have the following setup:
-Pololu 3pi robot
-Atmel Studio 7
-Duracell Alkaline AAA batteries dated December 2023
I am trying to:
I am still trying to get an idea of how to run the motors, so I am modifying the βBlink PD1β code.
But the problem is:
I turn the robot on, the motor twitches a little, then the whole ROBOT shuts off.
And here is my code (if it even matters):
[code]#define F_CPU 20000000 // AVR clock frequency in Hz, used by util/delay.h #include <avr/io.h> #include <util/delay.h>
int main() {
DDRD |= (1<<DDD5); // set LED pin PD1 to output
while (1) {
PORTD |= (1<<PORTD5); // drive PD1 high
_delay_ms(250); // delay 100 ms
PORTD &= ~(1<<PORTD5); // drive PD1 low
_delay_ms(10000); // delay 900 ms
}
}[/code]
Thank you for the help!
I solved it. I send the program the instant I turn it on, before it turns off. Other users, follow these steps:
Put your finger on the power button.
2.Compile a new program and put the cursor on the send button -OR- put your cursor on the βerase chipβ button. The program must be tiny. These MAY NOT BE THE EXACT NAMES FOR THE BUTTONS.
3.Click erase or send and press the power button SIMULTANEOUSLY.
It now turns off a few seconds after I turn it on. Is my 3pi damaged or are my batteries dead. I do not have battery monitor code yet. I do have a multimeter, though.
Thank you! I do not have fresh batteries at the moment, so I will test with my multimeter. One question: Why does this even happen with low batteries and why isnβt it mentioned on the website?
THANK YOU!!!
My batteries must be dead.
I wanted to use rechargeables, but for no reason at all, they are BANNED from my house.
We had 10 aaas, but 9 of them got used for a label maker and a flashlight.
I had to use the new one and 3 old ones from my brothers old abandoned headlamp.
As soon as i get new batteries, I will be having SOOOO MUCH FUN when my 3pi works.