Beispiel #1
0
int main()
{
	OrangutanBuzzer::play(">>a16");
	delay(500); // warming up

	lcd.initPrintf();

	lcd.print("Assert");
	assert(1 == 1); // make sure assert works

	test_qtr();
	test_analog();
	test_pushbuttons();
	test_buzzer();
	test_motors();
	test_lcd();
	test_leds();
	test_delay();

	lcd.clear();
	lcd.print("Success");
	
	buzzer.play("O5 c16");

	return 0;
}
int umain(void){
    while(1){
        printf("Press Go to start the Test\n\n")
        pause(100);
        if (start_test("Motor Test"))
            test_motors();
    }
}
Beispiel #3
0
int main()
{
    // If button A is pressed, test the PD0/PD1 outputs
	if(button_is_pressed(BUTTON_A))
		test_outputs();

	// If button C is not pressed down, go to the demo.
	if(!button_is_pressed(BUTTON_C) && !test_pushbutton_tries())
		demo();

	// Load bar graph characters.
	// Together with space and the solid block at 255, this makes almost
	// all possible bar heights, with two to spare.
	unsigned char i;
	for(i=0;i<6;i++)
	{
		lcd_load_custom_character(bars+i,i);
	}
	clear();

	pololu_3pi_init(TEST_LINE_SENSOR_TIMEOUT);

	if(test_pushbutton_tries())
		goto pushbuttons;

	play_from_program_space(welcome_test);
	print_two_lines_delay_1s_test(welcome_test_line1,welcome_test_line2);
	print_two_lines_delay_1s_test(test_name_line1,test_name_line2);

	clear();

 	test_battery();
	test_qtr();
	test_motors();
	test_pot();
pushbuttons:
	test_pushbuttons();

	clear();
	print("Success");
	play("O5 c16");
	
	while(1);
}
Beispiel #4
0
int main()
{
	delay_ms(500); // warming up

	lcd_init_printf();

	printf("\nAssert");
	assert(1 == 1); // make sure assert works

	test_qtr();
	test_pushbuttons();
	test_buzzer();
	test_motors();
	test_lcd();
	test_leds();
	test_analog();
	test_delay();

	clear();
	printf("\nSuccess");
	play("O5 c16");
	
	while(1);
}