MD_Parola and MD_MAX72xx
I have a problem, I'm using the md_parola and md_max72xx libraries
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
but when I want to send a decimal number to my matrix, it does not work for me,
P.print (my_number, DEC);
then two questions
1 .- Does anyone know how the command should go to show me decimals?
2.- How do I convert a decimal number, for example 10.5 to text "10.5", because the texts if I get it right?
Thanks for your support
MD_Parola y MD_MAX72xx
Tengo un problema, estoy usando las librerias md_parola y md_max72xx
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
pero cuando quiero mandar a mi matriz un numero decimal no me funciona,
P.print(mi_numero, DEC);
entonces dos preguntas
1 .- alguien sabe como debe ir el comando para que me muestre decimales?
2.- como convierto un numero decimal, por ejemplo 10.5 a texto "10.5", porque los textos si me salen bien
Gracias por su apoyo
// Program to demonstrate the MD_Parola library
//
// Uses the Arduino Print Class extension with various output types
//
// MD_MAX72XX library can be found at GitHub - MajicDesigns/MD_MAX72XX: LED Matrix Library
//
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
const uint16_t WAIT_TIME = 1000;
// Define the number of devices we have in the chain and the hardware interface
// NOTE: These pin numbers will probably not work with your hardware and may
// need to be adapted
#define HARDWARE_TYPE MD_MAX72XX::PAROLA_HW
#define MAX_DEVICES 4
#define CLK_PIN 31
#define DATA_PIN 27
#define CS_PIN 29
float cuenta=0;
// Hardware SPI connection
//MD_Parola P = MD_Parola(HARDWARE_TYPE, CS_PIN, MAX_DEVICES);
// Arbitrary output pins
MD_Parola P = MD_Parola(3, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);
// 3 is the number that works my hardware, change for test yours
void setup(void)
{
P.begin();
}
void loop(void)
{
P.print("3999.9");
delay(WAIT_TIME);
cuenta = cuenta + 1;
//P.print(cuenta, DEC);
P.print(word(cuenta));
delay(WAIT_TIME);
}