46 lines
777 B
C++
46 lines
777 B
C++
/*
|
|
* Zeitschaltung_V6.cpp
|
|
*
|
|
* Created: 06.05.2014 23:18:58
|
|
* Author: netz
|
|
*/
|
|
#include "peripheral.h"
|
|
#include <util/delay.h>
|
|
//#include "comunication/funk.hpp"
|
|
|
|
/*typedef Funk<
|
|
rfm12class, //Rfm12 Funk Hardware
|
|
moveclass, //Bewegungsmelder
|
|
startclass, //Startknopf
|
|
servoclass, //Servo
|
|
ledclass //LED
|
|
> funkclass;
|
|
funkclass funk;*/
|
|
|
|
#include <stdio.h>
|
|
|
|
ledclass l;
|
|
uartclass text;
|
|
rfm12class r;
|
|
|
|
int main(void) {
|
|
r.beginasyncrx();
|
|
while(1)
|
|
{
|
|
while(r.hasdata()) {
|
|
l.on();
|
|
_delay_ms(100);
|
|
l.off();
|
|
_delay_ms(100);
|
|
text.send("\r\n");
|
|
}
|
|
uint8_t data = r.rxbyte();
|
|
char t[10];
|
|
sprintf(t, "%04X \r\n", data);
|
|
text.send(t);
|
|
}
|
|
}
|
|
|
|
/*ISR(TIMER0_OVF_vect) {
|
|
funk.timer();
|
|
}*/
|