/* test streaming sample data * bluetooth * TJR 141011 want: 1 second 16M / 1024 prescale = */ #include #include #include //include #include #include #include "uart.h" //#include "HardwareSerial.h" #define SAMPLES 512 #ifndef F_CPU #define F_CPU 16000000UL #endif #define UART_BAUD_RATE 57600 //unsigned char dd[SAMPLES]; // ram buffer int enabled=0; int loopCount=0; int sample=0; int main(void) { Serial.begin(57600); //uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) ); DDRB |= (1 << 5); // port B bit 6 = arduino pin 13 PORTB = (1 << 5); //turn on to start TCCR1B |= (1 << WGM12); // Configure timer 1 for CTC mode TIMSK1 |= (1 << OCIE1A); // Enable CTC interrupt OCR1A = 1562; // Set CTC compare value to 1Hz at 1MHz AVR clock, with a prescaler of 64 sei(); // Enable global interrupts TCCR1B |= ((1<