![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Firmware for UT Robotex 2018 basketball robot
pins.h@4:81cb68f1bcbd, 2019-11-11 (annotated)
- Committer:
- Reiko
- Date:
- Mon Nov 11 19:19:43 2019 +0000
- Revision:
- 4:81cb68f1bcbd
- Parent:
- 0:ef6268629f0b
Change default thrower (motor 3) pulsewidth_us from 800 to 100
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Reiko | 0:ef6268629f0b | 1 | #ifndef PINS_H_ |
Reiko | 0:ef6268629f0b | 2 | #define PINS_H_ |
Reiko | 0:ef6268629f0b | 3 | #include "mbed.h" |
Reiko | 0:ef6268629f0b | 4 | |
Reiko | 0:ef6268629f0b | 5 | // MOTOR0 (J1) |
Reiko | 0:ef6268629f0b | 6 | #define M0_PWM P2_0 |
Reiko | 0:ef6268629f0b | 7 | #define M0_DIR1 P4_29 |
Reiko | 0:ef6268629f0b | 8 | #define M0_DIR2 P4_28 |
Reiko | 0:ef6268629f0b | 9 | #define M0_ENCA P0_7 |
Reiko | 0:ef6268629f0b | 10 | #define M0_ENCB P0_6 |
Reiko | 0:ef6268629f0b | 11 | |
Reiko | 0:ef6268629f0b | 12 | // MOTOR1 (J4) |
Reiko | 0:ef6268629f0b | 13 | #define M1_PWM P2_1 |
Reiko | 0:ef6268629f0b | 14 | #define M1_DIR1 P0_9 |
Reiko | 0:ef6268629f0b | 15 | #define M1_DIR2 P0_8 |
Reiko | 0:ef6268629f0b | 16 | #define M1_ENCA P2_6 |
Reiko | 0:ef6268629f0b | 17 | #define M1_ENCB P2_7 |
Reiko | 0:ef6268629f0b | 18 | |
Reiko | 0:ef6268629f0b | 19 | // MOTOR2 (J5) |
Reiko | 0:ef6268629f0b | 20 | #define M2_PWM P2_2 |
Reiko | 0:ef6268629f0b | 21 | #define M2_DIR1 P0_15 |
Reiko | 0:ef6268629f0b | 22 | #define M2_DIR2 P0_16 |
Reiko | 0:ef6268629f0b | 23 | #define M2_ENCA P0_17 |
Reiko | 0:ef6268629f0b | 24 | #define M2_ENCB P0_18 |
Reiko | 0:ef6268629f0b | 25 | |
Reiko | 0:ef6268629f0b | 26 | // MOTOR3 (J6) |
Reiko | 0:ef6268629f0b | 27 | #define M3_PWM P2_3 |
Reiko | 0:ef6268629f0b | 28 | #define M3_DIR1 P0_19 |
Reiko | 0:ef6268629f0b | 29 | #define M3_DIR2 P0_20 |
Reiko | 0:ef6268629f0b | 30 | #define M3_ENCA P0_21 |
Reiko | 0:ef6268629f0b | 31 | #define M3_ENCB P0_22 |
Reiko | 0:ef6268629f0b | 32 | |
Reiko | 0:ef6268629f0b | 33 | // LEDS |
Reiko | 0:ef6268629f0b | 34 | #define LED_1 P1_18 |
Reiko | 0:ef6268629f0b | 35 | #define LED_2 P1_19 |
Reiko | 0:ef6268629f0b | 36 | #define LED_3 P1_22 |
Reiko | 0:ef6268629f0b | 37 | |
Reiko | 0:ef6268629f0b | 38 | // COM1 (J9) |
Reiko | 0:ef6268629f0b | 39 | #define COM1_TX P0_0 |
Reiko | 0:ef6268629f0b | 40 | #define COM1_RX P0_1 |
Reiko | 0:ef6268629f0b | 41 | |
Reiko | 0:ef6268629f0b | 42 | // COM2 (J11) |
Reiko | 0:ef6268629f0b | 43 | #define COM2_TX P0_10 |
Reiko | 0:ef6268629f0b | 44 | #define COM2_RX P0_11 |
Reiko | 0:ef6268629f0b | 45 | |
Reiko | 0:ef6268629f0b | 46 | // SPI (J10) |
Reiko | 0:ef6268629f0b | 47 | #define SPI_MOSI P1_24 |
Reiko | 0:ef6268629f0b | 48 | #define SPI_MISO P1_23 |
Reiko | 0:ef6268629f0b | 49 | #define SPI_SSEL P1_21 |
Reiko | 0:ef6268629f0b | 50 | #define SPI_SCK P1_20 |
Reiko | 0:ef6268629f0b | 51 | |
Reiko | 0:ef6268629f0b | 52 | // ISOLATED_IO (J8) |
Reiko | 0:ef6268629f0b | 53 | #define ISO_PWM5 P2_4 |
Reiko | 0:ef6268629f0b | 54 | #define ISO_PWM6 P2_5 |
Reiko | 0:ef6268629f0b | 55 | #define ISO_OUT P0_4 |
Reiko | 0:ef6268629f0b | 56 | #define ISO_IN P0_5 |
Reiko | 0:ef6268629f0b | 57 | |
Reiko | 0:ef6268629f0b | 58 | #endif |