00001 00010 /*************************************************************************** 00011 * 00012 *it is not allowed to remove the nicknames of the contributers to this software 00013 * from the function header 00014 */ 00015 /*************************************************************************** 00016 * * 00017 * This program is free software; you can redistribute it and/or modify * 00018 * it under the terms of the GNU General Public License as published by * 00019 * the Free Software Foundation; either version 2 of the License, or * 00020 * any later version. * 00021 ***************************************************************************/ 00022 00023 /******************************************************************************* 00024 * 00025 * File Name: asuro.c 00026 * Project : ASURO 00027 * 00028 * Description: This file contains ASURO main features 00029 * 00030 * Ver. Date Author Comments 00031 * ------- ---------- -------------- ------------------------------ 00032 * 1.00 14.08.2003 Jan Grewe build 00033 * 2.00 14.10.2003 Jan Grewe LEFT_VEL, RIGHT_VEL -> MotorSpeed(unsigned char left_speed, unsigned char right_speed); 00034 * LeftRwd(),LeftFwd(),RightRwd(), 00035 * RigthFwd() -> MotorDir(unsigned char left_dir, unsigned char right_dir); 00036 * GREEN_ON,GREEN_OFF,RED_ON,RED_OFF -> StatusLED(unsigned char color); 00037 * LED_RED_ON, LED_RED_OFF -> FrontLED(unsigned char color); 00038 * Blink(unsigned char left, unsigned char right) -> BackLED(unsigned char left, unsigned char right); 00039 * Alles in Funktionen gefasst => leichter verständlich ?!?! 00040 * 2.10 17.10.2003 Jan Grewe new Timer funktion void Sleep(unsigned char time36kHz) 00041 * 00042 * Copyright (c) 2003 DLR Robotics & Mechatronics 00043 *****************************************************************************/ 00044 /**************************************************************************** 00045 * 00046 * File Name: asuro.c 00047 * Project : asuro library "Robotrixer Buxtehude" 00048 * 00049 * Description: This file contains additional functions: 00050 * 00051 * signal (SIG_ADC) interrupt/signal routine for encoder-counter 00052 * signal (SIG_INTERRUPT1) signal for switches 00053 * EncoderInit() initializing encoder-counter 00054 * EncoderStart() start autoencoding 00055 * EncoderStop() stop autoencoding 00056 * EncoderSet(int,int) set encodervalue 00057 * Msleep(int delay) wait for delay in milliseconds 00058 * Gettime() get systemtime in milliseconds 00059 * PrintInt(int) 00060 * 00061 * modifications in Sleep, SIG_OUTPUT_COMPARE2, PollSwitch, LineData 00062 * 00063 * Ver. Date Author Comments 00064 * ------- ---------- -------------- ------------------------------ 00065 * beta1 31.03.2005 Robotrixer asuro library 00066 * ------- ---------- -------------- ------------------------------ 00067 * the encoder source is based on RechteckDemo.c ver 2.0 by Jan Grewe 22.10.2003 00068 * Copyright (c) 2003 DLR Robotics & Mechatronics 00069 00070 *****************************************************************************/ 00071 /**************************************************************************** 00072 * 00073 * File Name: asuro.c 00074 * Project : asuro library modified for IR collision detector 00075 * 00076 * Description: modifications made in following functions: 00077 * 00078 * SIGNAL (SIG_OUTPUT_COMPARE2) -> SIGNAL (SIG_OVERFLOW2) 00079 * Gettime() counts now 36kHz 00080 * Init() timer2 modified for adjustable duty cycle 00081 * Batterie() bug fixed 00082 * Sleep() counts now 36kHz 00083 * Msleep() counts now 36kHz 00084 * 00085 * Ver. Date Author Comments 00086 * ------- ---------- -------------- ------------------------------ 00087 * beta2 11.06.2005 Waste asuro library 00088 * ------- ---------- -------------- ------------------------------ 00089 *****************************************************************************/ 00090 /**************************************************************************** 00091 * 00092 * File Name: asuro.c 00093 * Project : asuro library 00094 * 00095 * Description: This file contains additional functions: 00096 * 00097 * motor control functions 29.7.2005 stochri 00098 * void Go(int distance) 00099 * void Turn(int degree) 00100 * 00101 * unsigned char Wheelspeed[2] measured Wheelspeed by interupt 00102 * 00103 * Ver. Date Author Comments 00104 * ------- ---------- -------------- ------------------------------------------ 00105 * sto1 29.07.2005 stochri asuro library with motor control functions 00106 * ------- ---------- -------------- ------------------------------------------ 00107 *****************************************************************************/ 00108 /**************************************************************************** 00109 * 00110 * File Name: asuro.c 00111 * Project : asuro library 00112 * 00113 * Description: modifications made in following functions: 00114 * 00115 * void Go(int distance, int speed) 00116 * void Turn(int degree, int speed) 00117 * 00118 * 00119 * Ver. Date Author Comments 00120 * ------- ---------- -------------- ------------------------------------------ 00121 * And1 31.07.2005 Andun Added Speed and Odometrie 00122 * ------- ---------- -------------- ------------------------------------------ 00123 *****************************************************************************/ 00124 /**************************************************************************** 00125 * 00126 * File Name: asuro.c 00127 * Project : asuro library 00128 * 00129 * Description: modifications made in following functions: 00130 * 00131 * void PrintInt(int wert) 00132 * 00133 * 00134 * Ver. Date Author Comments 00135 * ------- ---------- -------------- ------------------------------------------ 00136 * 2.60 28.09.2005 m.a.r.v.i.n doxygen comments 00137 * ------- ---------- -------------- ------------------------------------------ 00138 *****************************************************************************/ 00139 /**************************************************************************** 00140 * 00141 * File Name: asuro.c 00142 * Project : asuro library 00143 * 00144 * Description: modifications made in following functions: 00145 * 00146 * SIGNAL (SIG_ADC) 00147 * void PrintInt(int wert) 00148 * 00149 * 00150 * Ver. Date Author Comments 00151 * ------- ---------- -------------- ------------------------------------------ 00152 * 2.61 20.11.2006 m.a.r.v.i.n SIGNAL (SIG_ADC): static Variable toggle initialisiert 00153 * auf False (Bug report von Rolf_Ebert) 00154 * PrintInt: Initialisierung text String kann zu Fehler 00155 * beim Flashen mit RS232/IR Adapter fuehren 00156 * (Bug report von francesco) 00157 * ------- ---------- -------------- ------------------------------------------ 00158 *****************************************************************************/ 00159 /**************************************************************************** 00160 * 00161 * File Name: asuro.c 00162 * Project : asuro library 00163 * 00164 * Description: new functions has been added: 00165 * 00166 * void UartPutc(unsigned char zeichen) 00167 * void SerPrint(unsigned char *data) 00168 * void SetMotorPower(int8_t left_speed, int8_t right_speed ) 00169 * void sound(uint16_t freq, uint16_t duration_msec, uint8_t amplitude) 00170 * 00171 * Description: modifications made in following functions: 00172 * 00173 * void Go(int distance, int power) 00174 * void Turn(int degree, int speed) 00175 * void PrintInt(int wert) 00176 * 00177 * 00178 * Ver. Date Author Comments 00179 * ------- ---------- -------------- ------------------------------------------ 00180 * 2.70 07.01.2007 stochri new functions: 00181 * uart_putc: send single character 00182 * SerPrint: send 0-terminated string 00183 * SetMotorPower: set Motor speed and direction 00184 * sound: Sound Ausgabe ueber die Motoren 00185 * Go: distance in mm 00186 * Turn: comments 00187 * m.a.r.v.i.n PrintInt: SerWrite ersetzt durch SerPrint 00188 * ------- ---------- -------------- ------------------------------------------ 00189 *****************************************************************************/ 00190 00191 #include "asuro.h" 00192 00193 const char version[5] = "2.71"; 00194