Project

General

Profile

Revision 338

Copying Kevin's analog code over from the analog branch.

View differences:

bom.c
113 113
	int a, i, j, h;
114 114
    h = 255;
115 115

  
116
	//Turn off the loop so that we can actually use analog8 correctly
117
	analog_stop_loop();
118

  
119
	//Iterate through through each LED
116 120
    for (j = 0; j < 16; j++)
117 121
    {
118 122
      i = lookup[j];
......
137 141
      else
138 142
        output_low(MONK0);
139 143

  
140
      a = analog8(MONKI);
144
      a = analog_get8(MONKI);
141 145
              
142 146
      if (a < h)
143 147
      {
......
146 150
      }
147 151

  
148 152
    }
153
	
154
	//Restart loop now that we are done using analog8
155
	analog_start_loop();
149 156

  
150 157
	//threshold on the bom analog value.
151 158
	//defined in bom.h

Also available in: Unified diff