Yep!
Bon je poste parce que là, je suis à la ramasse, comprends pas, trouve pas...!
J'ai un afficheur graphique dont les polices par defaut sont trés petites.
Je chope donc une police plus large géneré avec Font editor. Et j'essaye depuis 2 jours differentes manip pour faire correspondre un texte, un mot quoi avec cette *$!!utu table.
Comment est-ce que quelqu'un peut me dire quoi comment faire ???
#include <f15x22.h>
#include <avr/io.h>
#include <avr/pgmspace.h>
//const char f15x22[] PROGMEM = { };
const uint8_t* bigfont_P[] PROGMEM = { f15x22 };
//PGM_P bigfont_P[] PROGMEM = { f15x22 };
const int ledPin = 13; // the number of the LED pin
int ledState = LOW; // ledState used to set the LED
long previousMillis = 0; // will store last time LED was updated
long interval = 5000; // interval at which to blink (milliseconds)
void setup()
{
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
}
void loop()
{
delay(2000);
Serial.println("debut");
test();
if (millis() - previousMillis > interval) {
previousMillis = millis();
if (ledState == LOW)
ledState = HIGH;
else
ledState = LOW;
digitalWrite(ledPin, ledState);
}
}
void test()
{
Serial.println("Serie test");
// for (int i=150; i<250; i=i+1)
//{
// Serial.print(pgm_read_byte(&(bigfont_P[i])));
// Serial.println();
// }
char* buffer = "Salut";
for (int i=0; i < 6; i=i+1){
int k = buffer[i+80];
Serial.println(i);
Serial.println(k);
Serial.println(pgm_read_byte(&(bigfont_P[k])));
}
Serial.println("End test");
}
Ce code ne fonctionne pas, Comment je dois faire pour afficher "Salut" avec ma table bigfont...???
En plus, MEMPROG est super mal documenté je trouve...
@+
Zoroastre.