Project

General

Profile

Revision 1af81271

ID1af812718bd7dbac416e202883d48e6c66dd0171
Parent 351481ed
Child c874b753

Added by Julian Binder about 11 years ago

added code to read metal detector on PD4

View differences:

paintboard/code/main.c
19 19
#define PAINT_12V_2             7 // r/w
20 20
#define PAINT_12V_3             8 // r/w
21 21
#define PAINT_12V_4             9 // r/w
22
#define PAINT_INPUT_1           10 //ro
23
#define PAINT_INPUT_2           11 //ro
24
#define PAINT_INPUT_3           12 //ro
22 25

  
23
#define PAINT_DATA_LEN         10
26

  
27
#define PAINT_DATA_LEN         13
28

  
29
#define METAL_DETECT           PD4
24 30

  
25 31
uint8_t internal_index = 0;
26 32
uint8_t internal_data[PAINT_DATA_LEN] = {
......
94 100
  motor_init();
95 101
  while (1)
96 102
  {
97
    /* TODO geiger counter and metal detector */
103
    internal_data[PAINT_INPUT_1] = !(!(_BV(METAL_DETECT) & PIND));
104
    /* TODO geiger counter */
98 105
  }
99 106
  return 0;
100 107
}

Also available in: Unified diff