Most recent activity
-
sorry for slow response, here is the code:
// Initialize SPI var spi = new SPI(); spi.setup({ sck: D18, // SPI Clock (SCL) mosi: D23, // SPI Data (SDA) baud: 8000000 // SPI speed (8 MHz) }); // Define control pins var dc = D16; // Data/Command pin (DC) var cs = D5; // Chip Select pin (CS) var res = D4; // Reset pin (RES) // Manually reset the display digitalPulse(res, 0, 10); // Pulse reset pin low for 10ms setTimeout(function() { // Initialize the ST7789 display var g = require("ST7789").connect({ spi: spi, dc: dc, cs: cs, width: 240, // Your display's width height: 240, // Your display's height color: true // Enable color mode }, function() { g.clear(); g.setColor(1, 0, 0); // Set text color to red g.setFontVector(20); // Set font size g.drawString("Hello, ESP32!", 10, 10); // Draw text g.flip(); // Refresh display }); }, 50); // Wait 50ms after reset
-
-
-
-
-
-
im new to esp32 and other