This commit is contained in:
2023-02-02 16:39:30 +01:00
parent 4aef9ea21c
commit 739d5580dd
12 changed files with 92894 additions and 0 deletions

38
tp2/bt/bt.ino Normal file
View File

@@ -0,0 +1,38 @@
#include "BluetoothSerial.h"
#include <M5StickC.h>
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
BluetoothSerial SerialBT;
void setup() {
M5.begin(115200);
SerialBT.begin("PomPomBT");
Serial.println("The device started.");
M5.Lcd.fillScreen(BLACK);
M5.Lcd.setCursor(10, 10);
M5.Lcd.setRotation(3);
M5.Lcd.setTextColor(WHITE);
M5.Lcd.setTextSize(2);
M5.Lcd.printf("PomPom ON");
}
void loop() {
String cmd = String("AJ");
String eol = String("\r\n");
String cmdR;
if (SerialBT.available()) {
cmdR = SerialBT.readString();
if(cmdR == (cmd + eol)) {
SerialBT.println("Applejack is best pony !");
} else {
SerialBT.println("Pony doesn't received !");
}
}
delay(2000);
}

14
tp2/bt/debug.cfg Normal file
View File

@@ -0,0 +1,14 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Example OpenOCD configuration file for ESP32-WROVER-KIT board.
#
# For example, OpenOCD can be started for ESP32 debugging on
#
# openocd -f board/esp32-wrover-kit-3.3v.cfg
#
# Source the JTAG interface configuration file
source [find interface/ftdi/esp32_devkitj_v1.cfg]
set ESP32_FLASH_VOLTAGE 3.3
# Source the ESP32 configuration file
source [find target/esp32.cfg]

19
tp2/bt/debug_custom.json Normal file
View File

@@ -0,0 +1,19 @@
{
"name":"Arduino on ESP32",
"toolchainPrefix":"xtensa-esp32-elf",
"svdFile":"esp32.svd",
"request":"attach",
"postAttachCommands":[
"set remote hardware-watchpoint-limit 2",
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
],
"overrideRestartCommands":[
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
]
}

46087
tp2/bt/esp32.svd Normal file

File diff suppressed because it is too large Load Diff