#include #define F_CPU 8000000UL // 8 MHz #include #include "messen.h" int main(void) { uint16_t Mittelwert = 0; DDRD = DDRD|(1< 0) PORTC |= _BV(PC3); else PORTC &= ~_BV(PC3); if (Mittelwert > 26) PORTD |= _BV(PD0); else PORTD &= ~_BV(PD0); if (Mittelwert > 52) PORTD |= _BV(PD1); else PORTD &= ~_BV(PD1); if (Mittelwert > 77) PORTD |= _BV(PD2); else PORTD &= ~_BV(PD2); if (Mittelwert > 103) PORTD |= _BV(PD3); else PORTD &= ~_BV(PD3); if (Mittelwert > 128) PORTD |= _BV(PD4); else PORTD &= ~_BV(PD4); if (Mittelwert > 154) PORTD |= _BV(PD5); else PORTD &= ~_BV(PD5); if (Mittelwert > 800) PORTD |= _BV(PD6); else PORTD &= ~_BV(PD6); if (Mittelwert > 900) PORTD |= _BV(PD7); else PORTD &= ~_BV(PD7); if (Mittelwert > 1000) PORTB |= _BV(PB0); else PORTB &= ~_BV(PB0); } return(0); }