Code for a quadrapod robot.

Dependencies:   ArthropodIK MMA8451Q MODSERIAL TSI TextLCD mbed-rtos mbed PolyServo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers quadrapod_defs.h Source File

quadrapod_defs.h

00001 #ifndef QUADRAPOD_DEFS_H
00002 #define QUADRAPOD_DEFS_H
00003 
00004 /* This header file defines pin names and similar stuff. */
00005 #include "mbed.h"
00006 
00007 /* Constant definitions. */
00008 #define RAD2DEG 57.2957795
00009 
00010 #ifndef PI
00011 #define PI 3.14159265359
00012 #endif
00013 
00014 
00015 
00016 /* Management and control lines */
00017 
00018 #define BATTSENSE PTC1
00019 #define PWR_GOOD PTD6
00020 #define BUZZER PTE31
00021 
00022 #define RADIO_UART_TX PTE22
00023 #define RADIO_UART_RX PTE23
00024 
00025 /* UI (LCD and button) Lines */
00026 
00027 #define LED_BL_RED PTE20
00028 #define LED_BL_GRN PTE21
00029 #define LED_BL_BLU PTE29
00030 
00031 #define LCD_RS PTD7
00032 #define LCD_RW PTE2
00033 #define LCD_EN PTE3
00034 #define LCD_D4 PTB9
00035 #define LCD_D5 PTE4
00036 #define LCD_D6 PTE5
00037 #define LCD_D7 PTE30
00038 
00039 
00040 
00041 #define SEL_BUTTON PTA16
00042 #define ENTER_BUTON PTA17
00043 
00044 /* External IO connection lines */
00045 
00046 #define AUX_IN PTC3
00047 
00048 #define EXT_SDA PTC11
00049 #define EXT_SCL PTC10
00050 
00051 #define EXT_CS PTD0
00052 #define EXT_SCK PTD1
00053 #define EXT_MOSI PTD2
00054 #define EXT_MISO PTD3
00055 
00056 #define EXT_UART_TX PTE0
00057 #define EXT_UART_RX PTE1
00058 
00059 
00060 
00061 /* Servo Block Lines */
00062 
00063 
00064 #define SA1 PTC0
00065 #define SA2 PTC2
00066 #define SA3 PTC4
00067 
00068 #define SB1 PTC5
00069 #define SB2 PTC6
00070 #define SB3 PTC7
00071 
00072 #define SC1 PTC8
00073 #define SC2 PTC9
00074 #define SC3 PTC12
00075 
00076 #define SD1 PTC13
00077 #define SD2 PTC16
00078 #define SD3 PTC17
00079 
00080 /* Leg sensor lines, in case I ever get that working */
00081 
00082 #define SNA PTB0
00083 #define SNB PTB1
00084 #define SNC PTB2
00085 #define SCD PTB3
00086 
00087 
00088 
00089 //#define PI 3.14159265359
00090 
00091 
00092 
00093 
00094 
00095 
00096 #endif