Project

General

Profile

Revision 1311

Added turntable control code. Currently uses PI control and is having lots of mechanical issues
Also added a main_brad which moves the turntable back and forth a bit
added a return to home value for the turntable

View differences:

main.c
160 160
        
161 161
	return 0;
162 162
}
163

  
164
int main_brad(void)
165
{
166
  dragonfly_init (ALL_ON);
167

  
168
  if (!button2_read ()) {
169

  
170
    usb_puts("running Brad's tests" NL);
171

  
172
    turntable_init();
173
    turntable_rotate_to_position(0);
174
    delay_ms(1000);
175
    usb_puts("actually got to:");
176
    usb_puti(turntable_get_position());
177
    usb_puts(NL);
178
    turntable_rotate_to_position(512);
179
    delay_ms(1000);
180
    usb_puts("actually got to:");
181
    usb_puti(turntable_get_position());
182
    usb_puts(NL);
183

  
184

  
185
  }
186
  else {
187

  
188
    //could put a call to default_main here
189
    turntable_init();
190
    interactive_main();
191

  
192

  
193
  }
194
	
195
  while (1);
196
  return 0;
197
}

Also available in: Unified diff