Project

General

Profile

Revision 1286

Implemented ibom_update() function. Found the analog ports for the IR
LED detectors, and found the pin for the IR LED emitter.

View differences:

trunk/code/projects/diagnostic_station/station/hardware_ibom.c
28 28

  
29 29
void ibom_update (void)
30 30
{
31
	// FIXME implement
31
	delay_ms(IBOM_ANALOG_CYCLE_TIME);
32 32
}
trunk/code/projects/diagnostic_station/station/hardware_ibom.h
8 8
 * Inverse BOM sensor macros for left, right, and top positions.
9 9
 */
10 10
// FIXME do it right
11
#define IBOM_SENSOR_LEFT AN3
11
#define IBOM_SENSOR_LEFT AN6
12 12
#define IBOM_SENSOR_RIGHT AN4
13 13
#define IBOM_SENSOR_TOP AN5
14 14
//#define IBOM_SENSOR_ AN6
15 15

  
16
#define IBOM_EMITTER_PIN PIN_A5
16
#define IBOM_EMITTER_PIN _PIN_F3	/* Connected to A5 on the board */
17 17

  
18
/* Delay in milliseconds for lookup table to update all entries */
19
#define IBOM_ANALOG_CYCLE_TIME 10	/* Measured time was 2.4 ms */
20

  
18 21
void ibom_init (void);
19 22

  
20 23
void ibom_set (bool on);
trunk/code/projects/diagnostic_station/station/README
14 14
	This is implemented to allow the development of several different
15 15
	main functions simultaneously.
16 16

  
17
NOTES:
18

  
19
-	The total time to complete one cycle through the analog look-up
20
	table was measured to be 2.4 milliseconds
trunk/code/projects/diagnostic_station/station/main.c
80 80
	comm_robot_init ();
81 81
	orb2_set (255, 0, 0); usb_puts("# Done" NL);
82 82

  
83
	interactive_main ();
83
	while (1) {
84 84

  
85
	while (1);
85
			ibom_set(true);
86
			delay_ms(500);
87
			ibom_set(false);
88
			delay_ms(500);
89
	}
86 90
	return 0;
87 91
}
88 92

  

Also available in: Unified diff