i was thinking all the esp has bluetooth and wifi why m5 atom officially don't have bluetooth!
then after some fining, wrotethe code given below and bluetooth was workring completely and got all the commands from my android device via serial bluetooth app.
I am using platformIO on Mac OS Ventura
code:
include "BluetoothSerial.h"
include
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(){
Serial.begin(115200);
SerialBT.begin("ESP32test"); //Bluetooth device name
}
void loop(){
if (Serial.available()) {
SerialBT.write(Serial.read());
}
if (SerialBT.available()) {
Serial.write(SerialBT.read());
}
}
Warning! Ignore unknown configuration option monitor_flags in section [env:m5stack-atom]
--- Terminal on /dev/cu.usbserial-8152E6A15C | 115200 8-N-1
--- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
--- More details at https://bit.ly/pio-monitor-filters
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
--- Baudrate: nkjkjk
--- ERROR setting baudrate: invalid literal for int() with base 10: 'nkjkjk' ---
Disconnected (read failed: [Errno 6] Device not configured)
Reconnecting to /dev/cu.usbserial-8152E6A15C .. Connected!
hi
Bluetooth serial test
hi
There is nothing wrong with what you said, we didn't mark BlueTooth in Docs to avoid unnecessary disputes, you can create a PR if you want and we will be happy to absorb your example.
i was thinking all the esp has bluetooth and wifi why m5 atom officially don't have bluetooth! then after some fining, wrotethe code given below and bluetooth was workring completely and got all the commands from my android device via serial bluetooth app.
I am using platformIO on Mac OS Ventura code:
serial monitor:
Warning! Ignore unknown configuration option
monitor_flags
in section [env:m5stack-atom] --- Terminal on /dev/cu.usbserial-8152E6A15C | 115200 8-N-1 --- Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time --- More details at https://bit.ly/pio-monitor-filters --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H--- Baudrate: nkjkjk --- ERROR setting baudrate: invalid literal for int() with base 10: 'nkjkjk' --- Disconnected (read failed: [Errno 6] Device not configured) Reconnecting to /dev/cu.usbserial-8152E6A15C .. Connected! hi Bluetooth serial test hi