muy buena tarde ,quien me pueda colaborar le estaré agradecido , no manejo arduino , e defiento con pic basic o proton, pero vi esta matris y la quiero usar como rutero en microbus escolar , pero al cerrar la aplicacion o abrir otra aplicacion se desconecta la comunicacion bluetooth del telefono con el modulo hc05 y se va el mensaje aparece + disc:successok, hay alguna forma de dejar en memoria ram el mensaje enviado desde el celular hasta que se envie otro mensaje? o hay alguna aplicacion bluetooth que funcione en segundo plano , antes usaba la matris posteada aqui en foros de electronica matris con teclado ps2, pero ya es hora de renovar
#include <SPI.h> //Include all of these libraries to avoid compiling error
#include <DMD.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#define DISPLAYS_ACROSS 1 //Mention how many DMD you're using(In my case 2)
#define DISPLAYS_DOWN 1 //DMD up/down
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
#define max_char 30 //Define Nos. of characters you're using
char message[max_char];
char r_char;
byte index = 0;
int i;
char greeting[] = ""; //Print your message max. 1000 characrer
void ScanDMD()
{
dmd.scanDisplayBySPI();
}
void setup(void)
{
Timer1.initialize( 5000 );
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );//to clear RAM
Serial.begin(9600);//begin serial communication
strcpy(message,greeting);
}
void loop(void)
{
if(Serial.available())
{
for(i=0; i<29; i++){
message = '\0';
}
index=0;
}
while(Serial.available() > 0){
dmd.clearScreen( true );
if(index < (max_char-1))
{
r_char = Serial.read();
message[index] = r_char;
index++;
}
}
dmd.selectFont(Arial_Black_16);
dmd.drawMarquee(message ,max_char,(32*DISPLAYS_ACROSS)-1 ,0);
long start=millis();
long timer=start;
boolean ret=false;
while(!ret)
{
if ((timer+19) < millis()) {
ret=dmd.stepMarquee(-1,0);
timer=millis();
}
}
}
#include <SPI.h> //Include all of these libraries to avoid compiling error
#include <DMD.h>
#include <TimerOne.h>
#include "SystemFont5x7.h"
#include "Arial_black_16.h"
#define DISPLAYS_ACROSS 1 //Mention how many DMD you're using(In my case 2)
#define DISPLAYS_DOWN 1 //DMD up/down
DMD dmd(DISPLAYS_ACROSS, DISPLAYS_DOWN);
#define max_char 30 //Define Nos. of characters you're using
char message[max_char];
char r_char;
byte index = 0;
int i;
char greeting[] = ""; //Print your message max. 1000 characrer
void ScanDMD()
{
dmd.scanDisplayBySPI();
}
void setup(void)
{
Timer1.initialize( 5000 );
Timer1.attachInterrupt( ScanDMD );
dmd.clearScreen( true );//to clear RAM
Serial.begin(9600);//begin serial communication
strcpy(message,greeting);
}
void loop(void)
{
if(Serial.available())
{
for(i=0; i<29; i++){
message = '\0';
}
index=0;
}
while(Serial.available() > 0){
dmd.clearScreen( true );
if(index < (max_char-1))
{
r_char = Serial.read();
message[index] = r_char;
index++;
}
}
dmd.selectFont(Arial_Black_16);
dmd.drawMarquee(message ,max_char,(32*DISPLAYS_ACROSS)-1 ,0);
long start=millis();
long timer=start;
boolean ret=false;
while(!ret)
{
if ((timer+19) < millis()) {
ret=dmd.stepMarquee(-1,0);
timer=millis();
}
}
}