Project

General

Profile

Revision 383

IT WORKS! i cleared portb. oops.....

View differences:

main.c
126 126
int main(void)
127 127
{
128 128
	setup();
129

  
129
	//sei();
130 130
	i2c_init();
131
	setup();
131
	//setup();
132 132

  
133 133
	OCR1B=0;
134 134
	
135
	sei();
135

  
136 136
	
137
	delay_ms(3000);
138
	cli();
139
	while(1){
140
		PORTB|=_BV(LED2);
141
		PORTB|=_BV(LED1);
142
		delay_ms(500);
137 143
	
138
	PORTB|=_BV(LED2);
139
	PORTB|=_BV(LED1);
140
	delay_ms(500);
141
	PORTB&=~_BV(LED2);
142
	PORTB&=~_BV(LED1);
143
	
144
	i2c_putpacket(0x01,"a ", 2);
144
		i2c_putpacket(0x01,"hello.", 6);
145 145

  
146
	delay_ms(500);
147
	PORTB|=_BV(LED2);
148
	PORTB|=_BV(LED1);
149

  
150
while(1);
146
		delay_ms(500);
147
		/*PORTB&=~_BV(LED2);
148
		PORTB&=~_BV(LED1);*/
149
	}
151 150
	
152 151
	return 1;
153 152
}

Also available in: Unified diff