Elinus
January 20, 2014, 4:48pm
1
Hi,
I have been using my 3pi for a couple of months.
I recently added the m3pi board as a base for more sensors and have added a sharp distance sensor to this.
I have been able to program the 3pi since the upgrade and have been testing various programs to see results from the distance sensor and all has been going well.
I have just tried to program the robot again for another test and although it seemed to program OK it turned off as soon as it was programmed.
now when I try to turn it back on again it just beeps (for as log as i hold my finger on the button, up to 1 second) and the blue lights flash very rapidly and the wheels turn very slowly.
I have tried different batteries but it doesn’t make a difference. The ones I had in when I programmed it were not brand new but still had loads of charge still in them.
What can I do to “reset” my 3pi???
please help !
Elinus
January 20, 2014, 5:04pm
2
I have managed to erase the memory by using the Erase Now button on the Amtel Studio Programming dialog box.
so now, when i turn it on the blue lights come on, and nothing else happens.
This allows me to read the device signature and the voltage (4.7)
Also If I click on Fuses, Lock Bits and Board Settings all of the status entries come back as OK.
If I verify the memory (Don’t know if this should work or not as it’s been erased) I get the following error
Timestamp: 2014-01-20 16:57:14.948
Severity: ERROR
ComponentId: 20000
StatusCode: 0
Verifying Flash...Failed! address=0x0000 expected=0x0c actual=0xff
If I try to re program the 3pi, It goes back to how it was before (beeping and flashing lights)
I have changed the program back to something simple
/* distance_test - an application for the Pololu 3pi Robot
*
* This application uses the Pololu AVR C/C++ Library. For help, see:
* -User's guide: https://www.pololu.com/docs/0J20
* -Command reference: https://www.pololu.com/docs/0J18
*
* Created: 1/19/2014 3:57:47 PM
* Author: Dave
*/
#include <pololu/3pi.h>
int main()
{
play_from_program_space(PSTR(">g32>>c32")); // Play welcoming notes.
while(1)
{
// Print distance on the LCD.
int proximity = analog_read(7);
int bat = read_battery_millivolts();
clear();
print_long(proximity);
lcd_goto_xy(0,1);
print_long(bat);
print("mV");
}
}
and it builds OK
Build started.
Project "distance_test.cproj" (default targets):
Target "PreBuildEvent" skipped, due to false condition; ('$(PreBuildEvent)'!='') was evaluated as (''!='').
Target "CoreBuild" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.1\Vs\Compiler.targets" from project "E:\Family\Documents\Atmel Studio\6.1\distance_test\distance_test\distance_test.cproj" (target "Build" depends on it):
Task "RunCompilerTask"
C:\Program Files (x86)\Atmel\Atmel Studio 6.1\shellUtils\make.exe all
Building file: .././main.c
Invoking: AVR/GNU C Compiler : 3.4.2
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-gcc.exe" -funsigned-char -funsigned-bitfields -Os -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=atmega328p -c -std=gnu99 -MD -MP -MF "main.d" -MT"main.d" -MT"main.o" -o "main.o" ".././main.c"
Finished building: .././main.c
Building target: distance_test.elf
Invoking: AVR/GNU Linker : 3.4.2
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-gcc.exe" -o distance_test.elf main.o -Wl,-Map="distance_test.map" -Wl,--start-group -Wl,-lpololu_atmega328p -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=atmega328p -lpololu_atmega328p
Finished building target: distance_test.elf
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature "distance_test.elf" "distance_test.hex"
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "distance_test.elf" "distance_test.eep" || exit 0
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objdump.exe" -h -S "distance_test.elf" > "distance_test.lss"
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O srec -R .eeprom -R .fuse -R .lock -R .signature "distance_test.elf" "distance_test.srec"
"C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.2.1002\avr8-gnu-toolchain\bin\avr-size.exe" "distance_test.elf"
text data bss dec hex filename
3794 48 29 3871 f1f distance_test.elf
Done executing task "RunCompilerTask".
Task "RunOutputFileVerifyTask"
Program Memory Usage : 3842 bytes 11.7 % Full
Data Memory Usage : 77 bytes 3.8 % Full
Done executing task "RunOutputFileVerifyTask".
Done building target "CoreBuild" in project "distance_test.cproj".
Target "PostBuildEvent" skipped, due to false condition; ('$(PostBuildEvent)' != '') was evaluated as ('' != '').
Target "Build" in file "C:\Program Files (x86)\Atmel\Atmel Studio 6.1\Vs\Avr.common.targets" from project "E:\Family\Documents\Atmel Studio\6.1\distance_test\distance_test\distance_test.cproj" (entry point):
Done building target "Build" in project "distance_test.cproj".
Done building project "distance_test.cproj".
Build succeeded.
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Elinus
January 20, 2014, 8:56pm
3
took it all apart, put it all back together again…works.
Must have been a short or something somewhere, who knows.
Hello.
I am glad you were able to get it working. Thank you for letting us know.
-Brandon