#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "../roomba/roomba.h"
#include "../rtos/os.h"
#include "../uart/uart.h"
Go to the source code of this file.
Definition at line 1 of file base.c.
Application level main function. Creates the required tasks and then terminates
Definition at line 317 of file base.c.
void bluetoothReceive |
( |
| ) |
|
Receives the lightsensor data from the remote station over bluetooth.
Definition at line 207 of file base.c.
int buffer_dequeue |
( |
int * |
queue, |
|
|
int * |
front, |
|
|
int * |
rear |
|
) |
| |
Dequeues the value from the specified buffer and returns it.
Definition at line 70 of file base.c.
void buffer_enqueue |
( |
int |
val, |
|
|
int * |
queue, |
|
|
int * |
front, |
|
|
int * |
rear |
|
) |
| |
Enqueues the value into the specified buffer.
Definition at line 58 of file base.c.
int buffer_isEmpty |
( |
int * |
front, |
|
|
int * |
rear |
|
) |
| |
Return 1 if the buffer is empty.
Definition at line 51 of file base.c.
int buffer_isFull |
( |
int * |
front, |
|
|
int * |
rear |
|
) |
| |
Return 1 if the buffer is full.
Definition at line 44 of file base.c.
Idle task to run when nothing else is ready.
Definition at line 85 of file base.c.
Initializes A to D conversion.
Definition at line 93 of file base.c.
Reads x from the joystick and sends it over bluetooth to the remote station.
Definition at line 101 of file base.c.
Read the digital pin for the laser pushbutton and if it has changed, send the data to the remote station.
Definition at line 181 of file base.c.
Reads x and y from the joystick and maps them to commands to send to the remote station for control over the Roomba.
Definition at line 248 of file base.c.
Reads a digital button and if it has changed, send a byte to the remote station.
Definition at line 155 of file base.c.
uint16_t photocellReading |
uint8_t previousLaser = 0 |