Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Bertl by
config.h
00001 /*! \file config.h 00002 \brief A Documented file. 00003 * name: config.h Version: 3.0 \n 00004 * author: PE HTL BULME \n 00005 * email: pe@bulme.at \n 00006 * description: 00007 * Wiring for ur_Bertl The Robot 00008 */ 00009 00010 #include "mbed.h" 00011 #include "hcsr04.h" 00012 #include "const.h" 00013 00014 #ifndef CONFIG_H 00015 #define CONFIG_H 00016 /*! \def DEBUG 00017 \brief Turns debugging infos off (0) and on (3) which are send to serial pc.uart */ 00018 #define DEBUG 0 00019 //#define FRONTBUTTON /**< Error shutoff if Bertl moves against a wall*/ 00020 #define HCSR /**< if ultrsonic is installed*/ 00021 #define MOTORENC P1_13 /**< P1_12: left encoder P1_13: rigth encoder (motor) */ 00022 00023 BusOut NibbleLEDs(P1_8, P1_9, P1_10, P1_11); /**< 4 yellow LEDs as a bus defined; use it i.e.: karel.NibbleLeds(karel.GetLineValues()); to show line sensor values */ 00024 DigitalOut LED_D10(P1_8); /**< wiring first LED_D10 */ 00025 DigitalOut LED_D11(P1_9); /**< wiring second LED_D11 */ 00026 DigitalOut LED_D12(P1_10); /**< wiring thired LED_D12 */ 00027 DigitalOut LED_D13(P1_11); /**< wiring fourth LED_D13 */ 00028 00029 DigitalOut LED_blue(P1_28); /**< all blue LEDs are on Port 1_28 */ 00030 00031 DigitalOut RGB_blue(P1_24); /**< RGB blue component of the color uP -> Port 1_24 */ 00032 DigitalOut RGB_red(P1_23); /**< RGB red component of the color uP -> Port 1_23 */ 00033 DigitalOut RGB_green(P1_25); /**< RGB green component of the color uP -> Port 1_25 */ 00034 00035 //------------------ CHANGE ONLY IF NESSESARY ------------------------------------- 00036 00037 DigitalOut MotorL_EN(p34); // wiring motor left 00038 DigitalOut MotorL_FORWARD(P1_1); // change to P1_0 for Bertl 2015 00039 DigitalOut MotorL_REVERSE(P1_0); // change to P1_1 for Bertl 2015 00040 00041 DigitalOut MotorR_EN(p36); // wiring motor right 00042 DigitalOut MotorR_FORWARD(P1_3); // change to P1_4 for Bertl 2015 00043 DigitalOut MotorR_REVERSE(P1_4); // change to P1_3 for Bertl 2015 00044 00045 I2C i2c(p28,p27); 00046 BusIn linesensor(p18, p16, p19, p17); 00047 DigitalIn SensorL(P1_12); /**< motor sensor left on Port P1_12 */ 00048 DigitalIn SensorR(P1_13); /**< motor sensor right on Port P1_13 */ 00049 HCSR04 usensor(p21,p22); // HC-SR04 ultrasonic sensor 00050 PwmOut mg1(P1_15); // PWM out motor left 00051 PwmOut mg2(P0_21); // PWM out motor right 00052 00053 Serial pc(USBTX, USBRX); // tx, rx 00054 00055 // Bertl 2015 00056 DigitalOut MotorSpg (p30); 00057 DigitalOut IncrementalgeberSpg (P1_7); 00058 DigitalOut LinienSensorSpg (P1_6); 00059 00060 #if defined(DEBUG) && DEBUG > 0 00061 #define DEBUG_PRINT(fmt, args...) fprintf(stderr, "DEBUG: %s:%d:%s(): " fmt, \ 00062 __FILE__, __LINE__, __func__, ##args) 00063 #else 00064 #define DEBUG_PRINT(fmt, args...) /* Don't do anything in release builds */ 00065 #endif 00066 00067 #endif
Generated on Wed Jul 13 2022 11:51:38 by
