mirror of
https://github.com/SpacehuhnTech/esp8266_deauther.git
synced 2025-12-22 14:40:05 +01:00
Reworked A_Config.h
Now all hardware configurations are in one file and it's just a matter of commenting out one line to switch from one board to another.
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 12
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE D-duino-b-v5 with the LED Ring Shield
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 12 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |Disabled |
|
||||
@@ -1,28 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 10
|
||||
#define BUTTON_DOWN 9
|
||||
#define BUTTON_A 14
|
||||
#define BUTTON_B 12
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE Deauther Boy
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 10 |
|
||||
| Button Down | GPIO 9 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |GPIO 12 |
|
||||
@@ -1,82 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include "SH1106Wire.h"
|
||||
#include "SSD1306Wire.h"
|
||||
#include "SH1106Spi.h"
|
||||
#include "SSD1306Spi.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of LED you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
//#define DIGITAL_LED
|
||||
//#define RGB_LED
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust following settings for your type of LED
|
||||
you can ignore the rest of the #define's
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
|
||||
// === Settings for Digital LED and RGB LED === //
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
|
||||
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
|
||||
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
|
||||
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust the pins to match your setup
|
||||
Comment out the buttons you don't use.
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
//#define BUTTON_LEFT 12
|
||||
//#define BUTTON_RIGHT 13
|
||||
//#define BUTTON_B 10
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of display you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
0x3c = I2C address
|
||||
SDA = GPIO 5 (D1)
|
||||
SCL/SCK = GPIO 4 (D2) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
/* RST = GPIO 5 (D1)
|
||||
DC = GPIO 4 (D2)
|
||||
CS = GPIO 15 (D8) or GND
|
||||
SCK/SCL = GPIO 14 (D5)
|
||||
SDA/MOSI = GPIO 13 (D7) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
|
||||
//#define DEAUTHER_DISPLAY SH1106Spi display = SH1106Spi(5, 4, 15); // for 1.3" OLED with SPI
|
||||
|
||||
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE Deauther v3 & DSTIKE NodeMCU-07 v2
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812b) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
||||
@@ -1,27 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE Deauther OLED v1.5S
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
||||
@@ -1,25 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define DIGITAL_LED
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,18 +0,0 @@
|
||||
# DSTIKE Deauther OLED v1 - v1.5
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | GPIO 16 |
|
||||
| LED G | disabled |
|
||||
| LED B | GPIO 2 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define DIGITAL_LED
|
||||
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,18 +0,0 @@
|
||||
# DSTIKE Deauther OLED v2 - v3
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | GPIO 16 |
|
||||
| LED G | disabled |
|
||||
| LED B | GPIO 2 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE Deauther OLED v3.5, v4 & DSTIKE Deauth Monster
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
||||
@@ -1,25 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 4
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE USB Deauther v2
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812b) |
|
||||
| LED Pin | GPIO 4 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up | disabled |
|
||||
| Button Down | disabled |
|
||||
| Button A | disabled |
|
||||
| Button B | disabled |
|
||||
@@ -1,28 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SH1106Wire.h"
|
||||
// =========================== //
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define NEOPIXEL_LED
|
||||
#define HIGHLIGHT_LED 16
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRBW + NEO_KHZ800
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY true // default display setting
|
||||
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,17 +0,0 @@
|
||||
# DSTIKE Deauther Wristband and Deauther Mini
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Neopixel (WS2812) |
|
||||
| LED Pin | GPIO 15 |
|
||||
| Number of LEDs | 1 |
|
||||
| Highlight LED | 16 |
|
||||
| Display and buttons enabled | YES |
|
||||
| Display Driver | SH1106 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | No |
|
||||
| Button Up |GPIO 12 |
|
||||
| Button Down | GPIO 13 |
|
||||
| Button A | GPIO 14 |
|
||||
| Button B |disabled |
|
||||
@@ -1,83 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include "SH1106Wire.h"
|
||||
#include "SSD1306Wire.h"
|
||||
#include "SH1106Spi.h"
|
||||
#include "SSD1306Spi.h"
|
||||
// =========================== //
|
||||
|
||||
//#define DEFAULT_SSID "pwned"
|
||||
//#define HIGHLIGHT_LED 16
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of LED you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define DIGITAL_LED
|
||||
//#define RGB_LED
|
||||
//#define NEOPIXEL_LED
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust following settings for your type of LED
|
||||
you can ignore the rest of the #define's
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
|
||||
// === Settings for Digital LED and RGB LED === //
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
|
||||
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
|
||||
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
|
||||
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust the pins to match your setup
|
||||
Comment out the buttons you don't use.
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define BUTTON_UP 14
|
||||
#define BUTTON_DOWN 12
|
||||
#define BUTTON_A 13
|
||||
|
||||
//#define BUTTON_LEFT 12
|
||||
//#define BUTTON_RIGHT 13
|
||||
//#define BUTTON_B 10
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of display you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
*/
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
//#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
|
||||
/* RST = GPIO 5 (D1)
|
||||
DC = GPIO 4 (D2)
|
||||
CS = GPIO 15 (D8) or GND
|
||||
SCK/SCL = GPIO 14 (D5)
|
||||
SDA/MOSI = GPIO 13 (D7) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Spi display = SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
|
||||
//#define DEAUTHER_DISPLAY SH1106Spi display = SH1106Spi(5, 4, 15); // for 1.3" OLED with SPI
|
||||
|
||||
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,20 +0,0 @@
|
||||
# Default Config
|
||||
Default configuration for all boards without using a display or RGB LED.
|
||||
The display can be enabled over the settings.
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | GPIO 2 |
|
||||
| LED G | disabled |
|
||||
| LED B | GPIO 16 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 14 (D5) |
|
||||
| Button Down | GPIO 12 (D6) |
|
||||
| Button A | GPIO 13 (D7) |
|
||||
| Button B |disabled |
|
||||
@@ -1,29 +0,0 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include "SSD1306Wire.h"
|
||||
// =========================== //
|
||||
|
||||
#define DEFAULT_SSID "Dickbutt " + bytesToStr(&(settings.getMacAP()[3]), 3)
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
#define DIGITAL_LED
|
||||
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 255 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
|
||||
#define BUTTON_UP 14
|
||||
#define BUTTON_DOWN 12
|
||||
#define BUTTON_A 13
|
||||
|
||||
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
// ========================================================= //
|
||||
|
||||
#endif
|
||||
@@ -1,22 +0,0 @@
|
||||
# MrRobotBadge Dickbutt Shitty Addon
|
||||
|
||||
-> https://twitter.com/MrRobotBadge
|
||||
|
||||
Has a default SSID "Dickbutt 00:11:22" (00:11:22 = last 3 bytes of the MAC address)
|
||||
|
||||
| | |
|
||||
| - | - |
|
||||
| LED Type | Digital |
|
||||
| LED R | disabled |
|
||||
| LED G | disabled |
|
||||
| LED B | 2 |
|
||||
| Highlight LED | disabled |
|
||||
| Display and buttons enabled | NO |
|
||||
| Display Driver | SSD1306 |
|
||||
| Display SDA | GPIO 5 (D1) |
|
||||
| Display SCL | GPIO 4 (D2) |
|
||||
| Flip Display | NO |
|
||||
| Button Up |GPIO 14 (D5) |
|
||||
| Button Down | GPIO 12 (D6) |
|
||||
| Button A | GPIO 13 (D7) |
|
||||
| Button B |disabled |
|
||||
@@ -1,26 +0,0 @@
|
||||
# Config Files
|
||||
|
||||
Here you find a bunch of modified config files for different boards.
|
||||
The default config should be fine for all boards that don't have a display or a RGB LED (like the NodeMCU).
|
||||
|
||||
Copy the `A_config.h` file and paste it in the Arduino sektch and replace the default config file.
|
||||
|
||||
- [Default Config (NodeMCU, Wemos d1 mini, ...)](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
|
||||
- DSTIKE Deauther (without OLED)
|
||||
- [DSTIKE Deauther v1, v2, v3](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
- [DSTIKE Deauther v3.5](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Deauther_v3.5_and_NodeMCU-07_v2/A_config.h)
|
||||
- DSTIKE Deauther OLED
|
||||
- [DSTIKE Deauther OLED v1, v1.5](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v1_v1.5/A_config.h)
|
||||
- [DSTIKE Deauther OLED v1.5S (with RGB)](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v1.5S/A_config.h)
|
||||
- [DSTIKE Deauther OLED v2, v2.5, v3](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v2_v2.5_v3/A_config.h)
|
||||
- [DSTIKE Deauther OLED v3.5, v4](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v3.5_v4_Monster/A_config.h)
|
||||
- [DSTIKE Deauther OLED Mini](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Wristband_Mini/A_config.h)
|
||||
- [DSTIKE Deauther Wristband](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Wristband_Mini/A_config.h)
|
||||
- [DSTIKE Deauther Monster](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_OLED_v3.5_v4_Monster/A_config.h)
|
||||
- [DSTIKE Deauther Boy](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Deauther_Boy/A_config.h)
|
||||
- [DSTIKE NodeMCU-07 v1](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
- [DSTIKE NodeMCU-07 v2](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_Deauther_v3.5_and_NodeMCU-07_v2/A_config.h)
|
||||
- [DSTIKE USB Deauther v1](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/Default/A_config.h)
|
||||
- [DSTIKE USB Deauther v2 (with RGB)](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_USB_Deauther_v2/A_config.h)
|
||||
- [DSTIKE D-duino with LED Ring Shield](https://github.com/spacehuhn/esp8266_deauther/blob/master/configs/DSTIKE_D-duino_with_LED_Ring_Shield/A_config.h)
|
||||
@@ -1,83 +1,331 @@
|
||||
#ifndef config_h
|
||||
#define config_h
|
||||
|
||||
// ===== DISPLAY LIBRARY ===== //
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include "SH1106Wire.h"
|
||||
#include "SSD1306Wire.h"
|
||||
#include "SH1106Spi.h"
|
||||
#include "SSD1306Spi.h"
|
||||
// =========================== //
|
||||
/* !!! Uncomment the board taht you're using !!! */
|
||||
|
||||
//#define DEFAULT_SSID "pwned"
|
||||
//#define HIGHLIGHT_LED 16
|
||||
// #define NODEMCU
|
||||
// #define WEMOS_D1_MINI
|
||||
// #define USB_DEAUTHER
|
||||
// #define DEAUTHER
|
||||
// #define DEAUTHER_V1
|
||||
// #define DEAUTHER_V2
|
||||
// #define DEAUTHER_V3
|
||||
// #define D_DUINO_B_V5_LED_RING
|
||||
// #define DEAUTHER_BOY
|
||||
// #define DEAUTHER_V3_5
|
||||
// #define NODEMCU_07
|
||||
// #define NODEMCU_07_V2
|
||||
// #define DEAUTHER_OLED_V1_5_S
|
||||
// #define DEAUTHER_OLED
|
||||
// #define DEAUTHER_OLED_V1_5
|
||||
// #define DEAUTHER_OLED_V2
|
||||
// #define DEAUTHER_OLED_V2_5
|
||||
// #define DEAUTHER_OLED_V3
|
||||
// #define DEAUTHER_OLED_V3_5
|
||||
// #define DEAUTHER_OLED_V4
|
||||
// #define DEAUTHER_MOSTER
|
||||
// #define USB_DEAUTHER
|
||||
// #define USB_DEAUTHER_V2
|
||||
// #define DEAUTHER_WRISTBAND
|
||||
// #define DEAUTHER_WRISTBAND_V2
|
||||
// #define DEAUTHER_MINI
|
||||
|
||||
// ===================== LED CONFIG ==================== //
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of LED you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define DIGITAL_LED
|
||||
//#define RGB_LED
|
||||
//#define NEOPIXEL_LED
|
||||
#define DEFAULT_ESP8266
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust following settings for your type of LED
|
||||
you can ignore the rest of the #define's
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
// ========== CONFIGS ========== //
|
||||
#if defined(DEFAULT_ESP8266) || defined(NODEMCU) || defined(WEMOS_D1_MINI) || defined(USB_DEAUTHER) || defined(NODEMCU_07) || defined(DEAUTHER) || defined(DEAUTHER_V1) || defined(DEAUTHER_V2) || defined(DEAUTHER_V3)
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
|
||||
// === Settings for Digital LED and RGB LED === //
|
||||
#define LED_ANODE false // common vcc (+)
|
||||
#define LED_PIN_R 16 // NodeMCU on-board LED
|
||||
#define LED_PIN_G 255 // 255 = LED disabled
|
||||
#define LED_PIN_B 2 // ESP-12 LED
|
||||
#elif defined(D_DUINO_B_V5_LED_RING)
|
||||
|
||||
// === Settings for RGB LED and Neopixel LED === //
|
||||
#define LED_MODE_BRIGHTNESS 10 // brightness of LED modes
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 12
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// === Settings for Neopixel LED === //
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
#define LED_NEOPIXEL_MODE NEO_GRB + NEO_KHZ800
|
||||
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
|
||||
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
|
||||
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
|
||||
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
|
||||
// NEO_RGBW Pixels are wired for RGBW bitstream (NeoPixel RGBW products)
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===================== DISPLAY CONFIG ==================== //
|
||||
#define USE_DISPLAY false // default display setting
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Adjust the pins to match your setup
|
||||
Comment out the buttons you don't use.
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
|
||||
#define BUTTON_UP 14
|
||||
#define BUTTON_DOWN 12
|
||||
#define BUTTON_A 13
|
||||
#elif defined(DEAUTHER_BOY)
|
||||
|
||||
//#define BUTTON_LEFT 12
|
||||
//#define BUTTON_RIGHT 13
|
||||
//#define BUTTON_B 10
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
/* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
Uncomment the type of display you're using
|
||||
Only one of them can be defined at a time!
|
||||
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
||||
*/
|
||||
#define DEAUTHER_DISPLAY SSD1306Wire display = SSD1306Wire(0x3c, 5, 4); // for 0.96" OLED
|
||||
//#define DEAUTHER_DISPLAY SH1106Wire display = SH1106Wire(0x3c, 5, 4); // for 1.3" OLED
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
/* RST = GPIO 5 (D1)
|
||||
DC = GPIO 4 (D2)
|
||||
CS = GPIO 15 (D8) or GND
|
||||
SCK/SCL = GPIO 14 (D5)
|
||||
SDA/MOSI = GPIO 13 (D7) */
|
||||
//#define DEAUTHER_DISPLAY SSD1306Spi display = SSD1306Spi(5, 4, 15); // for 0.96" OLED with SPI
|
||||
//#define DEAUTHER_DISPLAY SH1106Spi display = SH1106Spi(5, 4, 15); // for 1.3" OLED with SPI
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 10
|
||||
#define BUTTON_DOWN 9
|
||||
#define BUTTON_A 14
|
||||
#define BUTTON_B 12
|
||||
|
||||
//#define FLIP_DIPLAY // uncomment that to flip the display vertically
|
||||
// ========================================================= //
|
||||
#elif defined(DEAUTHER_V3_5) || defined(NODEMCU_07_V2)
|
||||
|
||||
#endif
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
#elif defined(DEAUTHER_OLED_V1_5_S)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_OLED) || defined(DEAUTHER_OLED_V1_5)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
|
||||
#define LED_PIN_R 16
|
||||
#define LED_PIN_B 2
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SSD1306_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_OLED_V2) || defined(DEAUTHER_OLED_V2_5) || defined(DEAUTHER_OLED_V3)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
|
||||
#define LED_PIN_R 16
|
||||
#define LED_PIN_B 2
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(DEAUTHER_OLED_V3_5) || defined(DEAUTHER_OLED_V4) || defined(DEAUTHER_MOSTER)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
|
||||
#elif defined(USB_DEAUTHER_V2)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 4
|
||||
|
||||
#elif defined(DEAUTHER_WRISTBAND) || defined(DEAUTHER_WRISTBAND_V2) || defined(DEAUTHER_MINI)
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_NEOPIXEL_GRB
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 15
|
||||
|
||||
#define HIGHLIGHT_LED 16
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define SH1106_I2C
|
||||
#define FLIP_DIPLAY true
|
||||
#define DISPLAY_TEXT "Hardware by DSTIKE"
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 12
|
||||
#define BUTTON_DOWN 13
|
||||
#define BUTTON_A 14
|
||||
#endif /* if defined(DEFAULT_ESP8266) || defined(NODEMCU) || defined(WEMOS_D1_MINI) || defined(USB_DEAUTHER) || defined(NODEMCU_07) || defined(DEAUTHER) || defined(DEAUTHER_V1) || defined(DEAUTHER_V2) || defined(DEAUTHER_V3) */
|
||||
// ============================== //
|
||||
|
||||
|
||||
// ========= FALLBACK ========= //
|
||||
|
||||
#ifndef DEFAULT_SSID
|
||||
#define DEFAULT_SSID "pwned"
|
||||
#endif /* ifndef DEFAULT_SSID */
|
||||
|
||||
// ===== LED ===== //
|
||||
#ifndef LED_PIN_R
|
||||
#define LED_PIN_R 255
|
||||
#endif /* ifndef LED_PIN_R */
|
||||
|
||||
#ifndef LED_PIN_G
|
||||
#define LED_PIN_G 255
|
||||
#endif /* ifndef LED_PIN_G */
|
||||
|
||||
#ifndef LED_PIN_B
|
||||
#define LED_PIN_B 255
|
||||
#endif /* ifndef LED_PIN_B */
|
||||
|
||||
#ifndef LED_ANODE
|
||||
#define LED_ANODE false
|
||||
#endif /* ifndef LED_ANODE */
|
||||
|
||||
#ifndef LED_MODE_BRIGHTNESS
|
||||
#define LED_MODE_BRIGHTNESS 10
|
||||
#endif /* ifndef LED_MODE_BRIGHTNESS */
|
||||
|
||||
#if defined(LED_NEOPIXEL_RGB) || defined(LED_NEOPIXEL_GRB)
|
||||
#define NEOPIXEL_LED
|
||||
#endif /* if defined(LED_NEOPIXEL_RGB) || defined(LED_NEOPIXEL_GRB) */
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#ifndef DISPLAY_TEXT
|
||||
#define DISPLAY_TEXT ""
|
||||
#endif /* ifndef DISPLAY_TEXT */
|
||||
|
||||
#ifndef FLIP_DIPLAY
|
||||
#define FLIP_DIPLAY false
|
||||
#endif /* ifndef USE_DISPLAY */
|
||||
|
||||
#if !defined(SSD1306_I2C) && !defined(SSD1306_SPI) && !defined(SH1106_I2C) && !defined(SH1106_SPI)
|
||||
#define SSD1306_I2C
|
||||
#define USE_DISPLAY false
|
||||
#else /* if !defined(SSD1306_I2C) && !defined(SSD1306_SPI) && !defined(SH1106_I2C) && !defined(SH1106_SPI) */
|
||||
#define USE_DISPLAY true
|
||||
#endif /* if !defined(SSD1306_I2C) && !defined(SSD1306_SPI) && !defined(SH1106_I2C) && !defined(SH1106_SPI) */
|
||||
|
||||
#ifndef I2C_ADDR
|
||||
#define I2C_ADDR 0x3C
|
||||
#endif /* ifndef I2C_ADDR */
|
||||
|
||||
#ifndef I2C_SDA
|
||||
#define I2C_SDA 5
|
||||
#endif /* ifndef I2C_SDA */
|
||||
|
||||
#ifndef I2C_SCL
|
||||
#define I2C_SCL 4
|
||||
#endif /* ifndef I2C_SCL */
|
||||
|
||||
#ifndef SPI_RES
|
||||
#define SPI_RES 5
|
||||
#endif /* ifndef SPI_RES */
|
||||
|
||||
#ifndef SPI_DC
|
||||
#define SPI_DC 4
|
||||
#endif /* ifndef SPI_DC */
|
||||
|
||||
#ifndef SPI_CS
|
||||
#define SPI_CS 15
|
||||
#endif /* ifndef SPI_CS */
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#ifndef BUTTON_UP
|
||||
#define BUTTON_UP 255
|
||||
#endif // ifndef BUTTON_UP
|
||||
|
||||
#ifndef BUTTON_DOWN
|
||||
#define BUTTON_DOWN 255
|
||||
#endif // ifndef BUTTON_DOWN
|
||||
|
||||
#ifndef BUTTON_A
|
||||
#define BUTTON_A 255
|
||||
#endif // ifndef BUTTON_A
|
||||
|
||||
#ifndef BUTTON_B
|
||||
#define BUTTON_B 255
|
||||
#endif // ifndef BUTTON_B
|
||||
|
||||
// ======== AVAILABLE SETTINGS ========== //
|
||||
|
||||
/*
|
||||
#define DEFAULT_SSID "something"
|
||||
|
||||
// ===== LED ===== //
|
||||
#define LED_DIGITAL
|
||||
#define LED_RGB
|
||||
#define LED_NEOPIXEL
|
||||
#define MY92
|
||||
|
||||
#define LED_ANODE false
|
||||
|
||||
#define LED_PIN_R 16
|
||||
#define LED_PIN_G 255
|
||||
#define LED_PIN_B 2
|
||||
|
||||
#define LED_NEOPIXEL_RGB
|
||||
#define LED_NEOPIXEL_GRB
|
||||
|
||||
#define LED_NEOPIXEL_NUM 1
|
||||
#define LED_NEOPIXEL_PIN 255
|
||||
|
||||
#define LED_MODE_BRIGHTNESS 100
|
||||
|
||||
#define MY92_NUM 1
|
||||
#define MY92_DATA 4
|
||||
#define MY92_CLOCK 5
|
||||
#define MY92_CH_R 0
|
||||
#define MY92_CH_G 1
|
||||
#define MY92_CH_B 2
|
||||
#define MY92_CH_BRIGHTNESS 3
|
||||
#define MY92_MODEL MY92XX_MODEL_MY9291
|
||||
#define MY92_MODEL MY92XX_MODEL_MY9231
|
||||
|
||||
// ===== DISPLAY ===== //
|
||||
#define USE_DISPLAY false
|
||||
#define FLIP_DIPLAY false
|
||||
|
||||
#define SSD1306_I2C
|
||||
#define SSD1306_SPI
|
||||
#define SH1106_I2C
|
||||
#define SH1106_SPI
|
||||
|
||||
#define I2C_ADDR 0x3C
|
||||
#define I2C_SDA 5
|
||||
#define I2C_SCL 4
|
||||
|
||||
#define SPI_RES 5
|
||||
#define SPI_DC 4
|
||||
#define SPI_CS 15
|
||||
|
||||
// ===== BUTTONS ===== //
|
||||
#define BUTTON_UP 255
|
||||
#define BUTTON_DOWN 255
|
||||
#define BUTTON_A 255
|
||||
#define BUTTON_B 255
|
||||
|
||||
*/
|
||||
|
||||
#endif /* ifndef config_h */
|
||||
@@ -14,9 +14,7 @@ void DisplayUI::configInit() {
|
||||
|
||||
display.setContrast(255);
|
||||
|
||||
#ifndef FLIP_DIPLAY
|
||||
display.flipScreenVertically();
|
||||
#endif // ifndef FLIP_DIPLAY
|
||||
if (FLIP_DIPLAY) display.flipScreenVertically();
|
||||
|
||||
display.clear();
|
||||
display.display();
|
||||
@@ -504,7 +502,7 @@ void DisplayUI::setupButtons() {
|
||||
// === BUTTON UP === //
|
||||
up->setOnClicked([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
|
||||
if (!tempOff) {
|
||||
@@ -521,7 +519,7 @@ void DisplayUI::setupButtons() {
|
||||
|
||||
up->setOnHolding([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
if (!tempOff) {
|
||||
if (mode == DISPLAY_MODE::MENU) { // when in menu, go up or down with cursor
|
||||
@@ -538,7 +536,7 @@ void DisplayUI::setupButtons() {
|
||||
// === BUTTON DOWN === //
|
||||
down->setOnClicked([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
if (!tempOff) {
|
||||
if (mode == DISPLAY_MODE::MENU) { // when in menu, go up or down with cursor
|
||||
@@ -554,7 +552,7 @@ void DisplayUI::setupButtons() {
|
||||
|
||||
down->setOnHolding([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
if (!tempOff) {
|
||||
if (mode == DISPLAY_MODE::MENU) { // when in menu, go up or down with cursor
|
||||
@@ -564,7 +562,7 @@ void DisplayUI::setupButtons() {
|
||||
scan.setChannel(wifi_channel - 1);
|
||||
}
|
||||
|
||||
else if (mode == DISPLAY_MODE::CLOCK) { // when in packet monitor, change channel
|
||||
else if (mode == DISPLAY_MODE::CLOCK) { // when in packet monitor, change channel
|
||||
setTime(clockHour, clockMinute - 10, clockSecond);
|
||||
}
|
||||
}
|
||||
@@ -573,35 +571,35 @@ void DisplayUI::setupButtons() {
|
||||
// === BUTTON A === //
|
||||
a->setOnClicked([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
if (!tempOff) {
|
||||
switch (mode) {
|
||||
case DISPLAY_MODE::MENU:
|
||||
case DISPLAY_MODE::MENU:
|
||||
|
||||
if (currentMenu->list->get(currentMenu->selected).click) {
|
||||
currentMenu->list->get(currentMenu->selected).click();
|
||||
}
|
||||
break;
|
||||
if (currentMenu->list->get(currentMenu->selected).click) {
|
||||
currentMenu->list->get(currentMenu->selected).click();
|
||||
}
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::PACKETMONITOR:
|
||||
case DISPLAY_MODE::LOADSCAN:
|
||||
scan.stop();
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
break;
|
||||
case DISPLAY_MODE::PACKETMONITOR:
|
||||
case DISPLAY_MODE::LOADSCAN:
|
||||
scan.stop();
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::CLOCK:
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
display.setFont(DejaVu_Sans_Mono_12);
|
||||
display.setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
break;
|
||||
case DISPLAY_MODE::CLOCK:
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
display.setFont(DejaVu_Sans_Mono_12);
|
||||
display.setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
a->setOnHolding([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
if (!tempOff) {
|
||||
if (mode == DISPLAY_MODE::MENU) {
|
||||
@@ -615,25 +613,25 @@ void DisplayUI::setupButtons() {
|
||||
// === BUTTON B === //
|
||||
b->setOnClicked([this]() {
|
||||
scrollCounter = 0;
|
||||
scrollTime = currentTime;
|
||||
scrollTime = currentTime;
|
||||
buttonTime = currentTime;
|
||||
if (!tempOff) {
|
||||
switch (mode) {
|
||||
case DISPLAY_MODE::MENU:
|
||||
goBack();
|
||||
break;
|
||||
case DISPLAY_MODE::MENU:
|
||||
goBack();
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::PACKETMONITOR:
|
||||
case DISPLAY_MODE::LOADSCAN:
|
||||
scan.stop();
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
break;
|
||||
case DISPLAY_MODE::PACKETMONITOR:
|
||||
case DISPLAY_MODE::LOADSCAN:
|
||||
scan.stop();
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::CLOCK:
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
display.setFont(DejaVu_Sans_Mono_12);
|
||||
display.setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
break;
|
||||
case DISPLAY_MODE::CLOCK:
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
display.setFont(DejaVu_Sans_Mono_12);
|
||||
display.setTextAlignment(TEXT_ALIGN_LEFT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -658,31 +656,31 @@ void DisplayUI::draw() {
|
||||
}
|
||||
|
||||
switch (mode) {
|
||||
case DISPLAY_MODE::BUTTON_TEST:
|
||||
drawButtonTest();
|
||||
break;
|
||||
case DISPLAY_MODE::BUTTON_TEST:
|
||||
drawButtonTest();
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::MENU:
|
||||
drawMenu();
|
||||
break;
|
||||
case DISPLAY_MODE::MENU:
|
||||
drawMenu();
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::LOADSCAN:
|
||||
drawLoadingScan();
|
||||
break;
|
||||
case DISPLAY_MODE::LOADSCAN:
|
||||
drawLoadingScan();
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::PACKETMONITOR:
|
||||
drawPacketMonitor();
|
||||
break;
|
||||
case DISPLAY_MODE::PACKETMONITOR:
|
||||
drawPacketMonitor();
|
||||
break;
|
||||
|
||||
case DISPLAY_MODE::INTRO:
|
||||
if (currentTime - startTime >= screenIntroTime) {
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
}
|
||||
drawIntro();
|
||||
break;
|
||||
case DISPLAY_MODE::CLOCK:
|
||||
drawClock();
|
||||
break;
|
||||
case DISPLAY_MODE::INTRO:
|
||||
if (currentTime - startTime >= screenIntroTime) {
|
||||
mode = DISPLAY_MODE::MENU;
|
||||
}
|
||||
drawIntro();
|
||||
break;
|
||||
case DISPLAY_MODE::CLOCK:
|
||||
drawClock();
|
||||
break;
|
||||
}
|
||||
|
||||
updateSuffix();
|
||||
@@ -715,9 +713,9 @@ void DisplayUI::drawMenu() {
|
||||
tmp = tmp + tmp;
|
||||
tmp = tmp.substring(scrollCounter, scrollCounter + maxLen - 1);
|
||||
|
||||
if ((scrollCounter > 0 && scrollTime < currentTime - scrollSpeed) || (scrollCounter == 0 && scrollTime < currentTime - scrollSpeed * 4)){
|
||||
scrollTime = currentTime;
|
||||
scrollCounter++;
|
||||
if (((scrollCounter > 0) && (scrollTime < currentTime - scrollSpeed)) || ((scrollCounter == 0) && (scrollTime < currentTime - scrollSpeed * 4))) {
|
||||
scrollTime = currentTime;
|
||||
scrollCounter++;
|
||||
}
|
||||
|
||||
if (scrollCounter > tmpLen) scrollCounter = 0;
|
||||
@@ -752,22 +750,23 @@ void DisplayUI::drawPacketMonitor() {
|
||||
drawString(0, 0, headline);
|
||||
|
||||
if (scan.getMaxPacket() > 0) {
|
||||
int i = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
while(i < SCAN_PACKET_LIST_SIZE && x < screenWidth){
|
||||
y = (sreenHeight-1) - (scan.getPackets(i) * scale);
|
||||
i++;
|
||||
int i = 0;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
||||
//Serial.printf("%d,%d -> %d,%d\n", x, (sreenHeight-1), x, y);
|
||||
drawLine(x, (sreenHeight-1), x, y);
|
||||
x++;
|
||||
while (i < SCAN_PACKET_LIST_SIZE && x < screenWidth) {
|
||||
y = (sreenHeight-1) - (scan.getPackets(i) * scale);
|
||||
i++;
|
||||
|
||||
//Serial.printf("%d,%d -> %d,%d\n", x, (sreenHeight-1), x, y);
|
||||
drawLine(x, (sreenHeight-1), x, y);
|
||||
x++;
|
||||
}
|
||||
//Serial.println("---------");
|
||||
// Serial.printf("%d,%d -> %d,%d\n", x, (sreenHeight-1), x, y);
|
||||
drawLine(x, (sreenHeight-1), x, y);
|
||||
x++;
|
||||
|
||||
// Serial.printf("%d,%d -> %d,%d\n", x, (sreenHeight-1), x, y);
|
||||
drawLine(x, (sreenHeight-1), x, y);
|
||||
x++;
|
||||
}
|
||||
// Serial.println("---------");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,13 @@
|
||||
#include "Scan.h"
|
||||
#include "Attack.h"
|
||||
|
||||
#include <Wire.h>
|
||||
#include <SPI.h>
|
||||
#include <SH1106Wire.h>
|
||||
#include <SSD1306Wire.h>
|
||||
#include <SH1106Spi.h>
|
||||
#include <SSD1306Spi.h>
|
||||
|
||||
#include <SimpleButton.h>
|
||||
|
||||
using namespace simplebutton;
|
||||
@@ -32,35 +39,18 @@ extern String replaceUtf8(String str, String r);
|
||||
const char D_INTRO_0[] PROGMEM = "";
|
||||
const char D_INTRO_1[] PROGMEM = "ESP8266 Deauther";
|
||||
const char D_INTRO_2[] PROGMEM = "by @Spacehuhn";
|
||||
const char D_INTRO_3[] PROGMEM = "";
|
||||
|
||||
// fallback for the buttons
|
||||
#ifndef BUTTON_UP
|
||||
#define BUTTON_UP 255
|
||||
#endif // ifndef BUTTON_UP
|
||||
|
||||
#ifndef BUTTON_DOWN
|
||||
#define BUTTON_DOWN 255
|
||||
#endif // ifndef BUTTON_DOWN
|
||||
|
||||
#ifndef BUTTON_A
|
||||
#define BUTTON_A 255
|
||||
#endif // ifndef BUTTON_A
|
||||
|
||||
#ifndef BUTTON_B
|
||||
#define BUTTON_B 255
|
||||
#endif // ifndef BUTTON_B
|
||||
const char D_INTRO_3[] PROGMEM = DISPLAY_TEXT;
|
||||
|
||||
struct MenuNode {
|
||||
std::function<String()>getStr; // function used to create the displayed string
|
||||
std::function<void()> click; // function that is executed when node is clicked
|
||||
std::function<void()> hold; // function that is executed when node is pressed for > 800ms
|
||||
std::function<void()> click; // function that is executed when node is clicked
|
||||
std::function<void()> hold; // function that is executed when node is pressed for > 800ms
|
||||
};
|
||||
|
||||
struct Menu {
|
||||
SimpleList<MenuNode>* list;
|
||||
Menu * parentMenu;
|
||||
uint8_t selected;
|
||||
SimpleList<MenuNode>*list;
|
||||
Menu * parentMenu;
|
||||
uint8_t selected;
|
||||
std::function<void()> build; // function that is executed when button is clicked
|
||||
};
|
||||
|
||||
@@ -68,8 +58,8 @@ class DisplayUI {
|
||||
public:
|
||||
enum DISPLAY_MODE { OFF = 0, BUTTON_TEST = 1, MENU = 2, LOADSCAN = 3, PACKETMONITOR = 4, INTRO = 5, CLOCK = 6 };
|
||||
|
||||
uint8_t mode = DISPLAY_MODE::MENU;
|
||||
bool highlightLED = false;
|
||||
uint8_t mode = DISPLAY_MODE::MENU;
|
||||
bool highlightLED = false;
|
||||
|
||||
Button* up = NULL;
|
||||
Button* down = NULL;
|
||||
@@ -77,16 +67,24 @@ class DisplayUI {
|
||||
Button* b = NULL;
|
||||
|
||||
// ===== adjustable ===== //
|
||||
DEAUTHER_DISPLAY // see config.h
|
||||
#if defined(SSD1306_I2C)
|
||||
SSD1306Wire display = SSD1306Wire(I2C_ADDR, I2C_SDA, I2C_SCL);
|
||||
#elif defined(SSD1306_SPI)
|
||||
SSD1306Spi display = SSD1306Spi(SPI_RES, SPI_DC, SPI_CS);
|
||||
#elif defined(SH1106_I2C)
|
||||
SH1106Wire display = SH1106Wire(I2C_ADDR, I2C_SDA, I2C_SCL);
|
||||
#elif defined(SH1106_SPI)
|
||||
SH1106Spi display = SH1106Spi(SPI_RES, SPI_DC, SPI_CS);
|
||||
#endif /* if defined(SSD1306_I2C) */
|
||||
|
||||
const uint8_t maxLen = 18;
|
||||
const uint8_t lineHeight = 12;
|
||||
const uint8_t buttonDelay = 250;
|
||||
const uint8_t drawInterval = 100; // 100ms = 10 FPS
|
||||
const uint8_t maxLen = 18;
|
||||
const uint8_t lineHeight = 12;
|
||||
const uint8_t buttonDelay = 250;
|
||||
const uint8_t drawInterval = 100; // 100ms = 10 FPS
|
||||
const uint16_t scrollSpeed = 500; // time interval in ms
|
||||
const uint16_t screenIntroTime = 2500;
|
||||
const uint16_t screenWidth = 128;
|
||||
const uint16_t sreenHeight = 64;
|
||||
const uint16_t screenWidth = 128;
|
||||
const uint16_t sreenHeight = 64;
|
||||
|
||||
void configInit();
|
||||
void configOn();
|
||||
@@ -111,15 +109,15 @@ class DisplayUI {
|
||||
void off();
|
||||
|
||||
private:
|
||||
int16_t selectedID = 0; // i.e. access point ID to draw the apMenu
|
||||
int16_t selectedID = 0; // i.e. access point ID to draw the apMenu
|
||||
uint8_t scrollCounter = 0; // for horizontal scrolling
|
||||
|
||||
uint32_t scrollTime = 0; // last time a character was moved
|
||||
uint32_t drawTime = 0; // last time a frame was drawn
|
||||
uint32_t startTime = 0; // when the screen was enabled
|
||||
uint32_t buttonTime = 0; // last time a button was pressed
|
||||
uint32_t scrollTime = 0; // last time a character was moved
|
||||
uint32_t drawTime = 0; // last time a frame was drawn
|
||||
uint32_t startTime = 0; // when the screen was enabled
|
||||
uint32_t buttonTime = 0; // last time a button was pressed
|
||||
|
||||
bool enabled = false; // display enabled
|
||||
bool enabled = false; // display enabled
|
||||
bool tempOff = false;
|
||||
|
||||
// selected attack modes
|
||||
|
||||
@@ -26,21 +26,21 @@ class LED {
|
||||
|
||||
uint8_t brightness = 100;
|
||||
|
||||
#if defined(NEOPIXEL_LED)
|
||||
Adafruit_NeoPixel strip(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, LED_NEOPIXEL_MODE);
|
||||
#if defined(LED_NEOPIXEL_RGB)
|
||||
Adafruit_NeoPixel strip = Adafruit_NeoPixel(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, NEO_RGB + NEO_KHZ400);
|
||||
#elif defined(LED_NEOPIXEL_GRB)
|
||||
Adafruit_NeoPixel strip = Adafruit_NeoPixel(LED_NEOPIXEL_NUM, LED_NEOPIXEL_PIN, NEO_GRB + NEO_KHZ400);
|
||||
#elif defined(MY92)
|
||||
my92xx myled(MY92_MODEL, MY92_NUM, MY92_DATA, MY92_CLK, MY92XX_COMMAND_DEFAULT);
|
||||
my92xx myled = my92xx(MY92_MODEL, MY92_NUM, MY92_DATA, MY92_CLK, MY92XX_COMMAND_DEFAULT);
|
||||
#endif // if defined(NEOPIXEL_LED)
|
||||
|
||||
public:
|
||||
void setup() {
|
||||
analogWriteRange(0xff);
|
||||
|
||||
#if defined(LED_MODE_BRIGHTNESS)
|
||||
brightness = LED_MODE_BRIGHTNESS;
|
||||
#endif // if defined(LED_MODE_BRIGHTNESS)
|
||||
|
||||
#if defined(DIGITAL_LED) || defined(RGB_LED)
|
||||
#if defined(LED_DIGITAL) || defined(LED_RGB)
|
||||
if (LED_PIN_R < 255) pinMode(LED_PIN_R, OUTPUT);
|
||||
if (LED_PIN_G < 255) pinMode(LED_PIN_G, OUTPUT);
|
||||
if (LED_PIN_B < 255) pinMode(LED_PIN_B, OUTPUT);
|
||||
@@ -56,7 +56,7 @@ class LED {
|
||||
myled->setChannel(3, 100);
|
||||
myled.setState(true);
|
||||
myled.update();
|
||||
#endif // if defined(DIGITAL_LED) || defined(RGB_LED)
|
||||
#endif // if defined(LED_DIGITAL) || defined(LED_RGB)
|
||||
}
|
||||
|
||||
void update();
|
||||
@@ -74,7 +74,7 @@ class LED {
|
||||
void setColor(uint8_t r, uint8_t g, uint8_t b, bool output = false) {
|
||||
if (output) printColor(r, g, b);
|
||||
|
||||
#if defined(DIGITAL_LED)
|
||||
#if defined(LED_DIGITAL)
|
||||
if (LED_ANODE) {
|
||||
if (LED_PIN_R < 255) digitalWrite(LED_PIN_R, r > 0);
|
||||
if (LED_PIN_G < 255) digitalWrite(LED_PIN_G, g > 0);
|
||||
@@ -84,7 +84,7 @@ class LED {
|
||||
if (LED_PIN_G < 255) digitalWrite(LED_PIN_G, g == 0);
|
||||
if (LED_PIN_B < 255) digitalWrite(LED_PIN_B, b == 0);
|
||||
}
|
||||
#elif defined(RGB_LED)
|
||||
#elif defined(LED_RGB)
|
||||
if ((r > 0) && (brightness > 0)) r = r * brightness / 100;
|
||||
if ((g > 0) && (brightness > 0)) g = g * brightness / 100;
|
||||
if ((b > 0) && (brightness > 0)) b = b * brightness / 100;
|
||||
@@ -99,9 +99,6 @@ class LED {
|
||||
analogWrite(LED_PIN_G, g);
|
||||
analogWrite(LED_PIN_B, b);
|
||||
#elif defined(NEOPIXEL_LED)
|
||||
if ((r > 0) && (brightness > 0)) r = r * brightness / 100;
|
||||
if ((g > 0) && (brightness > 0)) g = g * brightness / 100;
|
||||
if ((b > 0) && (brightness > 0)) b = b * brightness / 100;
|
||||
|
||||
for (size_t i = 0; i < LED_NEOPIXEL_NUM; i++) {
|
||||
strip.setPixelColor(i, r, g, b);
|
||||
@@ -115,7 +112,7 @@ class LED {
|
||||
myled->setChannel(MY92_CH_BRIGHTNESS, brightness);
|
||||
myled->setState(true);
|
||||
myled->update();
|
||||
#endif // if defined(DIGITAL_LED)
|
||||
#endif // if defined(LED_DIGITAL)
|
||||
}
|
||||
|
||||
void tempEnable();
|
||||
|
||||
@@ -10,7 +10,7 @@ extern "C" {
|
||||
#include "language.h"
|
||||
#include "A_config.h"
|
||||
|
||||
#define VERSION "v2.1.0"
|
||||
#define VERSION "v2.2.0"
|
||||
|
||||
extern void checkFile(String path, String data);
|
||||
extern JsonVariant parseJSONFile(String path, DynamicJsonBuffer& jsonBuffer);
|
||||
|
||||
Reference in New Issue
Block a user