Subversion Repositories group.electronics

Rev

Rev 52 | Rev 55 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 52 Rev 53
Line 5... Line 5...
5
 
5
 
6
#include "petelib.h"
6
#include "petelib.h"
7
#include <util/delay.h>
7
#include <util/delay.h>
8
 
8
 
9
#include <stdlib.h>
9
#include <stdlib.h>
10
#include <string.h>
-
 
11
 
10
 
12
#include "wire.h"
11
#include "wire.h"
13
#include "lcd.h"
12
#include "lcd.h"
14
 
13
 
15
 
14
 
Line 107... Line 106...
107
	if (oldsystime != systime) {
106
	if (oldsystime != systime) {
108
		oldsystime = systime;
107
		oldsystime = systime;
109
		char syschar[6];
108
		char syschar[6];
110
		itoa(systime, syschar, 10);
109
		itoa(systime, syschar, 10);
111
		syschar[5] = 0x00;
110
		syschar[5] = 0x00;
-
 
111
		lcd_setCursor(10, 1);
112
		lcd_overprint(syschar, 5, 6, 1);
112
		lcd_print_right(syschar);
113
 
113
 
114
 
114
 
115
		uint8_t potVal = map_8(analogRead(0), 0, 255, 0, 100);
115
		uint8_t potVal = map_8(analogRead(0), 0, 255, 0, 100);
116
		if (potVal != oldpotVal) {		
116
		if (potVal != oldpotVal) {		
117
			lcd_percent_graph(potVal, 0, 0);
117
			lcd_percent_graph(potVal, 0, 0);
118
			oldpotVal = potVal;
118
			oldpotVal = potVal;
119
			char pot[3];
119
			char pot[3];
120
			itoa(potVal, pot, 10);
120
			itoa(potVal, pot, 10);
-
 
121
			lcd_setCursor(14, 0);
-
 
122
			lcd_print_right(pot);
121
			lcd_overprint(pot, 3, 12, 0);
123
			lcd_setCursor(15, 0);
122
			lcd_char(0x25);
124
			lcd_char(0x25);
123
		}
125
		}
124
	}
126
	}
125
  }
127
  }
126
}
128
}