├── 2Motor16servoV3.PcbDoc ├── CP2102Driver(USBtoSerial).rar ├── DC motor drive.pdf ├── ESPDuinoCar_V1.bin ├── ESPDuinoCar_V2.bin ├── ESPDuinoCar_V3.bin ├── PS2X_lib.h ├── README.md ├── armcarhead.zip ├── flash_download_tool_v3.8.5.zip └── ft232Driver.zip /2Motor16servoV3.PcbDoc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartArduino/DOITWiKi/df5a0ef570aac2a7249edfb40e1ff577476513a6/2Motor16servoV3.PcbDoc -------------------------------------------------------------------------------- /CP2102Driver(USBtoSerial).rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartArduino/DOITWiKi/df5a0ef570aac2a7249edfb40e1ff577476513a6/CP2102Driver(USBtoSerial).rar -------------------------------------------------------------------------------- /DC motor drive.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartArduino/DOITWiKi/df5a0ef570aac2a7249edfb40e1ff577476513a6/DC motor drive.pdf -------------------------------------------------------------------------------- /ESPDuinoCar_V1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartArduino/DOITWiKi/df5a0ef570aac2a7249edfb40e1ff577476513a6/ESPDuinoCar_V1.bin -------------------------------------------------------------------------------- /ESPDuinoCar_V2.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartArduino/DOITWiKi/df5a0ef570aac2a7249edfb40e1ff577476513a6/ESPDuinoCar_V2.bin -------------------------------------------------------------------------------- /ESPDuinoCar_V3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmartArduino/DOITWiKi/df5a0ef570aac2a7249edfb40e1ff577476513a6/ESPDuinoCar_V3.bin -------------------------------------------------------------------------------- /PS2X_lib.h: -------------------------------------------------------------------------------- 1 | /****************************************************************** 2 | * Super amazing PS2 controller Arduino Library v1.8 3 | * details and example sketch: 4 | * http://www.billporter.info/?p=240 5 | * 6 | * Original code by Shutter on Arduino Forums 7 | * 8 | * Revamped, made into lib by and supporting continued development: 9 | * Bill Porter 10 | * www.billporter.info 11 | * 12 | * Contributers: 13 | * Eric Wetzel (thewetzel@gmail.com) 14 | * Kurt Eckhardt 15 | * 16 | * Lib version history 17 | * 0.1 made into library, added analog stick support. 18 | * 0.2 fixed config_gamepad miss-spelling 19 | * added new functions: 20 | * NewButtonState(); 21 | * NewButtonState(unsigned int); 22 | * ButtonPressed(unsigned int); 23 | * ButtonReleased(unsigned int); 24 | * removed 'PS' from begining of ever function 25 | * 1.0 found and fixed bug that wasn't configuring controller 26 | * added ability to define pins 27 | * added time checking to reconfigure controller if not polled enough 28 | * Analog sticks and pressures all through 'ps2x.Analog()' function 29 | * added: 30 | * enableRumble(); 31 | * enablePressures(); 32 | * 1.1 33 | * added some debug stuff for end user. Reports if no controller found 34 | * added auto-increasing sentence delay to see if it helps compatibility. 35 | * 1.2 36 | * found bad math by Shutter for original clock. Was running at 50kHz, not the required 500kHz. 37 | * fixed some of the debug reporting. 38 | * 1.3 39 | * Changed clock back to 50kHz. CuriousInventor says it's suppose to be 500kHz, but doesn't seem to work for everybody. 40 | * 1.4 41 | * Removed redundant functions. 42 | * Fixed mode check to include two other possible modes the controller could be in. 43 | * Added debug code enabled by compiler directives. See below to enable debug mode. 44 | * Added button definitions for shapes as well as colors. 45 | * 1.41 46 | * Some simple bug fixes 47 | * Added Keywords.txt file 48 | * 1.5 49 | * Added proper Guitar Hero compatibility 50 | * Fixed issue with DEBUG mode, had to send serial at once instead of in bits 51 | * 1.6 52 | * Changed config_gamepad() call to include rumble and pressures options 53 | * This was to fix controllers that will only go into config mode once 54 | * Old methods should still work for backwards compatibility 55 | * 1.7 56 | * Integrated Kurt's fixes for the interrupts messing with servo signals 57 | * Reorganized directory so examples show up in Arduino IDE menu 58 | * 1.8 59 | * Added Arduino 1.0 compatibility. 60 | * 1.9 61 | * Kurt - Added detection and recovery from dropping from analog mode, plus 62 | * integreated Chipkit (pic32mx...) support 63 | * 64 | * 65 | * 66 | *This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version. 67 | This program is distributed in the hope that it will be useful, 68 | but WITHOUT ANY WARRANTY; without even the implied warranty of 69 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 70 | GNU General Public License for more details. 71 | 72 | * 73 | ******************************************************************/ 74 | 75 | // $$$$$$$$$$$$ DEBUG ENABLE SECTION $$$$$$$$$$$$$$$$ 76 | // to debug ps2 controller, uncomment these two lines to print out debug to uart 77 | #define PS2X_DEBUG 78 | //#define PS2X_COM_DEBUG 79 | 80 | #ifndef PS2X_lib_h 81 | #define PS2X_lib_h 82 | 83 | #if ARDUINO > 22 84 | #include "Arduino.h" 85 | #else 86 | #include "WProgram.h" 87 | #endif 88 | 89 | #include 90 | #include 91 | #include 92 | #ifdef __AVR__ 93 | // AVR 94 | #include 95 | #define CTRL_CLK 4 96 | #define CTRL_BYTE_DELAY 3 97 | #else 98 | // Pic32... 99 | #include 100 | #define CTRL_CLK 5 101 | #define CTRL_CLK_HIGH 5 102 | #define CTRL_BYTE_DELAY 4 103 | #endif 104 | 105 | //These are our button constants 106 | #define PSB_SELECT 0x0001 107 | #define PSB_L3 0x0002 108 | #define PSB_R3 0x0004 109 | #define PSB_START 0x0008 110 | #define PSB_PAD_UP 0x0010 111 | #define PSB_PAD_RIGHT 0x0020 112 | #define PSB_PAD_DOWN 0x0040 113 | #define PSB_PAD_LEFT 0x0080 114 | #define PSB_L2 0x0100 115 | #define PSB_R2 0x0200 116 | #define PSB_L1 0x0400 117 | #define PSB_R1 0x0800 118 | #define PSB_GREEN 0x1000 119 | #define PSB_RED 0x2000 120 | #define PSB_BLUE 0x4000 121 | #define PSB_PINK 0x8000 122 | #define PSB_TRIANGLE 0x1000 123 | #define PSB_CIRCLE 0x2000 124 | #define PSB_CROSS 0x4000 125 | #define PSB_SQUARE 0x8000 126 | 127 | //Guitar button constants 128 | #define UP_STRUM 0x0010 129 | #define DOWN_STRUM 0x0040 130 | #define STAR_POWER 0x0100 131 | #define GREEN_FRET 0x0200 132 | #define YELLOW_FRET 0x1000 133 | #define RED_FRET 0x2000 134 | #define BLUE_FRET 0x4000 135 | #define ORANGE_FRET 0x8000 136 | #define WHAMMY_BAR 8 137 | 138 | //These are stick values 139 | #define PSS_RX 5 140 | #define PSS_RY 6 141 | #define PSS_LX 7 142 | #define PSS_LY 8 143 | 144 | //These are analog buttons 145 | #define PSAB_PAD_RIGHT 9 146 | #define PSAB_PAD_UP 11 147 | #define PSAB_PAD_DOWN 12 148 | #define PSAB_PAD_LEFT 10 149 | #define PSAB_L2 19 150 | #define PSAB_R2 20 151 | #define PSAB_L1 17 152 | #define PSAB_R1 18 153 | #define PSAB_GREEN 13 154 | #define PSAB_RED 14 155 | #define PSAB_BLUE 15 156 | #define PSAB_PINK 16 157 | #define PSAB_TRIANGLE 13 158 | #define PSAB_CIRCLE 14 159 | #define PSAB_CROSS 15 160 | #define PSAB_SQUARE 16 161 | 162 | #define SET(x,y) (x|=(1<