Subversion Repositories group.electronics

Rev

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

Rev 48 Rev 49
Line 1... Line 1...
1
#include <avr/io.h>
1
#include <avr/io.h>
2
#include <avr/pgmspace.h>
2
#include <avr/pgmspace.h>
3
#include <avr/interrupt.h>
3
#include <avr/interrupt.h>
4
#include <avr/wdt.h>
4
#include <avr/wdt.h>
5
 
5
 
6
#include "macros.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>
10
#include <string.h>
11
 
11
 
Line 108... Line 108...
108
	if (oldsystime != systime) {
108
	if (oldsystime != systime) {
109
		oldsystime = systime;
109
		oldsystime = systime;
110
		char syschar[6];
110
		char syschar[6];
111
		itoa(systime, syschar, 10);
111
		itoa(systime, syschar, 10);
112
		syschar[5] = 0x00;
112
		syschar[5] = 0x00;
113
		lcd_setCursor(6,1);
-
 
114
		lcd_print(syschar);
113
		lcd_overprint(syschar, 5, 6, 1);
115
 
114
 
116
		char pot[4];
-
 
117
		itoa(analogRead(0), pot, 10);
115
		uint8_t potVal = map_8(analogRead(0), 0, 255, 0, 100);
118
		//pot[3] = 0x00;
116
		lcd_pergraph(potVal, 0, 0);
119
		//lcd_setCursor(0,0);
117
		//char pot[4];
120
		//lcd_print(pot);
118
		//itoa(analogRead(0), pot, 10);
121
		lcd_overprint(pot, 4, 0, 0);
119
		//ilcd_overprint(pot, 4, 0, 0);
122
 
-
 
123
		lcd_setCursor(9, 0);
-
 
124
		lcd_char(0x00);
-
 
125
	}
120
	}
126
  }
121
  }
127
}
122
}
128
 
123
 
129
uint8_t analogRead(uint8_t pin) {
124
uint8_t analogRead(uint8_t pin) {