Danh sách sản phẩm

ESP8266 NodeMCU Lua D1 Mini Oled Shield

Mã sản phẩm: IMA017   |   Tình trạng: Còn 6 sản phẩm có sẵn
150.000₫
  • Nhập IMA-90 giảm 90%, tối đa 2K
  • Nhập IMA-5K giảm 5k, đơn từ 199K
  • Nhập IMA-35K giảm 35k, đơn từ 499K

Mô tả sản phẩm

ESP8266 NodeMCU Lua D1 Mini Oled Shield được sử dụng với các phiên bản Lua D1 Mini hoặc Lua D1 Mini Pro, có chức năng như một màn hình hiển thị Oled 0.66 inch với độ phân giải 64×48 Pixels giao tiếp I2C, mạch có thiết kế nhỏ gọn, tiện lắp đặt với nhiều kiểu chân cắm khác nhau. Sử dụng kết hợp với Kit RF Thu Phát Wifi ESP8266 NodeMCU Lua D1 Mini Pro để nạp chương trình.

Thông số kỹ thuật:

  • Thành phần chính: Màn hình Oled 0.66 inch độ phân giải 64×48 Pixels
  • Driver Oled: SSD1306.
  • Giao tiếp Oled: I2C
  • Điện áp sử dụng: 3.3VDC.
  • Tương thích: NodeMCU Lua D1 Mini hoặc D1 Mini Pro.
  • Chân kết nối: D1 (SCL) / D2 (SDA)
  • Kích thước: 34.2 x 25.6mm.


Code tham khảo:

/*
  Kết nối màn hình với đế nạp
  Vào Tools -> Board: -> LOLIN(WEMOS) D1 mini Pro
  Vào Tools -> Port.
  Nạp code xong mở Serial Monitor chọn Both NL & CR, baud 115200.
  Nhập ký tự cần hiện thị và gửi đi. 
 */
#include <Wire.h>  // Include Wire if you're using I2C
#include <SPI.h>  // Include SPI if you're using SPI
#include <SFE_MicroOLED.h>  // Include the SFE_MicroOLED library

//////////////////////////
// MicroOLED Definition //
//////////////////////////

#define PIN_RESET 255  //
#define DC_JUMPER 0  // I2C Addres: 0 - 0x3C, 1 - 0x3D

//////////////////////////////////
// MicroOLED Object Declaration //
//////////////////////////////////

MicroOLED oled(PIN_RESET, DC_JUMPER);  // I2C Example

void setup()
{
  Serial.begin(115200); 
  oled.begin();    // Initialize the OLED
  oled.clear(ALL); // Clear the display's internal memory
  oled.display();  // Display what's in the buffer (splashscreen)
  delay(1000);     // Delay 1000 ms
  oled.clear(PAGE); // Clear the buffer.


  oled.setFontType(1);  // Set font to type 1
  oled.clear(PAGE);     // Clear the page
  oled.setCursor(0, 0); // Set cursor to top-left
}

void textExamples()
{
  if (Serial.available() > 0) {
    int byteRecieved = Serial.read();
    if (byteRecieved == 95)
      {
        oled.clear(PAGE);     // Clear the page
        oled.setCursor(0, 0); // Set cursor to top-left
        oled.display();
      } else {
        //oled.print(byteRecieved);
        oled.write(byteRecieved);
        oled.display();
      }
  }
}

void loop()
{
  textExamples();  // Finally the text example
}

Video tham khảo:

 

Khách hàng nhận xét