[add] opdracht 4.1

This commit is contained in:
stijn
2021-03-10 09:15:31 +01:00
parent f31018f8f1
commit ab4bf87190
7 changed files with 1237 additions and 159 deletions

View File

@@ -5,6 +5,7 @@
* Author: Sem
*/
#include <stdio.h>
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
@@ -80,6 +81,13 @@ void init_4bits_mode(void) {
lcd_strobe_lcd_e();
}
void lcd_write_integer(int number){
int length = snprintf(NULL, 0, "%d", number + 1);
char str[length + 1];
snprintf(str, length + 1, "%d", number);
lcd_write_string(str);
}
void lcd_write_character(unsigned char byte){