I am using an Arduino MKR WiFi 1010 which has a SAMD based mcu and an included ESP32 as part of the u-blox Nina subsystem.
Arduino has a standard with an ArduinoBLE library, however I need to use Bluetooth classic in order to communciate with a legacy application. I have been able to program the ESP32 to use bluetooth classic by uploading the following code using the Arduino IDE (ver 1.8.13) configured to use the ESP Dev board.
//This example code is in the Public Domain (or CC0 licensed, at your option.)
//By Evandro Copercini - 2018
//
//This example creates a bridge between Serial and Classical Bluetooth (SPP)
//and also demonstrate that SerialBT have the same functionalities of a normal Serial
#include "BluetoothSerial.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() {
Serial.begin(115200);
SerialBT.begin("My MKR WiFi 1010"); //Bluetooth device name
Serial.println("The device started, now you can pair it with bluetooth!");
}
void loop()
{
if (Serial2.available())
{
SerialBT.write(Serial2.read());
}
if (SerialBT.available())
{
Serial.write(SerialBT.read());
}
delay(20);
}
This works fine but is using the Arduino serial port (via usb) to receive data to be sent over Bluetooth and equally is outputing data received over Bluetooth back over the same Serial port. What I need to do is send any data received over Bluetooth to code running on the arduino MKR SAMD mcu (and equally send data from here to the ESP code for forwarding over teh Bluetooth connection).
I wish to send data from ESP32 to arduino code running on the SAMD mcu of the MKR WiFi 1010. I am using the arduino IDE v 1.8.13 to program both the Arduino MKR and the ESP32.
From an Arduino MKR perspective I have found examples of code that uses SerialNina library to send data to the ESP32 however I cannot work out how the ESP32 code reads that data or indeed how it sends data back. If anyone has any pointers on how the ESP32 and SAMD chip are connected when on the MKR WiFI 1010 board and how they communicate data back and forth it would appreeciated.
Communicating to SAMD mcu on MKR WiFi 1010
Jump to
- English Forum
- Explore
- News
- General Discussion
- FAQ
- Documentation
- Documentation
- Sample Code
- Discussion Forum
- Hardware
- ESP-IDF
- ESP-BOX
- ESP-ADF
- ESP-MDF
- ESP-WHO
- ESP-SkaiNet
- ESP32 Arduino
- IDEs for ESP-IDF
- ESP-AT
- ESP IoT Solution
- ESP RainMaker
- Rust
- ESP8266
- Report Bugs
- Showcase
- Chinese Forum 中文社区
- 活动区
- 乐鑫活动专区
- 讨论区
- 全国大学生物联网设计竞赛乐鑫答疑专区
- ESP-IDF 中文讨论版
- 《ESP32-C3 物联网工程开发实战》书籍讨论版
- 中文文档讨论版
- ESP-AT 中文讨论版
- ESP-BOX 中文讨论版
- ESP IoT Solution 中文讨论版
- ESP-ADF 中文讨论版
- ESP Mesh 中文讨论版
- ESP Cloud 中文讨论版
- ESP-WHO 中文讨论版
- ESP-SkaiNet 中文讨论版
- ESP 生产支持讨论版
- 硬件问题讨论
- 项目展示
Who is online
Users browsing this forum: lbernstone and 34 guests
- All times are UTC
- Top
- Delete cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. ESP8266EX and ESP32 are some of our products.