Added option to use button joystic instead of accelerometer based joystick. Set as default now
This commit is contained in:
@@ -1,30 +1,33 @@
|
||||
/*
|
||||
TWANG32 - An ESP32 port of TWANG
|
||||
(c) B. Dring 3/2018
|
||||
License: Creative Commons 4.0 Attribution - Share Alike
|
||||
TWANG32 - An ESP32 port of TWANG
|
||||
(c) B. Dring 3/2018
|
||||
License: Creative Commons 4.0 Attribution - Share Alike
|
||||
|
||||
TWANG was originally created by Critters
|
||||
https://github.com/Critters/TWANG
|
||||
TWANG was originally created by Critters
|
||||
https://github.com/Critters/TWANG
|
||||
|
||||
Basic hardware definitions
|
||||
Basic hardware definitions
|
||||
|
||||
Light Strip Notes:
|
||||
Light Strip Notes:
|
||||
|
||||
Noepixel / WS2812
|
||||
- Low Cost
|
||||
- You might already have a strip.
|
||||
- No Clock Line - This means a fixed and relatively slow data rate and only shorter strips can be used
|
||||
- Poor Dynamic Range - The low end of brightness is basically not visible
|
||||
Dotstar (Highly recommended)
|
||||
- Higher Cost
|
||||
- Higher speed - Longer strips can be used.
|
||||
- Great dynamic range, so lower levels and more colors can be used.
|
||||
Noepixel / WS2812
|
||||
- Low Cost
|
||||
- You might already have a strip.
|
||||
- No Clock Line - This means a fixed and relatively slow data rate and only shorter strips can be used
|
||||
- Poor Dynamic Range - The low end of brightness is basically not visible
|
||||
Dotstar (Highly recommended)
|
||||
- Higher Cost
|
||||
- Higher speed - Longer strips can be used.
|
||||
- Great dynamic range, so lower levels and more colors can be used.
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
/* Uncomment below to use the accelerometer base joystic of original implementation */
|
||||
//#define USE_GYRO_JOYSTICK
|
||||
|
||||
#define DATA_PIN 16
|
||||
#define CLOCK_PIN 17
|
||||
@@ -40,28 +43,28 @@
|
||||
|
||||
// Check to make sure LED choice was done right
|
||||
#if !defined(USE_NEOPIXEL) && !defined(USE_APA102)
|
||||
#error "You must have USE_APA102 or USE_NEOPIXEL defined in config.h"
|
||||
#error "You must have USE_APA102 or USE_NEOPIXEL defined in config.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_NEOPIXEL) && defined(USE_APA102)
|
||||
#error "Both USE_APA102 and USE_NEOPIXEL are defined in config.h. Only one can be used"
|
||||
#error "Both USE_APA102 and USE_NEOPIXEL are defined in config.h. Only one can be used"
|
||||
#endif
|
||||
|
||||
#ifdef USE_APA102
|
||||
#define LED_TYPE APA102
|
||||
#define LED_COLOR_ORDER BGR // typically this will be the order, but switch it if not
|
||||
#define CONVEYOR_BRIGHTNESS 8
|
||||
#define LAVA_OFF_BRIGHTNESS 4
|
||||
#define MAX_LEDS VIRTUAL_LED_COUNT // these LEDS can handle the max
|
||||
#define MIN_REDRAW_INTERVAL 1000.0 / 60.0 // divide by frames per second..if you tweak, adjust player speed
|
||||
#define LED_TYPE APA102
|
||||
#define LED_COLOR_ORDER BGR // typically this will be the order, but switch it if not
|
||||
#define CONVEYOR_BRIGHTNESS 8
|
||||
#define LAVA_OFF_BRIGHTNESS 4
|
||||
#define MAX_LEDS VIRTUAL_LED_COUNT // these LEDS can handle the max
|
||||
#define MIN_REDRAW_INTERVAL 1000.0 / 60.0 // divide by frames per second..if you tweak, adjust player speed
|
||||
#endif
|
||||
|
||||
#ifdef USE_NEOPIXEL
|
||||
#define LED_TYPE NEOPIXEL
|
||||
#define CONVEYOR_BRIGHTNESS 40 // low neopixel values are nearly off, Neopixels need a higher value
|
||||
#define LAVA_OFF_BRIGHTNESS 15 // low neopixel values are nearly off, Neopixels need a higher value
|
||||
#define MAX_LEDS 288 // Neopixels cannot handle the framerate
|
||||
#define MIN_REDRAW_INTERVAL 1000.0 / 60.0 // divide by frames per second..if you tweak adjust player speed
|
||||
#define LED_TYPE NEOPIXEL
|
||||
#define CONVEYOR_BRIGHTNESS 40 // low neopixel values are nearly off, Neopixels need a higher value
|
||||
#define LAVA_OFF_BRIGHTNESS 15 // low neopixel values are nearly off, Neopixels need a higher value
|
||||
#define MAX_LEDS 288 // Neopixels cannot handle the framerate
|
||||
#define MIN_REDRAW_INTERVAL 1000.0 / 60.0 // divide by frames per second..if you tweak adjust player speed
|
||||
#endif
|
||||
|
||||
// Comment or remove the next #define to disable the /metrics endpoint on the HTTP server.
|
||||
|
||||
Reference in New Issue
Block a user