-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement to web interface, new platform and support for external p…
…lug in modules Improvement to web interface, new platform and support for external plug in modules
- Loading branch information
Showing
28 changed files
with
558 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Example - Self destruct | ||
|
||
This is an example of using an auxillary devices connected to the LILYGO T Dongle S3's QWIIC port to perform motion detection. In this example if the device discovers motion close to it then the SELF_DESTRUCT() function is run. In our example this simply prints a graphic and resets the device. You are free to implement your own. | ||
|
||
## Set up | ||
1. Copy autorun.ds and bomb.png onto the SD card | ||
1. In the platform.ini configuration file uncomment the line `-D EXT_SENSOR_MOTION_LD2410` this will enable the sensor module to be built | ||
1. Build and flash the device | ||
1. Connect a LD2410 to the QWIIC connector of the T Dongle S3. You'll need: | ||
* A QWIIC micro cable AKA a 4-pin micro JST connector (1mm). | ||
* A [HLK-LD2410C](https://s.click.aliexpress.com/e/_EJ2MAjf) or similar | ||
* A 3.3v to 5v DC-DC step up converter. The LD2410 needs 5v - potentially you could get this from the USB connecter. Connect the red cable to IN+ and OUT+ to VCC on the LD2410. | ||
* To connect the blue cable to RX | ||
* To connect the yellow cable to TX | ||
* To connect the black cable to IN- and OUT- to the LD2410 GND pin | ||
|
||
**NOTE** In the pictures and video a JST connector cable with different colours is in use. | ||
|
||
## Usage | ||
1. Plug in device | ||
2. Wait a few seconds for the device to scan the room | ||
3. Put your hand over the sensor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FUNCTION SELF_DESTRUCT() | ||
REM implement your own routine here! | ||
DISPLAY_PNG /bomb.png | ||
DELAY 3000 | ||
RESET | ||
END_FUNCTION | ||
|
||
REM wait for device to settle down or for you to retreat | ||
DELAY 3000 | ||
|
||
IF (LD2410_CONNECTED() == FALSE) | ||
DISPLAY_CLEAR | ||
DISPLAY_TEXT 0 0 Error, could not find device | ||
DELAY 2000 | ||
SELF_DESTRUCT() | ||
END_IF | ||
|
||
VAR $UPDATE_COUNT = 0 | ||
|
||
WHILE (LD2410_CONNECTED()) | ||
IF (LD2410_DETECTED_MOTION()) | ||
IF (LD2410_GET_DISTANCE() < 10) | ||
SELF_DESTRUCT() | ||
END_IF | ||
ELSE | ||
IF ($UPDATE_COUNT > 10) | ||
DISPLAY_CLEAR | ||
DISPLAY_TEXT 0 0 Light level #_LD2410_LIGHT_LEVEL_ | ||
$UPDATE_COUNT = 0 | ||
ELSE | ||
DISPLAY_TEXT $UPDATE_COUNT 50 . | ||
$UPDATE_COUNT = ( $UPDATE_COUNT + 1 ) | ||
END_IF | ||
END_IF | ||
END_WHILE | ||
|
||
SELF_DESTRUCT() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,10 +66,10 @@ build_flags = | |
-D CFG_TUD_ENABLED | ||
;-D DUCKY_CUSTOM_LOG | ||
lib_deps_core = | ||
https://github.com/i-am-shodan/DuckScriptInterpreter#962e24e81aa548f64fa38a580717edb3ae65c989 | ||
https://github.com/i-am-shodan/DuckScriptInterpreter#4a614fd9debf3370cf32ef8eb6929877d8084114 | ||
bblanchon/ArduinoJson@^7.0.3 | ||
ivanseidel/[email protected]+sha.dac3874d28 | ||
https://github.com/i-am-shodan/Uptime-Library | ||
ivanseidel/[email protected]+sha.dac3874d28 | ||
https://github.com/i-am-shodan/Uptime-Library | ||
|
||
[core-esp32] | ||
extends = core | ||
|
@@ -106,12 +106,13 @@ build_flags = | |
-D ARDUINO_ARCH_ESP32S3 | ||
-D GENERIC_ESP32 ; ESP32 Maurader | ||
-D CONFIG_ASYNC_TCP_QUEUE_SIZE=128 | ||
-D RX_PIN=44 | ||
-D TX_PIN=43 | ||
lib_deps = | ||
${core-esp32.lib_deps} | ||
h2zero/NimBLE-Arduino@^1.4.2 ; ESP32 Maurader | ||
mathertel/OneButton | ||
lovyan03/LovyanGFX@^1.1.16 | ||
https://github.com/pololu/apa102-arduino | ||
|
||
[core-pico] | ||
extends = core | ||
|
@@ -164,8 +165,11 @@ build_flags = | |
-D LED_DI_PIN=40 | ||
-D LED_CI_PIN=39 | ||
;;;;;;;; End of Pin Config ;;;;;;;; | ||
; -D EXT_SENSOR_MOTION_LD2410 ; Uncomment to use the self destruct example | ||
lib_deps = | ||
${core-esp32-s3.lib_deps} | ||
iavorvel/MyLD2410 @ ~1.0.12 | ||
https://github.com/pololu/apa102-arduino | ||
|
||
[env:Waveshare-ESP32-S3-LCD-1_47] | ||
extends = core-esp32-s3 | ||
|
@@ -206,6 +210,7 @@ build_flags = | |
;;;;;;;; End of Pin Config ;;;;;;;; | ||
lib_deps = | ||
${core-esp32-s3.lib_deps} | ||
https://github.com/pololu/apa102-arduino | ||
|
||
[env:Generic-ESP32-S2] | ||
extends = core-esp32 | ||
|
@@ -225,6 +230,30 @@ build_flags = | |
lib_deps = | ||
${core-esp32.lib_deps} | ||
|
||
[env:M5-Atom-S3U] | ||
extends = core-esp32-s3 | ||
board = esp32-s3-devkitc-1 | ||
upload_speed = 1500000 | ||
monitor_speed = 115200 | ||
board_build.f_cpu = 240000000L | ||
board_build.f_flash = 80000000L | ||
board_build.flash_mode = dio | ||
build_flags = | ||
${core-esp32-s3.build_flags} | ||
-D M5_ATOM_S3U | ||
-D NO_TFT | ||
-D NO_SD | ||
-D USE_SPIFFS_INTERFACE ; ESP32 Maurader | ||
;;;;;;;;Pin Config for Status LED and Button;;;;;;;; | ||
-D BTN_PIN=41 | ||
-D NUM_LEDS=1 | ||
-D LED_DI_PIN=35 | ||
;;;;;;;; End of Pin Config ;;;;;;;; | ||
lib_deps = | ||
${core-esp32-s3.lib_deps} | ||
https://github.com/pololu/apa102-arduino | ||
fastled/FastLED | ||
|
||
[env:Waveshare-RP2040-GEEK] | ||
extends = core-pico | ||
build_flags = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.