38 lines
609 B
C++
Executable file
38 lines
609 B
C++
Executable file
#ifndef _BOARD_H_
|
|
#define _BOARD_H_
|
|
|
|
#include <avr/io.h>
|
|
#include <avr/interrupt.h>
|
|
#include <stdlib.h>
|
|
#include "uart.h"
|
|
|
|
//#define abs(a) ((a < 0)? -a : a)
|
|
|
|
#define BEEPER_PIN PG2
|
|
|
|
// Definiere PWM-Ports für die Motoren/Dribbler
|
|
#define MOTOR0_PWM OCR3A
|
|
#define MOTOR1_PWM OCR3B
|
|
#define MOTOR2_PWM OCR1A
|
|
#define DRIBBLER_PWM OCR1C
|
|
|
|
#define UART_BAUD_RATE 9600
|
|
|
|
class Board
|
|
{
|
|
private:
|
|
public:
|
|
Board();
|
|
~Board();
|
|
|
|
int GetADC(uint8_t channel);
|
|
void beep(int freq);
|
|
void ledOn();
|
|
void ledOff();
|
|
void led(bool status);
|
|
void motor(int i, int speed);
|
|
};
|
|
|
|
#endif
|
|
|
|
|