//empfaenger

#define F_CPU 1000000
#include <avr/io.h>
#include <util/delay.h>
#include "rfm69.c"


int main(void) {
	char array[MAX_ARRAYSIZE+1];
	uint8_t rx_length, tx_length;
	uint8_t i=0;
	
	rx_length=4;
	tx_length=4;
	rfm_init();
	DDRC=1;

	PORTC=1;
	_delay_ms(100);
	PORTC=0;
	
	while(42) {
		
		if(rfm_receiving()) {
			rfm_receive(array, &rx_length);
			for(i=0;i<5;i++)
			{
				if(array[i]=='T')
				{
					PORTC=1;
				}
			}

			
		}
	}
	return 0;
}