Files
nicoboy df3621365c Ajoute la liaison TMS320 (simulee), l'IHM OLED et la LED de statut
Protocole ASCII type NMEA ($T/$C avec checksum) entre l'ESP32-C3 et le
TMS320 (frequence/duty/tensions/courants/temperatures + commandes
HT/PWM1/PWM2), avec simulateur local le temps que le firmware TMS320
existe. Driver SSD1322 repointe sur les GPIO du schema, dashboard texte
3 pages tournantes sur l'ecran ER-OLEDM032-1. LED RGB embarquee (GPIO8)
clignotante 1 Hz vert 30% comme indicateur de vie. Serveur web laisse en
stub (sera branche en STA sur le reseau local une fois l'OLED valide).
Ajout de la documentation technique (schema, datasheets, protocole).
2026-08-01 15:24:59 +02:00

77 lines
1.6 KiB
C++

/***************************************************
//Web: http://www.buydisplay.com
EastRising Technology Co.,LTD
Examples for ER-OLEDM032-1
Display is Hardward SPI 4-Wire SPI Interface
Tested and worked with:
Works with Arduino 2.3.4 IDE
NOTE: test OK:ESP32-WROOM-32
****************************************************/
/*
Note:The module needs to be jumpered to an SPI interface. R19,R23 Short and R18,R20 Open
Unused signal pin Recommended to connect to GND
/* == Hardward SPI to ESP32 ==
OLED => ESP32
*1. GND -> GND
*2. VCC -> 3.3-5V
*4. SCL -> 18
*5. SDI -> 23
*7-13 -> GND
*14. DC -> 17
*15. RES -> 16
*16. CS -> 5
*/
#include <SPI.h>
#include "er_oled.h"
//uint8_t oled_buf[OLED_Y_MAXPIXEL * OLED_X_MAXPIXEL/2];
void setup() {
Serial.begin(9600);
Serial.print("OLED Example\n");
/* display an image of bitmap matrix */
er_oled_begin();
}
void loop() {
er_oled_clear();
er_oled_bitmap_gray(PIC1);
delay(3000);
er_oled_clear();
er_oled_bitmap_gray(PIC2);
delay(3000);
er_oled_clear();
er_oled_bitmap_mono(PIC3);
delay(3000);
er_oled_clear();
er_oled_string(0, 0, "********************************",0);
er_oled_string(32, 16, "EastRising Technology", 0);
er_oled_string(40, 32, "www.buydisplay.com", 1);
er_oled_string(0, 48, "********************************",0);
uint8_t i;
for(i=0;i<=48;i++)
{
command(0xa1); //start line
data(i);
delay(100);
}
for(i=48;i>0;i--)
{
command(0xa1); //start line
data(i);
delay(100);
}
command(0xa1); //start line
data(0);
}