This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Notice: 8 Mhz frequency is expected | |
#define SONIC_DDR DDRC | |
#define SONIC_PORT PORTC | |
#define SONIC_PIN PINC | |
#define SONIC_TRG_PIN PINC0 | |
#define SONIC_ECHO_PIN PINC1 | |
#include <avr/io.h> | |
#include <util/delay.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A basic example of queue written in C | |
// Useful for small microcontrollers | |
// Tags: Arduino | Atmega | AVR | STM32 | |
#include <stdio.h> | |
#include <stdint.h> | |
// Maximum number of items in queue | |
#define QUEUE_MAX 5 |