Skip to content

Commit

Permalink
ESP32 before AVR, because more people use ESP32's than Arduinos now
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-vrtech committed Jul 19, 2022
1 parent f6da8e9 commit cd1bc4e
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions firmware/lucidgloves-firmware/lucidgloves-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,32 @@
#define USING_FORCE_FEEDBACK false //Force feedback haptics allow you to feel the solid objects you hold
#define SERVO_SCALING false //dynamic scaling of servo motors

#if defined(ESP32)
//(This configuration is for ESP32 DOIT V1 so make sure to change if you're on another board)
#define PIN_PINKY 36
#define PIN_RING 39
#define PIN_MIDDLE 34
#define PIN_INDEX 35
#define PIN_THUMB 32
#define PIN_JOY_X 33
#define PIN_JOY_Y 25
#define PIN_JOY_BTN 26
#define PIN_A_BTN 27
#define PIN_B_BTN 14
#define PIN_TRIG_BTN 12 //unused if gesture set
#define PIN_GRAB_BTN 13 //unused if gesture set
#define PIN_PNCH_BTN 23 //unused if gesture set
#define PIN_CALIB 12 //button for recalibration
#define DEBUG_LED 2
#define PIN_PINKY_MOTOR 5 //used for force feedback
#define PIN_RING_MOTOR 18 //^
#define PIN_MIDDLE_MOTOR 19 //^
#define PIN_INDEX_MOTOR 21 //^
#define PIN_THUMB_MOTOR 17 //^
#define PIN_MENU_BTN 27

//PINS CONFIGURATION
#if defined(__AVR__)
#elif defined(__AVR__)
//(This configuration is for Arduino Nano so make sure to change if you're on another board)
#define PIN_PINKY A0
#define PIN_RING A1
Expand All @@ -76,27 +100,4 @@
#define PIN_INDEX_MOTOR 5 //^
#define PIN_THUMB_MOTOR 6 //^
#define PIN_MENU_BTN 8
#elif defined(ESP32)
//(This configuration is for ESP32 DOIT V1 so make sure to change if you're on another board)
#define PIN_PINKY 36
#define PIN_RING 39
#define PIN_MIDDLE 34
#define PIN_INDEX 35
#define PIN_THUMB 32
#define PIN_JOY_X 33
#define PIN_JOY_Y 25
#define PIN_JOY_BTN 26
#define PIN_A_BTN 27
#define PIN_B_BTN 14
#define PIN_TRIG_BTN 12 //unused if gesture set
#define PIN_GRAB_BTN 13 //unused if gesture set
#define PIN_PNCH_BTN 23 //unused if gesture set
#define PIN_CALIB 12 //button for recalibration
#define DEBUG_LED 2
#define PIN_PINKY_MOTOR 5 //used for force feedback
#define PIN_RING_MOTOR 18 //^
#define PIN_MIDDLE_MOTOR 19 //^
#define PIN_INDEX_MOTOR 21 //^
#define PIN_THUMB_MOTOR 17 //^
#define PIN_MENU_BTN 27
#endif

0 comments on commit cd1bc4e

Please sign in to comment.