Project

General

Profile

Revision 944

Added by Chris Mar about 11 years ago

added a test for lights/orbs.

View differences:

trunk/code/projects/test/main.c
8 8
  //testrangefinders();
9 9
  //testanalog();
10 10
  //testtokenring();
11
  testencoders();
11
  //testencoders();
12
  testlights();
12 13
  
13 14
	return 0;
14 15
}
trunk/code/projects/test/testlights.c
1
#include <dragonfly_lib.h>
2

  
3
int testlights(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
    orb_set_color(RED);
10
    delay_ms(1000);
11
    orb_set_color(ORANGE);
12
    delay_ms(1000);
13
    orb_set_color(YELLOW);
14
    delay_ms(1000);
15
    orb_set_color(GREEN);
16
    delay_ms(1000);
17
    orb_set_color(BLUE);
18
    delay_ms(1000);
19
    orb_set_color(PURPLE);
20
    delay_ms(1000);
21

  
22
    return 0;
23
}
24

  
25

  
trunk/code/projects/test/Makefile
14 14
USE_WIRELESS = 1
15 15

  
16 16
# com1 = serial port. Use lpt1 to connect to parallel port.
17
AVRDUDE_PORT = com4
17
AVRDUDE_PORT = /dev/ttyUSB0
18 18
#
19 19
#
20 20
###################################

Also available in: Unified diff