added skeleton for eindopdracht
This commit is contained in:
@@ -5,14 +5,40 @@
|
||||
* Author : Sem
|
||||
*/
|
||||
|
||||
#include <avr/io.h>
|
||||
#define F_CPU 10e6
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "lcd_control.h"
|
||||
#include "ultrasonic_sensor.h"
|
||||
|
||||
|
||||
ISR(INT0_vect)
|
||||
{
|
||||
ultrasonic_handle_interrupt();
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* Replace with your application code */
|
||||
ultrasonic_init();
|
||||
init_4bits_mode();
|
||||
|
||||
_delay_ms(10);
|
||||
|
||||
lcd_clear();
|
||||
while (1)
|
||||
{
|
||||
// TODO change to use the stepper motor
|
||||
ultrasonic_send_pulse();
|
||||
|
||||
lcd_clear();
|
||||
lcd_write_int(ultrasonic_get_timer_dist());
|
||||
|
||||
|
||||
wait_ms(100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user