Posts

Showing posts from October, 2022

2.8 inch 320x240 ili9341 TFT with 8/16BIT parallel interface

Image
2.8" 320x240 ili9341 TFT with 8/16BIT parallel interface: - 2.8-inch color screen, support 16BIT RGB 65K color display - 240x320 resolution for clear display - Support 8-bit/16-bit parallel bus selectable using resistor (the default is 16-bit) - Support for touch function - Support SD card function expansion product page ~ LCDWiKi:2.8inch 16BIT Module ILI9341 SKU:MRB2801 It's set 16 bit by default. To make it in 8-bit mode: Solder R4 with 0Ω resistor or short circuit directly, and disconnect R5. In 8-bit data bus mode, use DB8~DB15 data pin. Exercise: ~  Drive ILI9341 (8-bit parallel) using ESP32-S3 (ESP32-S3-DevKitC-1) in Arduino Framework ~  ILI9341 (8bit parallel bus) display on RP2040/CircuitPython ~  RP2040/CircuitPython 8.1.0 Beta 1, play animated GIF on 8 bit parallel bus ILI9341 .

BLE Remote Control between ESP32-S3/C3 using ArduinoBLE Library

Image
It's examples modified from ArduinoBLE example to show how to implement BLE Remote Control between  Espressif ESP32-S3-DevKitC-1 an AI Thinker NodeMCU ESP-C3-32S-Kit . In order to make it work on my dev.boards, we have to re-config the pin accordingly. Modified LED.ino, run on NodeMCU ESP-C3-32S-Kit. /* LED This example creates a Bluetooth® Low Energy peripheral with service that contains a characteristic to control an LED. The circuit: - Arduino MKR WiFi 1010, Arduino Uno WiFi Rev2 board, Arduino Nano 33 IoT, Arduino Nano 33 BLE, or Arduino Nano 33 BLE Sense board. You can use a generic Bluetooth® Low Energy central app, like LightBlue (iOS and Android) or nRF Connect (Android), to interact with the services and characteristics created in this sketch. This example code is in the public domain. */ #include <ArduinoBLE.h> BLEService ledService("19B10000-E8F2-537E-4F6C-D104768A1214"); // Bluetooth® Low Energy LED Servi

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      IO9 RES      IO8 DC      IO7 CS      IO6 Open test example o

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 that is rich

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