Initial commit

This commit is contained in:
2020-10-26 13:47:13 +13:00
parent 2ee81db7fe
commit c96c080177
8 changed files with 840 additions and 0 deletions

29
src/main.cpp Normal file
View File

@@ -0,0 +1,29 @@
/*
* Blink.cpp
*
* Created: 18/12/2018 5:11:34 PM
* Author : jimmy
*/
#define F_CPU 8000000
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "TM1637Display.h"
int main(void) {
*(&PORTA-1) |= (1<<PA0);
const int CLK = PC1; //Set the display CLK pin PC1
const int DIO = PC0; //Set the display DIO pin PC0
TM1637Display display(CLK, DIO, &PORTC); //set up the 4-Digit Display.
int count = 0;
// 7-Seg Setup
display.setBrightness(255); //display to high brightness
while(1){
display.showNumberDec(count++);
PORTA ^= (1<<PA0);
_delay_ms(1000);
}
}