Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / diagnostic_station / station / hardware_ibom.h @ 1294

History | View | Annotate | Download (738 Bytes)

1 1254 deffi
#ifndef _hardware_ibom_h
2
#define _hardware_ibom_h
3
4
#include <dragonfly_lib.h>
5
#include "global.h"
6
7
/*
8 1294 deffi
 * Inverse BOM sensor macros for left, right, and top positions. "Left" and "right" is as seen from the station, looking
9
 * towards the robot.
10 1254 deffi
 */
11 1286 jsexton
#define IBOM_SENSOR_LEFT AN6
12 1256 deffi
#define IBOM_SENSOR_RIGHT AN4
13
#define IBOM_SENSOR_TOP AN5
14 1254 deffi
15 1286 jsexton
#define IBOM_EMITTER_PIN _PIN_F3        /* Connected to A5 on the board */
16 1280 jsexton
17 1286 jsexton
/* Delay in milliseconds for lookup table to update all entries */
18
#define IBOM_ANALOG_CYCLE_TIME 10        /* Measured time was 2.4 ms */
19
20 1254 deffi
void ibom_init (void);
21
22
void ibom_set (bool on);
23
void ibom_read (uint16_t *top, uint16_t *left, uint16_t *right);
24
void ibom_update (void);
25
void ibom_debug (void);
26
27
#endif