SmartWheels self-driving race car. Designed for NXP Cup. Uses FRDM-KL25Z, area-scan camera, and simple image processing to detect and navigate any NXP spec track.
Dependencies: TSI USBDevice mbed-dev
Fork of SmartWheels by
Hardwares/PinAssignment.h@28:271fc8445e89, 2017-02-27 (annotated)
- Committer:
- hazheng
- Date:
- Mon Feb 27 21:43:59 2017 +0000
- Revision:
- 28:271fc8445e89
- Parent:
- 27:c68f711e5b67
- Child:
- 29:f87d8790f57d
Added basic framework for the ArduCAM. Started to change the hardware interface code into Pure C style, so that the call process will be faster and program size could be smaller.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Bobymicjohn | 8:92f6baeea027 | 1 | #pragma once |
Bobymicjohn | 8:92f6baeea027 | 2 | #ifndef PIN_ASSIGNMENT_H |
Bobymicjohn | 8:92f6baeea027 | 3 | #define PIN_ASSIGNMENT_H |
Bobymicjohn | 8:92f6baeea027 | 4 | |
hazheng | 28:271fc8445e89 | 5 | #include <mbed.h> |
hazheng | 28:271fc8445e89 | 6 | |
Bobymicjohn | 8:92f6baeea027 | 7 | //LED Manager Class |
hazheng | 13:7dcb1642ef99 | 8 | #define PIN_LMC_LED_RED LED_RED |
hazheng | 13:7dcb1642ef99 | 9 | #define PIN_LMC_LED_GREEN LED_GREEN |
hazheng | 13:7dcb1642ef99 | 10 | #define PIN_LMC_LED_BLUE LED_BLUE |
Bobymicjohn | 8:92f6baeea027 | 11 | |
Bobymicjohn | 8:92f6baeea027 | 12 | //Motor Class |
Bobymicjohn | 15:eb6a274b3dfb | 13 | #define PIN_MC_DIR_L PTD4 |
Bobymicjohn | 15:eb6a274b3dfb | 14 | #define PIN_MC_DIR_R PTA4 |
Bobymicjohn | 15:eb6a274b3dfb | 15 | #define PIN_MC_SPEED_L PTA12 |
Bobymicjohn | 15:eb6a274b3dfb | 16 | #define PIN_MC_SPEED_R PTA5 |
Bobymicjohn | 8:92f6baeea027 | 17 | |
Bobymicjohn | 10:fedb5786a109 | 18 | //Servo |
hazheng | 13:7dcb1642ef99 | 19 | #define PIN_SC_SERVO PTB0 |
Bobymicjohn | 8:92f6baeea027 | 20 | |
Bobymicjohn | 8:92f6baeea027 | 21 | //Camera Class |
hazheng | 26:5814404856e2 | 22 | #define PIN_CC_PCLOCK PTA17 |
hazheng | 25:6f63053cee81 | 23 | #define PIN_CC_HREF PTD6 |
hazheng | 26:5814404856e2 | 24 | #define PIN_CC_VSYNC PTD7 |
hazheng | 25:6f63053cee81 | 25 | |
hazheng | 27:c68f711e5b67 | 26 | #define PIN_CC_D_0 PTB8 |
hazheng | 27:c68f711e5b67 | 27 | #define PIN_CC_D_1 PTB9 |
hazheng | 27:c68f711e5b67 | 28 | #define PIN_CC_D_2 PTB10 |
hazheng | 27:c68f711e5b67 | 29 | #define PIN_CC_D_3 PTB11 |
hazheng | 27:c68f711e5b67 | 30 | #define PIN_CC_D_4 PTE2 |
hazheng | 27:c68f711e5b67 | 31 | #define PIN_CC_D_5 PTE3 |
hazheng | 27:c68f711e5b67 | 32 | #define PIN_CC_D_6 PTE4 |
hazheng | 27:c68f711e5b67 | 33 | #define PIN_CC_D_7 PTE5 |
hazheng | 27:c68f711e5b67 | 34 | |
hazheng | 25:6f63053cee81 | 35 | //OV7725RegBuf Class |
hazheng | 25:6f63053cee81 | 36 | #define PIN_ORB_SDA PTC11 |
hazheng | 25:6f63053cee81 | 37 | #define PIN_ORB_SCL PTC10 |
Bobymicjohn | 8:92f6baeea027 | 38 | |
Bobymicjohn | 15:eb6a274b3dfb | 39 | //Wheel Encoder Class |
Bobymicjohn | 15:eb6a274b3dfb | 40 | #define PIN_WE_RL PTD0 |
Bobymicjohn | 15:eb6a274b3dfb | 41 | #define PIN_WE_RR PTD5 |
Bobymicjohn | 8:92f6baeea027 | 42 | |
hazheng | 28:271fc8445e89 | 43 | ////////////////////////////////////// |
hazheng | 28:271fc8445e89 | 44 | //Global Ports |
hazheng | 28:271fc8445e89 | 45 | #define PIN_SPI_MOSI PTD2 |
hazheng | 28:271fc8445e89 | 46 | #define PIN_SPI_MISO PTD3 |
hazheng | 28:271fc8445e89 | 47 | #define PIN_SPI_SCK PTD1 |
hazheng | 28:271fc8445e89 | 48 | |
hazheng | 28:271fc8445e89 | 49 | extern SPI g_spi_port; |
hazheng | 28:271fc8445e89 | 50 | |
Bobymicjohn | 8:92f6baeea027 | 51 | #endif |