#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include <avr/eeprom.h>
#include <avr/pgmspace.h>
#include "basic.h"
#include "stationu.h"
#include "ir.h"
Go to the source code of this file.
Defines | |
#define | WAIT10 for (i=0; i < 100; i++) for (i2 = 0; i2 < 100; i2++) { _NOP; } |
Functions | |
SIGNAL (SIG_OVERFLOW0) | |
This function is called by the Timer0 which is the general "tasking" clock of the station. | |
int | main (void) |
The main program. Does some initialisation and keeps running the terminal. | |
Variables | |
const u08 __ATTR_PROGMEM__ | Pmenu0 [] |
const u08 __ATTR_PROGMEM__ | Pmenu1 [] |
const u08 __ATTR_PROGMEM__ | Pmenu2 [] = "\033[2JPress 0 to abort, any other key to continue\n\r\0" |
const u08 __ATTR_PROGMEM__ | Pmenu3 [] |
const u08 __ATTR_PROGMEM__ | Pmenu4 [] = "\033[2JROBOT-SPEAK: (send empty to leave)\n\r\0" |
const u08 __ATTR_PROGMEM__ | Pempty [] = "\n\rLOADING STATION EMPTY!!\0" |
const u08 __ATTR_PROGMEM__ | Pstart [] = "Starting up\0" |
const u08 __ATTR_PROGMEM__ | Pirpulse [] = "\n\rIR PULSE-->\0" |
const u08 __ATTR_PROGMEM__ | Pirstring [] = "\n\rIR STRING -->\0" |
u08 | sendbuf [IRMSLENGTH+1] |
u08 | recbuf [IRKEYS][IRMLENGTH] |
u08 | pulsecount |
u08 | ircmp [IRKEYS] |
u08 | oldsw7 |
u08 | ircontbittime |
u08 | robotneedspower |
The loading station has a functionality to transmit data from and to the robot. Furthermore it has a Terminal adapter over the serial port by which the datas are transmitted to the PC and it is adjusted.
Last but not least it regulates the current for the accu of the robot and checks the own voltage.
Definition in file station.c.
|
This function is called by the Timer0 which is the general "tasking" clock of the station. There are two modes of the Timer used: the "normal" timing where the prescaler divides the clock by 8 and the "fast" without prescaler. The fast mode is used for the transmitting and receiving IR-routines. While these are active the normal functions are disabled. (IR needs a clock of 36kHz). Definition at line 53 of file station.c. Referenced by SIGNAL(). |
|
Initial value: "\033[2J----------------------\n\r" "- Welcome to Leobot -\n\r" "----------------------\n\r" "Keys:\n\r" " 1: Change loading current\n\r" " 2: Upload IR-Data\n\r" " 3: See & learn incoming ir-Data\n\r" " 4: Communicate to robot\n\r" " a,c,e: set mode of station\n\r\n\r" "Actual mode: \0" |
|
Initial value: "\033[2JSet loading current: (+ and - to change, 0 to leave)\n\r" " Actual Value: \0" |
|
Initial value: "\033[2JIncoming IR-Data:\n\r" "Keys: 0: Leave, +-: Ir-speed, 1..4: Learn string\n\r" " r: Reset learned strings, c: Test learned\n\r" "STRING UNTIL NOW -->\0" |