first commit

This commit is contained in:
Jérôme Delacotte
2025-03-06 11:15:32 +01:00
commit 7b30d6e298
5276 changed files with 2108927 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include <avr/interrupt.h>
#include <TinyUartReader.h>
#include <TinySleep.h>
#include <TinyTimer1Compare.h>
#include <TinyPinChangeB.h>
// continuously read from PB2 (pin 7) at 9600 baud using Timer1 in compare mode
int main() {
sei();
uartReader.on(PB2, 9600, Timer1Compare, PinChangeB);
while (1) {
if (uartReader.inputAvailable()) {
uint8_t value = uartReader.read();
// do something with the value
}
idleSleep();
}
return 0;
}