Chat

Welcome to Flux

Treat Flux like your intern. Tell it what you'd like to build and it'll get to work. You can also ask it questions, brainstorm ideas, and teach it your preferences. Learn More

Help me brainstorm ideas
Design a block diagram
Find parts in the library
Read a datasheet
Simulate a circuit
New Subsystem Wizard
Dame un programa donde muestre la hora y la fecha en tiempo real utilizando un E...

@copilot Dame un programa donde muestre la hora y la fecha en tiempo real utilizando un Esp 8266 y mostrar en una matrix 8 x 64 7269, tambiem pueda mostrar mensajes cortos fe texto. Usando el ide de arduino y sus librerias
1y
Para crear un programa que muestre la hora y la fecha en tiempo real utilizando un ESP8266 y una matriz LED de 8x64, puedes usar la biblioteca Parola junto con MD_MAX72XX para manejar la matriz LED. También necesitarás la biblioteca NTPClient para obtener la hora en tiempo real desde un servidor NTP.
Aquí está un ejemplo de cómo podrías hacerlo en el IDE de Arduino:
Conexiones
  • Conecta la matriz de LED según la configuración del hardware específica de tu controlador de matriz.
Código

Cpp


#include <ESP8266WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <MD_Parola.h>
#include <MD_MAX72XX.h>
#include <SPI.h>

// Definiciones de hardware
#define HARDWARE_TYPE MD_MAX72XX::FC16_HW
#define MAX_DEVICES 8

// Pines de control
#define CLK_PIN   D5
#define DATA_PIN  D7
#define CS_PIN    D8

// Configurar la matriz LED
MD_Parola parola = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

// SSID y clave de la red WiFi
const char* ssid = "yourSSID";
const char* password = "yourPASSWORD";

// Configuración de cliente NTP
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", 0, 60000);  // Actualizar cada 60 segundos

void setup() {
  Serial.begin(115200);

  // Comenzar conexión WiFi
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");

  // Configurar cliente NTP
  timeClient.begin();
  
  // Inicializar matriz LED
  parola.begin();
  parola.setIntensity(5);  // Opcional: ajusta el brillo
  parola.displayClear();
}

void loop() {
  timeClient.update();
  
  // Obtener hora actual
  String formattedTime = timeClient.getFormattedTime();
  
  // Mostrar hora en la matriz LED
  if (parola.displayAnimate()) {
    parola.displayText(formattedTime.c_str(), PA_CENTER, 100, 0, PA_SCROLL_LEFT, PA_SCROLL_LEFT);
  }
  
  delay(1000);  // Permitir que se muestre el reloj cada segundo
}
Instrucciones
  1. Credenciales WiFi: Asegúrate de reemplazar "yourSSID" y "yourPASSWORD" con las credenciales de tu red WiFi.
  2. Librerías: Asegúrate de instalar las bibliotecas necesarias: MD_Parola, MD_MAX72XX, y NTPClient. Puedes encontrarlas en el Administrador de Librerías del IDE de Arduino.
  3. Hardware: Conecta los pines del ESP8266 a tu matriz LED adecuadamente.
  4. Compilar y cargar: Compila el código y súbelo al ESP8266.
El código muestra la hora en tiempo real en la matriz LED y está configurado para actualizarse cada minuto desde un servidor NTP. Ajusta el brillo y la velocidad de desplazamiento según tus preferencias. Además, puedes modificar el mensaje para mostrar textos cortos personalizados simplemente reemplazando formattedTime.c_str() por alguna cadena de texto.
1y
1
No schematic yet

Talk to Flux to get started.

No files yet

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    No assets added.

    Okay Amber Massive Robot Spider

    Okay Amber Massive Robot Spider thumbnail
    Welcome to your new project. Imagine what you can build here.

    Properties

    Properties describe core aspects of the project.

    Pricing & Availability

    Distributor

    Qty 1

    Controls