Commit b43d78cf authored by Lisa Marie Dreier's avatar Lisa Marie Dreier
Browse files

Merge?!

parents 88d4fce7 9403ad41
......@@ -185,6 +185,7 @@ bool motor_on (uint16_t input_adc){
return false;
}
void test_thread(cyg_addrword_t arg) {
test_init();
bool button_state = false;
......@@ -228,47 +229,6 @@ void test_thread(cyg_addrword_t arg) {
}
}
/*
while (1) {
uint16_t input_adc = read_adc_naiive(11);
ezs_printf("ADC: %5d ", input_adc);
if (input_adc < 500 || input_adc > 3500) {
ezs_printf("Speed: %3d\n", 0);
dc_set(0, 0);
}
else {
uint8_t speed = input_adc / 4096.0 * 125;
ezs_printf("Speed: %3d\n", speed);
dc_set(DC_LEFT, speed);
}
}
*/
/*int i = 0;
while (!BSP_PB_GetState(BUTTON_KEY)) {
for (i = 0; i < 255; i += 5) {
ezs_printf("Iteration up: %d\n", i);
dc_set(DC_RIGHT, i);
ezs_printf("Button state: %d\n", button_get());
servo_set(SERVO_0, button_get()*255);
cyg_thread_delay(250);
uint16_t input_adc = read_adc_naiive(11);
ezs_printf("adc: %d\n", input_adc);
}
for (i = 255; i > 0; i -= 5) {
ezs_printf("Iteration down: %d\n", i);
dc_set(DC_RIGHT, i);
ezs_printf("Button state: %d\n", button_get());
servo_set(SERVO_0, button_get()*255);
cyg_thread_delay(250);
uint16_t input_adc = read_adc_naiive(11);
ezs_printf("adc: %d\n", input_adc);
}
}*/
}
void cyg_user_start(void) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment