Project

General

Profile

Revision 958

Added by Chris Mar over 11 years ago

added test for motors. it just runs the left and right. this can be improved.

View differences:

trunk/code/projects/test/testmotors.c
1
#include <dragonfly_lib.h>
2

  
3
int testmotors(void) {
4
    dragonfly_init(ALL_ON); // orbs will work if you only init ORBS
5
    //usb_init();
6
    usb_puts("usb turned on\n");
7
    delay_ms(1000);
8

  
9
    motor1_set(1, 220);
10
    motor2_set(1, 220);
11
    delay_ms(1000);
12

  
13
    return 0;
14
}
15

  
16

  
trunk/code/projects/test/main.c
2 2
extern int testrangefinders();
3 3
extern int testanalog();
4 4
extern int testtokenring();
5
extern int testmotors();
5 6

  
6 7
int main(void) {
7 8
  //testlcd();
......
9 10
  //testanalog();
10 11
  //testtokenring();
11 12
  //testencoders();
12
  testlights();
13
  //testlights();
14
  testmotors();
13 15
  
14 16
	return 0;
15 17
}
trunk/code/projects/test/Makefile
8 8
endif
9 9

  
10 10
# Target file name (without extension).
11
TARGET = template
11
TARGET = main
12 12

  
13 13
# Uncomment this to use the wireless library
14 14
USE_WIRELESS = 1

Also available in: Unified diff