acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

config.h (4806B)

      1 // Pin selections here are based on the original Adafruit Learning System
      2 // guide for the Teensy 3.x project.  Some of these pin numbers don't even
      3 // exist on the smaller SAMD M0 & M4 boards, so you may need to make other
      4 // selections:
      5 
      6 // GRAPHICS SETTINGS (appearance of eye) -----------------------------------
      7 
      8 // If using a SINGLE EYE, you might want this next line enabled, which
      9 // uses a simpler "football-shaped" eye that's left/right symmetrical.
     10 // Default shape includes the caruncle, creating distinct left/right eyes.
     11 
     12 //#define SYMMETRICAL_EYELID
     13 
     14 // Enable ONE of these #includes -- HUGE graphics tables for various eyes:
     15 #include "data/defaultEye.h"      // Standard human-ish hazel eye -OR-
     16 //#include "data/dragonEye.h"     // Slit pupil fiery dragon/demon eye -OR-
     17 //#include "data/noScleraEye.h"   // Large iris, no sclera -OR-
     18 //#include "data/goatEye.h"       // Horizontal pupil goat/Krampus eye -OR-
     19 //#include "data/newtEye.h"       // Eye of newt -OR-
     20 //#include "data/terminatorEye.h" // Git to da choppah!
     21 //#include "data/catEye.h"        // Cartoonish cat (flat "2D" colors)
     22 //#include "data/owlEye.h"        // Minerva the owl (DISABLE TRACKING)
     23 //#include "data/naugaEye.h"      // Nauga googly eye (DISABLE TRACKING)
     24 //#include "data/doeEye.h"        // Cartoon deer eye (DISABLE TRACKING)
     25 
     26 // DISPLAY HARDWARE SETTINGS (screen type & connections) -------------------
     27 #define TFT_COUNT 1        // Number of screens (1 or 2)
     28 #define TFT1_CS -1         // TFT 1 chip select pin (set to -1 to use TFT_eSPI setup)
     29 #define TFT2_CS -1         // TFT 2 chip select pin (set to -1 to use TFT_eSPI setup)
     30 #define TFT_1_ROT 1        // TFT 1 rotation
     31 #define TFT_2_ROT 1        // TFT 2 rotation
     32 #define EYE_1_XPOSITION  0         // x shift for eye 1 image on display
     33 #define EYE_2_XPOSITION  320 - 128 // x shift for eye 2 image on display
     34 
     35 #define DISPLAY_BACKLIGHT  -1 // Pin for backlight control (-1 for none)
     36 #define BACKLIGHT_MAX    255
     37 
     38 // EYE LIST ----------------------------------------------------------------
     39 #define NUM_EYES 2 // Number of eyes to display (1 or 2)
     40 
     41 #define BLINK_PIN   -1 // Pin for manual blink button (BOTH eyes)
     42 #define LH_WINK_PIN -1 // Left wink pin (set to -1 for no pin)
     43 #define RH_WINK_PIN -1 // Right wink pin (set to -1 for no pin)
     44 
     45 // This table contains ONE LINE PER EYE.  The table MUST be present with
     46 // this name and contain ONE OR MORE lines.  Each line contains THREE items:
     47 // a pin number for the corresponding TFT/OLED display's SELECT line, a pin
     48 // pin number for that eye's "wink" button (or -1 if not used), a screen
     49 // rotation value (0-3) and x position offset for that eye.
     50 
     51 #if (NUM_EYES == 2)
     52   eyeInfo_t eyeInfo[] = {
     53     { TFT1_CS, LH_WINK_PIN, TFT_1_ROT, EYE_1_XPOSITION }, // LEFT EYE chip select and wink pins, rotation and offset
     54     { TFT2_CS, RH_WINK_PIN, TFT_2_ROT, EYE_2_XPOSITION }, // RIGHT EYE chip select and wink pins, rotation and offset
     55   };
     56 #else
     57   eyeInfo_t eyeInfo[] = {
     58     { TFT1_CS, LH_WINK_PIN, TFT_1_ROT, EYE_1_XPOSITION }, // EYE chip select and wink pins, rotation and offset
     59   };
     60 #endif
     61 
     62 // INPUT SETTINGS (for controlling eye motion) -----------------------------
     63 
     64 // JOYSTICK_X_PIN and JOYSTICK_Y_PIN specify analog input pins for manually
     65 // controlling the eye with an analog joystick.  If set to -1 or if not
     66 // defined, the eye will move on its own.
     67 // IRIS_PIN speficies an analog input pin for a photocell to make pupils
     68 // react to light (or potentiometer for manual control).  If set to -1 or
     69 // if not defined, the pupils will change on their own.
     70 // BLINK_PIN specifies an input pin for a button (to ground) that will
     71 // make any/all eyes blink.  If set to -1 or if not defined, the eyes will
     72 // only blink if AUTOBLINK is defined, or if the eyeInfo[] table above
     73 // includes wink button settings for each eye.
     74 
     75 //#define JOYSTICK_X_PIN A0 // Analog pin for eye horiz pos (else auto)
     76 //#define JOYSTICK_Y_PIN A1 // Analog pin for eye vert position (")
     77 //#define JOYSTICK_X_FLIP   // If defined, reverse stick X axis
     78 //#define JOYSTICK_Y_FLIP   // If defined, reverse stick Y axis
     79 #define TRACKING            // If defined, eyelid tracks pupil
     80 #define AUTOBLINK           // If defined, eyes also blink autonomously
     81 
     82 //  #define LIGHT_PIN      -1 // Light sensor pin
     83   #define LIGHT_CURVE  0.33 // Light sensor adjustment curve
     84   #define LIGHT_MIN       0 // Minimum useful reading from light sensor
     85   #define LIGHT_MAX    1023 // Maximum useful reading from sensor
     86 
     87 #define IRIS_SMOOTH         // If enabled, filter input from IRIS_PIN
     88 #if !defined(IRIS_MIN)      // Each eye might have its own MIN/MAX
     89   #define IRIS_MIN       90 // Iris size (0-1023) in brightest light
     90 #endif
     91 #if !defined(IRIS_MAX)
     92   #define IRIS_MAX      130 // Iris size (0-1023) in darkest light
     93 #endif