Posts

BLE UART Communication between ESP32-C3 (Xiao ESP32C3 and NodeMCU ESP-C3-32S-Kit)

Image
The previous post show a exercise of " BLE UART Communication between XIAO ESP32C3 (client/central) and nRF52840 (server/peripheral), in Arduino Framework ". This exercise implement the server/peripheral side on NodeMCU ESP-C3-32S-Kit with SSD1331 SPI Color OLED . The client/central side, XESP32C3_BLE_client_OLED_Terminal.ino, run on XIAO ESP32C3 with SSD1306 OLED, refer to the previous exercise . ESP32C3_BLE_uart_server_SSD1331.ino, server/peripheral side on NodeMCU ESP-C3-32S-Kit with SSD1331 SPI Color OLED. /* * Modify Examples for ESP32C3 Dev Module * > ESP32 BLE Arduino * > BLE_uart * Run on NodeMCU ESP-C3-32S-Kit. * With UUID of Nordic UART Service (NUS), to work with * XESP32C3_BLE_client_OLED_Terminal run on Xiao ESP32C3. */ #include <BLEDevice.h> #include <BLEServer.h> #include <BLEUtils.h> #include <BLE2902.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1331.h> #inc...

ESP32-C3(NodeMCU ESP-C3-32S-Kit) drive SSD1331 SPI Color OLED, in arduino-esp32 framework.

Image
This video show how to drive  0.95 inch 96x64 SSD1331 SPI Color OLED with  NodeMCU ESP-C3-32S-Kit in arduino-esp32 framework. Install " Adafruit SSD1331 OLED Driver Library for Arduino " in Arduino IDE Library Manager. It support both hardware and software SPI interface to SSD1331. In arduino-esp32, the hardware SPI pins of "ESP32C3 DevModule" are pre-defined at: SS : 7 MOSI: 6 MISO: 5 SCK : 4 ref: Last post - Get ESP32-C3 chip info and predefined pins (arduino-esp32) But on AI Thinker NodeMCU ESP-C3-32S-Kit, the LEDs connect to: LED_R: IO3 LED_G: IO4 LED_B: IO5 LED_Cool: IO19 LED_Warm: IO18 ref: ESP-C3-32S-Kit Specification So I use software SPI to interface with SPI SSD1331 Color OLED. Connection between NodeMCU ESP-C3-32S-Kit and SPI SSD1331 Color OLED (software SPI) SSD1331      ESP32C3 ------------------- GND      GND VCC      3V3 SCL      IO10 SDA  ...

Get ESP32-C3 chip info and predefined pins (arduino-esp32)

Image
With  arduino-esp32 installed , here is a simple code get ESP chip info and predefined pins of  AI Thinker NodeMCU ESP-C3-32S-Kit . ESP32C3_info_pins.ino #include <Esp.h> void setup() { delay(500); Serial.begin(115200); delay(500); Serial.println("\n\n=================================="); Serial.println("AI Thinker NodeMCU ESP-C3-32S-Kit:"); Serial.println("=================================="); Serial.printf("Chip Model: %s\n", ESP.getChipModel()); Serial.printf("Chip Revision: %d\n", ESP.getChipRevision()); Serial.printf("with %d core\n", ESP.getChipCores()); Serial.printf("Flash Chip Size : %d \n", ESP.getFlashChipSize()); Serial.printf("Flash Chip Speed : %d \n", ESP.getFlashChipSpeed()); esp_chip_info_t chip_info; esp_chip_info(&chip_info); Serial.printf("\nFeatures included:\n %s\n %s\n %s\n %s\n %s\n", (chip_info.features & CHIP_FEATURE_EMB_...

BLE UART Communication between XIAO ESP32C3 (client/central) and nRF52840 (server/peripheral), in Arduino Framework.

Image
Last post I have a  BLE UART Peripheral run on XIAO nRF52840 Sense (in Arduino Framework) , in this post I implement client/Central side running on XIAO ESP32C3 (in Arduino Framework also), modified from  ESP32 BLE Arduino > BLE_client example. Noted that the XIAO nRF52840 Sense server/Peripheral implemented a Nordic UART Service (NUS), so we have to use the matched UUIDs in client/Central side. - Nordic UART Service (NUS) UUID (6E400001-B5A3-F393-E0A9-E50E24DCCA9E) - RX Characteristic UUID (6E400002-B5A3-F393-E0A9-E50E24DCCA9E) - TX Characteristic UUID (6E400003-B5A3-F393-E0A9-E50E24DCCA9E). XESP32C3_BLE_client.ino /* * Modify Examples for XIAO_ESP32C3 * > ESP32 BLE Arduino * > BLE_client * Run on Xiao ESP32C3. * With UUID of Nordic UART Service (NUS), to work with * XnRF52_bleuart_OLED_Terminal run on Xiao nRF52840 Sensse. * Read from Serial and send to BLE UART server/peripheral. */ /** * A BLE client example tha...

BLE UART Peripheral run on XIAO nRF52840 Sense (in Arduino Framework)

Image
With Seeed nRF52 Boards installed , this exercise show how to run BLE exercise on XIAO nRF52840 Sense in Arduino Framework, and test with nRF Connect App. And modified to display on OLED. With Seeed nRF52 Boards installed, you can open BLE UART Peripheral example from Adafruit Bluefruit nRF52 Libraries > Peripheral > bleuart. Refer to  XiaoESP32C3_Serial_Terminal.ino exercise in previous post " Xiao ESP32C3 display on SSD1306 128x64 OLED (I2C & SPI) using U8g2 Librar ", it's modified to display received char on OLED. XnRF52_bleuart_OLED_Terminal.ino /* * Modify Examples for Xiao nRF52840 Sense * > Adafruit Bluefruit nRF52 Libraries * > Peripheral * > bleuart * Run on Xiao nRF52840 Sense, * to display received char on I2C OLED. */ /********************************************************************* This is an example for our nRF52 based Bluefruit LE modules Pick one up today in the adafruit shop...

XIAO nRF52840 Sense/XIAO Expansion board display on OLED in Arduino framework, using U8g2 Library.

Image
With  Seeed nRF52 Boards installed on Arduino IDE , this video show how 128x64 I2C OLED (SSD1306/SSD1315) displayed on  XIAOnRF52840 Sense and XIAO Expansion board . Make sure U8g2 is installed in Arduino IDE. Open Examples > U8g2 > full_buffer > GraphicsTest Uncomment the contructor U8G2_SSD1306_128x64_NONAME_F_HW_I2C using hardware I2C 128x64 SSD1306 driver. ~ more exercise to drive SSD1306 using U8g2, refer to the post " Xiao ESP32C3 display on SSD1306 128x64 OLED (I2C & SPI) using U8g2 Library ". next: ~  BLE UART Peripheral run on XIAO nRF52840 Sense (in Arduino Framework)

Install Seeed nRF52 Boards on Arduino IDE 1.8.19 to program XIAO nRF52840 Sense in Arduino Framework (on Raspberry Pi OS)

Image
To program  Seeed Studio XIAO nRF52840 Sense in Arduino Framework, we have to install "Seeed nRF Boards" and/or "Seeed nRF52 mbed-enabled Boards" in Arduino IDE. This video show steps to install Seeed nRF52 Boards on Arduino IDE 1.8.19 (on Raspberry Pi OS 32-bit buster). Click File in Arduino IDE MENU > Preferences add the follow link in Additional Boards Manager URLs box. https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json If you are reported error of: exec: "adafruit-nrfutil": executable file not found in $PATH You have to install adafruit-nrfutil, enter the command in terminal: $ pip3 install --user adafruit-nrfutil In my case, adafruit-nrfutil installed successfully but not on PATH. To add the installed directory to PATH, edit ~/.bashrc: $ nano ~/.bashrc Add following code in the end of .bashrc: PATH=${PATH}:<installed directory> export PATH In nano, Ctrl-X and answer Y and ENTER to accept ...