BroBot Code for ESE350 Lab6 part 3 (Skeleton)
Dependencies: MPU6050_V3 mbed-rtos mbed
Fork of BroBot_RTOS_ESE350 by
pin_assignments.h@20:a7cba632d0b1, 2017-03-22 (annotated)
- Committer:
- csharer
- Date:
- Wed Mar 22 21:59:10 2017 +0000
- Revision:
- 20:a7cba632d0b1
- Parent:
- 17:8e2824f64b91
Final Skeleton code for ESE350
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
csharer | 3:2f76ffbc5cef | 1 | //pin_assignments.h |
csharer | 3:2f76ffbc5cef | 2 | //Contains all the pin assignments for this project |
csharer | 6:62cdb7482b50 | 3 | //Author: Carter Sharer |
csharer | 6:62cdb7482b50 | 4 | //Date: 11/8/2016 |
csharer | 3:2f76ffbc5cef | 5 | |
csharer | 4:2512939c10f0 | 6 | //HARDWARE |
csharer | 6:62cdb7482b50 | 7 | //The main processor is an mbed LPC1768 |
csharer | 4:2512939c10f0 | 8 | //There are two motor drivers A4988(1) and A4988(2) |
csharer | 4:2512939c10f0 | 9 | //There is one 6 axis IMU MP6050 |
csharer | 6:62cdb7482b50 | 10 | //There is one RF transciever MRF24J40 |
csharer | 4:2512939c10f0 | 11 | |
csharer | 6:62cdb7482b50 | 12 | /****************** Wiring Diagram ********************************\ |
csharer | 6:62cdb7482b50 | 13 | |
csharer | 4:2512939c10f0 | 14 | ------------- |
csharer | 6:62cdb7482b50 | 15 | |GND |_|VOUT| --- MPU6050|MRF24J40 VCC (3.3v) |
csharer | 4:2512939c10f0 | 16 | |VIN VU | |
csharer | 4:2512939c10f0 | 17 | |VB IF-| |
csharer | 4:2512939c10f0 | 18 | |nR IF+| |
csharer | 4:2512939c10f0 | 19 | |p5 L RD-| |
csharer | 4:2512939c10f0 | 20 | |p6 P RD+| |
csharer | 6:62cdb7482b50 | 21 | MRF24J40 CS --- |p7 C TD-| |
csharer | 6:62cdb7482b50 | 22 | MRF24J40 RESET -- |p8 1 TD+| |
csharer | 4:2512939c10f0 | 23 | |p9 7 D- | |
csharer | 4:2512939c10f0 | 24 | |p10 6 D+ | |
csharer | 6:62cdb7482b50 | 25 | MRF24J40 SDI --- |p11 8 p30| |
csharer | 6:62cdb7482b50 | 26 | MRF24J40 SDO --- |p12 p29| --- MPU6050 INT (CHECKPIN) |
csharer | 6:62cdb7482b50 | 27 | MRF24J40 SCK --- |p13 p28| --- MPU6050 SDA |
csharer | 6:62cdb7482b50 | 28 | |p14 p27| --- MPU6050 SCL |
csharer | 6:62cdb7482b50 | 29 | A4988(2) Step --- |p15 p26| |
csharer | 6:62cdb7482b50 | 30 | A4988(2) Dir --- |p16 p25| |
csharer | 4:2512939c10f0 | 31 | |p17 p24| |
csharer | 6:62cdb7482b50 | 32 | A4988(1,2) ENABLE |p18 p23| |
csharer | 4:2512939c10f0 | 33 | A4988(1) Step --- |p19 p22| |
csharer | 6:62cdb7482b50 | 34 | A4988(1) Dir --- |p20 p21| |
csharer | 4:2512939c10f0 | 35 | ------------- |
csharer | 4:2512939c10f0 | 36 | |
csharer | 6:62cdb7482b50 | 37 | /******************************************************************/ |
csharer | 4:2512939c10f0 | 38 | |
csharer | 3:2f76ffbc5cef | 39 | |
csharer | 3:2f76ffbc5cef | 40 | //Pin Declarations |
csharer | 3:2f76ffbc5cef | 41 | |
csharer | 3:2f76ffbc5cef | 42 | //Motor Driver Pins |
csharer | 3:2f76ffbc5cef | 43 | #define MOTOR1_STEP p19 |
csharer | 3:2f76ffbc5cef | 44 | #define MOTOR1_DIR p20 |
csharer | 3:2f76ffbc5cef | 45 | #define MOTOR2_STEP p15 |
csharer | 3:2f76ffbc5cef | 46 | #define MOTOR2_DIR p17 |
csharer | 6:62cdb7482b50 | 47 | #define MOTOR_ENABLE p18 //For both motor divers |
csharer | 3:2f76ffbc5cef | 48 | |
csharer | 3:2f76ffbc5cef | 49 | //MPU6050 SPI PINS |
csharer | 6:62cdb7482b50 | 50 | #define I2C_SDA_1 p28 |
csharer | 6:62cdb7482b50 | 51 | #define I2C_SCL_1 p27 |
csharer | 6:62cdb7482b50 | 52 | #define CHECKPIN p29 //for IMU interupt pin (INT) |
csharer | 4:2512939c10f0 | 53 | |
csharer | 4:2512939c10f0 | 54 | //MRF24J40 |
csharer | 4:2512939c10f0 | 55 | #define SDI p11 |
csharer | 4:2512939c10f0 | 56 | #define SDO p12 |
csharer | 4:2512939c10f0 | 57 | #define SCK p13 |
csharer | 4:2512939c10f0 | 58 | #define CS p7 |
csharer | 4:2512939c10f0 | 59 | #define RESET p8 |
arvindnr89 | 17:8e2824f64b91 | 60 | |
arvindnr89 | 17:8e2824f64b91 | 61 | #define DEBUG_PIN1 p30 |
arvindnr89 | 17:8e2824f64b91 | 62 | #define DEBUG_PIN2 p5 |
arvindnr89 | 17:8e2824f64b91 | 63 | #define DEBUG_PIN3 p6 |