We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/*
#include <DMDESP.h> #include <fonts/ElektronMart6x8.h>
//SETUP DMD #define DISPLAYS_WIDE 1 // Kolom Panel #define DISPLAYS_HIGH 1 // Baris Panel DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS)
//---------------------------------------------------------------------- // SETUP
void setup() {
// DMDESP Setup Disp.start(); // Jalankan library DMDESP Disp.setBrightness(200); // Tingkat kecerahan Disp.setFont(ElektronMart6x8); // Tentukan huruf
}
//---------------------------------------------------------------------- // LOOP
void loop() {
Disp.loop(); // Jalankan Disp loop untuk refresh LED
Disp.drawText(0,0,"DMDESP"); // Tampilkan teks TeksJalan(8, 50); // Tampilkan teks berjalan TeksJalan(posisi y, kecepatan);
delay(100);
//-------------------------- // TAMPILKAN SCROLLING TEKS
static char *teks[] = {"Teks berjalan dengan DMDESP"};
void TeksJalan(int y, uint8_t kecepatan) {
static uint32_t pM; static uint32_t x; int width = Disp.width(); Disp.setFont(ElektronMart6x8); int fullScroll = Disp.textWidth(teks[0]) + width; if((millis() - pM) > kecepatan) { pM = millis(); if (x < fullScroll) { ++x; } else { x = 0; return; } Disp.drawText(width - x, y, teks[0]); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
/*
*/
#include <DMDESP.h>
#include <fonts/ElektronMart6x8.h>
//SETUP DMD
#define DISPLAYS_WIDE 1 // Kolom Panel
#define DISPLAYS_HIGH 1 // Baris Panel
DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS)
//----------------------------------------------------------------------
// SETUP
void setup() {
// DMDESP Setup
Disp.start(); // Jalankan library DMDESP
Disp.setBrightness(200); // Tingkat kecerahan
Disp.setFont(ElektronMart6x8); // Tentukan huruf
}
//----------------------------------------------------------------------
// LOOP
void loop() {
Disp.loop(); // Jalankan Disp loop untuk refresh LED
Disp.drawText(0,0,"DMDESP"); // Tampilkan teks
TeksJalan(8, 50); // Tampilkan teks berjalan TeksJalan(posisi y, kecepatan);
delay(100);
}
//--------------------------
// TAMPILKAN SCROLLING TEKS
static char *teks[] = {"Teks berjalan dengan DMDESP"};
void TeksJalan(int y, uint8_t kecepatan) {
static uint32_t pM;
static uint32_t x;
int width = Disp.width();
Disp.setFont(ElektronMart6x8);
int fullScroll = Disp.textWidth(teks[0]) + width;
if((millis() - pM) > kecepatan) {
pM = millis();
if (x < fullScroll) {
++x;
} else {
x = 0;
return;
}
Disp.drawText(width - x, y, teks[0]);
}
}
The text was updated successfully, but these errors were encountered: