Scroller / Arduino

PIC, AVR, Arduino, Raspberry Pi, Basic Stamp, PLC mm.
Användarvisningsbild
GeekJoan
Admin
Inlägg: 10642
Blev medlem: 26 maj 2003, 15:59:27
Ort: Solna

Scroller / Arduino

Inlägg av GeekJoan »

Håller på med en scrollskylt. Men hur f-n får jag från åäö. Tecknen finns ju i teckentabellen, men jag vet inte vad man ska skriva. Antar att det är någon /n33 eller liknande?
scroll.jpg
Du har inte behörighet att öppna de filer som bifogats till detta inlägg.
Zkronk
Inlägg: 1423
Blev medlem: 23 augusti 2005, 16:44:36
Ort: Uppsala

Re: Scroller / Arduino

Inlägg av Zkronk »

Vad är det för bibliotek du använder för att styra displayen?
SeniorLemuren
Inlägg: 7779
Blev medlem: 26 maj 2009, 12:20:37
Ort: Kristinehamn

Re: Scroller / Arduino

Inlägg av SeniorLemuren »

Jag använder biblioteken :

Kod: Markera allt

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
till min oled display och där skriver jag ut Ascii tecken med write + Ascii numret.

Här skriver jag ut en temperatur samt den lilla cirkeln för grader sedan ett C
display.print("Water Out");
display.setCursor(77,10);
display.print(newTmp0);
display.setCursor(94,10);
display.write(247); // här skriver jag ut tecknet för grader
display.setCursor(100,10);
display.print("C");
Maalobs
Inlägg: 1299
Blev medlem: 3 februari 2005, 14:35:15
Ort: Stockholm

Re: Scroller / Arduino

Inlägg av Maalobs »

Är det möjligen så att man kan välja teckentabell på något sätt på displayen?
Så var det på 90-talet när jag fick konfigurera en fulscroller, den hade en dipswitch för att växla till CP437, tror att den bara hade två lägen för teckentabell t o m.
Det var iofs länge sen, men det kanske finns nåt konfigminne i din pryl som man kan skriva till för att åstadkomma motsvarande?
Janson1
Inlägg: 1338
Blev medlem: 1 december 2016, 09:06:02
Ort: Marks Kommun

Re: Scroller / Arduino

Inlägg av Janson1 »

Jag har vanlig LCD-display och har inte lyckats få till å, ä, ö heller. I mitt fall tror jag "felet" ligger i displayen? I ditt fall GeekJoan så är det nog själva Arduinoprogrammet som inte klarar detta. En annan h-fil kanske?
Användarvisningsbild
Icecap
Inlägg: 26105
Blev medlem: 10 januari 2005, 14:52:15
Ort: Aabenraa, Danmark

Re: Scroller / Arduino

Inlägg av Icecap »

Såklart har det med vilken codepage som är vald - men även var tecken kan ligga.

För att skriva ut en sträng med "°C" är det så enkelt som att skriva (i C):
sprintf(Buffer, "\xF7" "C"); // 0xF7 = 247 decimalt
Orsaken till de "många" citationstecken är att C(elsius) kan uppfattas som en del av hex-strängen.
Anger man temperaturen i t.ex. Kelvin blir det "snyggare":
sprintf(Buffer, "\xF7K");

Jag hade ju testat att göra ett litet program som lister de olika tecken, ett efter ett och se om det finns de svenska tecken och vilka nummer de har.
svanted
Inlägg: 5082
Blev medlem: 30 augusti 2010, 21:20:38
Ort: Umeå

Re: Scroller / Arduino

Inlägg av svanted »

svårt när man måste gissa hur ditt program ser ut?
använder du glcdfont.c
där finns:
a-umlaut
o-umlaut
e.t.c.
man hittar dem mha Icecaps tips.

eller något annat fontbibliotek?

då är det inte säkert att åäö finns med,
man kan lägga till dessa till pixelmappen som man måste ersätta i texten som ska visas med någon oanvänt ASCII kod
eller bara sätta dit prickar över a/A/o/O
mha typ writePixel
Användarvisningsbild
GeekJoan
Admin
Inlägg: 10642
Blev medlem: 26 maj 2003, 15:59:27
Ort: Solna

Re: Scroller / Arduino

Inlägg av GeekJoan »

Texten som skickas skriver jag in via serial monitorn.

Kod:

Kod: Markera allt

#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// set to 1 if we are implementing the user interface pot, switch, etc
#define USE_UI_CONTROL 0

#if USE_UI_CONTROL
#include <MD_UISwitch.h>
#endif

// Turn on debug statements to the serial output
#define DEBUG 0

#if DEBUG
#define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }
#define PRINTS(x) Serial.print(F(x))
#define PRINTX(x) Serial.println(x, HEX)
#else
#define PRINT(s, x)
#define PRINTS(x)
#define PRINTX(x)
#endif

// 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 MAX_DEVICES 8
#define CLK_PIN   13
#define DATA_PIN  11
#define CS_PIN    10

// HARDWARE SPI
MD_Parola P = MD_Parola(CS_PIN, MAX_DEVICES);
// SOFTWARE SPI
//MD_Parola P = MD_Parola(DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

// Scrolling parameters
#if USE_UI_CONTROL
const uint8_t SPEED_IN = A5;
const uint8_t DIRECTION_SET = 8;  // change the effect
const uint8_t INVERT_SET = 9;     // change the invert

const uint8_t SPEED_DEADBAND = 5;
#endif // USE_UI_CONTROL

uint8_t scrollSpeed = 25;    // default frame delay value
textEffect_t scrollEffect = PA_SCROLL_LEFT;
textPosition_t scrollAlign = PA_LEFT;
uint16_t scrollPause = 20; // in milliseconds

// Global message buffers shared by Serial and Scrolling functions
#define	BUF_SIZE	75
char curMessage[BUF_SIZE] = { "Start " };
char newMessage[BUF_SIZE] = { "- GeekJoan -            " };
bool newMessageAvailable = true;

#if USE_UI_CONTROL

MD_UISwitch_Digital uiDirection(DIRECTION_SET);
MD_UISwitch_Digital uiInvert(INVERT_SET);

void doUI(void)
{
  // set the speed if it has changed
  {
    int16_t speed = map(analogRead(SPEED_IN), 0, 1023, 10, 150);

    if ((speed >= ((int16_t)P.getSpeed() + SPEED_DEADBAND)) ||
      (speed <= ((int16_t)P.getSpeed() - SPEED_DEADBAND)))
    {
      P.setSpeed(speed);
      scrollSpeed = speed;
      PRINT("\nChanged speed to ", P.getSpeed());
    }
  }

  if (uiDirection.read() == MD_UISwitch::KEY_PRESS) // SCROLL DIRECTION
  {
    PRINTS("\nChanging scroll direction");
    scrollEffect = (scrollEffect == PA_SCROLL_LEFT ? PA_SCROLL_RIGHT : PA_SCROLL_LEFT);
    P.setTextEffect(scrollEffect, scrollEffect);
    P.displayClear();
    P.displayReset();
  }

  if (uiInvert.read() == MD_UISwitch::KEY_PRESS)  // INVERT MODE
  {
    PRINTS("\nChanging invert mode");
    P.setInvert(!P.getInvert());
  }
}
#endif // USE_UI_CONTROL

void readSerial(void)
{
  static char *cp = newMessage;

  while (Serial.available())
  {
    *cp = (char)Serial.read();
    if ((*cp == '\n') || (cp - newMessage >= BUF_SIZE-2)) // end of message character or full buffer
    {
      *cp = '\0'; // end the string
      // restart the index for next filling spree and flag we have a message waiting
      cp = newMessage;
      newMessageAvailable = true;
    }
    else  // move char pointer to next position
      cp++;
  }
}

void setup()
{
  Serial.begin(57600);
  Serial.print("\n[Parola Scrolling Display]\nType a message for the scrolling display\nEnd message line with a newline");

#if USE_UI_CONTROL
  uiDirection.begin();
  uiInvert.begin();
  pinMode(SPEED_IN, INPUT);

  doUI();
#endif // USE_UI_CONTROL

  P.begin();
  P.displayText(curMessage, scrollAlign, scrollSpeed, scrollPause, scrollEffect, scrollEffect);
}

void loop()
{
#if USE_UI_CONTROL
  doUI();
#endif // USE_UI_CONTROL

  if (P.displayAnimate())
  {
    if (newMessageAvailable)
    {
      strcpy(curMessage, newMessage);
      newMessageAvailable = false;
    }
    P.displayReset();
  }
  readSerial();
}

nifelheim
Den första
Inlägg: 2318
Blev medlem: 27 mars 2008, 22:31:16
Ort: stockholm

Re: Scroller / Arduino

Inlägg av nifelheim »

Om du kollar sist i MD_MAX72xx_font.cpp så ligger standard fonten där,
"a umlaut " är väl "ä"?
'A dot' kanske är Å ?


Kod: Markera allt

/*
MD_MAX72xx - Library for using a MAX7219/7221 LED matrix controller
See header file for comments
This file contains methods that work with the fonts and characters defined in the library
Copyright (C) 2012-14 Marco Colli. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 */
#include <Arduino.h>
#include "MD_MAX72xx.h"
#include "MD_MAX72xx_lib.h"

/**
 * \file
 * \brief Implements font definition and methods
 */

#if USE_LOCAL_FONT
// Local font handling functions if the option is enabled

void MD_MAX72XX::buildFontIndex(void)
{
  uint16_t	offset = 0;

  if (_fontIndex == nullptr)
    return;

  PRINTS("\nBuilding font index");
  for (uint16_t i=0; i<ASCII_INDEX_SIZE; i++)
  {
	  _fontIndex[i] = offset;
	  PRINT("\nASCII '", i);
	  PRINT("' offset ", _fontIndex[i]);
	  offset += pgm_read_byte(_fontData+offset);
	  offset++;
  }
}

uint8_t MD_MAX72XX::getMaxFontWidth(void)
{
  uint8_t max = 0;
  uint8_t charWidth;
  uint16_t	offset = 0;

  PRINTS("\nFinding max font width");
  if (_fontData != nullptr)
  {
    for (uint16_t i = 0; i < ASCII_INDEX_SIZE; i++)
    {
      charWidth = pgm_read_byte(_fontData + offset);
      /*
      PRINT("\nASCII '", i);
      PRINT("' offset ", offset);
      PRINT("' width ", charWidth);
      */
      if (charWidth > max)
      {
        max = charWidth;
        PRINT(":", max);
      }
      offset += charWidth;  // skip character data
      offset++; // skip size byte
    }
  }
  PRINT(" max ", max);

  return(max);
}

uint16_t MD_MAX72XX::getFontCharOffset(uint8_t c)
{
  PRINT("\nfontOffset ASCII ", c);

  if (_fontIndex != nullptr)
  {
    PRINTS(" from Table");
    return(_fontIndex[c]);
  }
  else
  {
    PRINTS(" by Search ");

    uint16_t	offset = 0;

    for (uint8_t i=0; i<c; i++)
    {
      PRINTS(".");
	    offset += pgm_read_byte(_fontData+offset);
	    offset++;	// skip size byte we used above
    }
    PRINT(" searched offset ", offset);

	  return(offset);
  }
}

bool MD_MAX72XX::setFont(fontType_t *f)
{
  _fontData = (f == nullptr ? _sysfont_var : f);

  buildFontIndex();

  return(true);
}

uint8_t MD_MAX72XX::getChar(uint8_t c, uint8_t size, uint8_t *buf)
{
  PRINT("\ngetChar: '", (char)c);
  PRINT("' ASC ", c);
  PRINT(" - bufsize ", size);

  if (buf == nullptr)
    return(0);

  uint16_t offset = getFontCharOffset(c);
  size = min(size, pgm_read_byte(_fontData+offset));

  offset++;	// skip the size byte

  for (uint8_t i=0; i<size; i++)
    *buf++ = pgm_read_byte(_fontData+offset+i);

  return(size);
}

uint8_t MD_MAX72XX::setChar(uint16_t col, uint8_t c)
{
  PRINT("\nsetChar: '", c);
  PRINT("' column ", col);
  boolean	b = _updateEnabled;

  uint16_t offset = getFontCharOffset(c);
  uint8_t size = pgm_read_byte(_fontData+offset);

  offset++;	// skip the size byte

  _updateEnabled = false;
  for (int8_t i=0; i<size; i++)
  {
    uint8_t colData = pgm_read_byte(_fontData+offset+i);
	  setColumn(col--, colData);
  }
  _updateEnabled = b;

  if (_updateEnabled) flushBufferAll();

  return(size);
}

// Standard font - variable spacing
MD_MAX72XX::fontType_t PROGMEM _sysfont_var[] =
{
  0,	// 0 - 'Empty Cell'
  5, 0x3e, 0x5b, 0x4f, 0x5b, 0x3e,	// 1 - 'Sad Smiley'
  5, 0x3e, 0x6b, 0x4f, 0x6b, 0x3e,	// 2 - 'Happy Smiley'
  5, 0x1c, 0x3e, 0x7c, 0x3e, 0x1c,	// 3 - 'Heart'
  5, 0x18, 0x3c, 0x7e, 0x3c, 0x18,	// 4 - 'Diamond'
  5, 0x1c, 0x57, 0x7d, 0x57, 0x1c,	// 5 - 'Clubs'
  5, 0x1c, 0x5e, 0x7f, 0x5e, 0x1c,	// 6 - 'Spades'
  4, 0x00, 0x18, 0x3c, 0x18,	// 7 - 'Bullet Point'
  5, 0xff, 0xe7, 0xc3, 0xe7, 0xff,	// 8 - 'Rev Bullet Point'
  4, 0x00, 0x18, 0x24, 0x18,	// 9 - 'Hollow Bullet Point'
  5, 0xff, 0xe7, 0xdb, 0xe7, 0xff,	// 10 - 'Rev Hollow BP'
  5, 0x30, 0x48, 0x3a, 0x06, 0x0e,	// 11 - 'Male'
  5, 0x26, 0x29, 0x79, 0x29, 0x26,	// 12 - 'Female'
  5, 0x40, 0x7f, 0x05, 0x05, 0x07,	// 13 - 'Music Note 1'
  5, 0x40, 0x7f, 0x05, 0x25, 0x3f,	// 14 - 'Music Note 2'
  5, 0x5a, 0x3c, 0xe7, 0x3c, 0x5a,	// 15 - 'Snowflake'
  5, 0x7f, 0x3e, 0x1c, 0x1c, 0x08,	// 16 - 'Right Pointer'
  5, 0x08, 0x1c, 0x1c, 0x3e, 0x7f,	// 17 - 'Left Pointer'
  5, 0x14, 0x22, 0x7f, 0x22, 0x14,	// 18 - 'UpDown Arrows'
  5, 0x5f, 0x5f, 0x00, 0x5f, 0x5f,	// 19 - 'Double Exclamation'
  5, 0x06, 0x09, 0x7f, 0x01, 0x7f,	// 20 - 'Paragraph Mark'
  4, 0x66, 0x89, 0x95, 0x6a,	// 21 - 'Section Mark'
  5, 0x60, 0x60, 0x60, 0x60, 0x60,	// 22 - 'Double Underline'
  5, 0x94, 0xa2, 0xff, 0xa2, 0x94,	// 23 - 'UpDown Underlined'
  5, 0x08, 0x04, 0x7e, 0x04, 0x08,	// 24 - 'Up Arrow'
  5, 0x10, 0x20, 0x7e, 0x20, 0x10,	// 25 - 'Down Arrow'
  5, 0x08, 0x08, 0x2a, 0x1c, 0x08,	// 26 - 'Right Arrow'
  5, 0x08, 0x1c, 0x2a, 0x08, 0x08,	// 27 - 'Left Arrow'
  5, 0x1e, 0x10, 0x10, 0x10, 0x10,	// 28 - 'Angled'
  5, 0x0c, 0x1e, 0x0c, 0x1e, 0x0c,	// 29 - 'Squashed #'
  5, 0x30, 0x38, 0x3e, 0x38, 0x30,	// 30 - 'Up Pointer'
  5, 0x06, 0x0e, 0x3e, 0x0e, 0x06,	// 31 - 'Down Pointer'
  2, 0x00, 0x00,	// 32 - 'Space'
  1, 0x5f,	// 33 - '!'
  3, 0x07, 0x00, 0x07,	// 34 - '"'
  5, 0x14, 0x7f, 0x14, 0x7f, 0x14,	// 35 - '#'
  5, 0x24, 0x2a, 0x7f, 0x2a, 0x12,	// 36 - '$'
  5, 0x23, 0x13, 0x08, 0x64, 0x62,	// 37 - '%'
  5, 0x36, 0x49, 0x56, 0x20, 0x50,	// 38 - '&'
  3, 0x08, 0x07, 0x03,	// 39 - '''
  3, 0x1c, 0x22, 0x41,	// 40 - '('
  3, 0x41, 0x22, 0x1c,	// 41 - ')'
  5, 0x2a, 0x1c, 0x7f, 0x1c, 0x2a,	// 42 - '*'
  5, 0x08, 0x08, 0x3e, 0x08, 0x08,	// 43 - '+'
  3, 0x80, 0x70, 0x30,	// 44 - ','
  5, 0x08, 0x08, 0x08, 0x08, 0x08,	// 45 - '-'
  2, 0x60, 0x60,	// 46 - '.'
  5, 0x20, 0x10, 0x08, 0x04, 0x02,	// 47 - '/'
  5, 0x3e, 0x51, 0x49, 0x45, 0x3e,	// 48 - '0'
  3, 0x42, 0x7f, 0x40,	// 49 - '1'
  5, 0x72, 0x49, 0x49, 0x49, 0x46,	// 50 - '2'
  5, 0x21, 0x41, 0x49, 0x4d, 0x33,	// 51 - '3'
  5, 0x18, 0x14, 0x12, 0x7f, 0x10,	// 52 - '4'
  5, 0x27, 0x45, 0x45, 0x45, 0x39,	// 53 - '5'
  5, 0x3c, 0x4a, 0x49, 0x49, 0x31,	// 54 - '6'
  5, 0x41, 0x21, 0x11, 0x09, 0x07,	// 55 - '7'
  5, 0x36, 0x49, 0x49, 0x49, 0x36,	// 56 - '8'
  5, 0x46, 0x49, 0x49, 0x29, 0x1e,	// 57 - '9'
  1, 0x14,	// 58 - ':'
  2, 0x80, 0x68,	// 59 - ';'
  4, 0x08, 0x14, 0x22, 0x41,	// 60 - '<'
  5, 0x14, 0x14, 0x14, 0x14, 0x14,	// 61 - '='
  4, 0x41, 0x22, 0x14, 0x08,	// 62 - '>'
  5, 0x02, 0x01, 0x59, 0x09, 0x06,	// 63 - '?'
  5, 0x3e, 0x41, 0x5d, 0x59, 0x4e,	// 64 - '@'
  5, 0x7c, 0x12, 0x11, 0x12, 0x7c,	// 65 - 'A'
  5, 0x7f, 0x49, 0x49, 0x49, 0x36,	// 66 - 'B'
  5, 0x3e, 0x41, 0x41, 0x41, 0x22,	// 67 - 'C'
  5, 0x7f, 0x41, 0x41, 0x41, 0x3e,	// 68 - 'D'
  5, 0x7f, 0x49, 0x49, 0x49, 0x41,	// 69 - 'E'
  5, 0x7f, 0x09, 0x09, 0x09, 0x01,	// 70 - 'F'
  5, 0x3e, 0x41, 0x41, 0x51, 0x73,	// 71 - 'G'
  5, 0x7f, 0x08, 0x08, 0x08, 0x7f,	// 72 - 'H'
  3, 0x41, 0x7f, 0x41,	// 73 - 'I'
  5, 0x20, 0x40, 0x41, 0x3f, 0x01,	// 74 - 'J'
  5, 0x7f, 0x08, 0x14, 0x22, 0x41,	// 75 - 'K'
  5, 0x7f, 0x40, 0x40, 0x40, 0x40,	// 76 - 'L'
  5, 0x7f, 0x02, 0x1c, 0x02, 0x7f,	// 77 - 'M'
  5, 0x7f, 0x04, 0x08, 0x10, 0x7f,	// 78 - 'N'
  5, 0x3e, 0x41, 0x41, 0x41, 0x3e,	// 79 - 'O'
  5, 0x7f, 0x09, 0x09, 0x09, 0x06,	// 80 - 'P'
  5, 0x3e, 0x41, 0x51, 0x21, 0x5e,	// 81 - 'Q'
  5, 0x7f, 0x09, 0x19, 0x29, 0x46,	// 82 - 'R'
  5, 0x26, 0x49, 0x49, 0x49, 0x32,	// 83 - 'S'
  5, 0x03, 0x01, 0x7f, 0x01, 0x03,	// 84 - 'T'
  5, 0x3f, 0x40, 0x40, 0x40, 0x3f,	// 85 - 'U'
  5, 0x1f, 0x20, 0x40, 0x20, 0x1f,	// 86 - 'V'
  5, 0x3f, 0x40, 0x38, 0x40, 0x3f,	// 87 - 'W'
  5, 0x63, 0x14, 0x08, 0x14, 0x63,	// 88 - 'X'
  5, 0x03, 0x04, 0x78, 0x04, 0x03,	// 89 - 'Y'
  5, 0x61, 0x59, 0x49, 0x4d, 0x43,	// 90 - 'Z'
  3, 0x7f, 0x41, 0x41,	// 91 - '['
  5, 0x02, 0x04, 0x08, 0x10, 0x20,	// 92 - '\'
  3, 0x41, 0x41, 0x7f,	// 93 - ']'
  5, 0x04, 0x02, 0x01, 0x02, 0x04,	// 94 - '^'
  5, 0x40, 0x40, 0x40, 0x40, 0x40,	// 95 - '_'
  3, 0x03, 0x07, 0x08,	// 96 - '`'
  5, 0x20, 0x54, 0x54, 0x78, 0x40,	// 97 - 'a'
  5, 0x7f, 0x28, 0x44, 0x44, 0x38,	// 98 - 'b'
  5, 0x38, 0x44, 0x44, 0x44, 0x28,	// 99 - 'c'
  5, 0x38, 0x44, 0x44, 0x28, 0x7f,	// 100 - 'd'
  5, 0x38, 0x54, 0x54, 0x54, 0x18,	// 101 - 'e'
  4, 0x08, 0x7e, 0x09, 0x02,	// 102 - 'f'
  5, 0x18, 0xa4, 0xa4, 0x9c, 0x78,	// 103 - 'g'
  5, 0x7f, 0x08, 0x04, 0x04, 0x78,	// 104 - 'h'
  3, 0x44, 0x7d, 0x40,	// 105 - 'i'
  4, 0x40, 0x80, 0x80, 0x7a,	// 106 - 'j'
  4, 0x7f, 0x10, 0x28, 0x44,	// 107 - 'k'
  3, 0x41, 0x7f, 0x40,	// 108 - 'l'
  5, 0x7c, 0x04, 0x78, 0x04, 0x78,	// 109 - 'm'
  5, 0x7c, 0x08, 0x04, 0x04, 0x78,	// 110 - 'n'
  5, 0x38, 0x44, 0x44, 0x44, 0x38,	// 111 - 'o'
  5, 0xfc, 0x18, 0x24, 0x24, 0x18,	// 112 - 'p'
  5, 0x18, 0x24, 0x24, 0x18, 0xfc,	// 113 - 'q'
  5, 0x7c, 0x08, 0x04, 0x04, 0x08,	// 114 - 'r'
  5, 0x48, 0x54, 0x54, 0x54, 0x24,	// 115 - 's'
  4, 0x04, 0x3f, 0x44, 0x24,	// 116 - 't'
  5, 0x3c, 0x40, 0x40, 0x20, 0x7c,	// 117 - 'u'
  5, 0x1c, 0x20, 0x40, 0x20, 0x1c,	// 118 - 'v'
  5, 0x3c, 0x40, 0x30, 0x40, 0x3c,	// 119 - 'w'
  5, 0x44, 0x28, 0x10, 0x28, 0x44,	// 120 - 'x'
  5, 0x4c, 0x90, 0x90, 0x90, 0x7c,	// 121 - 'y'
  5, 0x44, 0x64, 0x54, 0x4c, 0x44,	// 122 - 'z'
  3, 0x08, 0x36, 0x41,	// 123 - '{'
  1, 0x77,	// 124 - '|'
  3, 0x41, 0x36, 0x08,	// 125 - '}'
  5, 0x02, 0x01, 0x02, 0x04, 0x02,	// 126 - '~'
  5, 0x3c, 0x26, 0x23, 0x26, 0x3c,	// 127 - 'Hollow Up Arrow'
  5, 0x1e, 0xa1, 0xa1, 0x61, 0x12,	// 128 - 'C sedilla'
  5, 0x38, 0x42, 0x40, 0x22, 0x78,	// 129 - 'u umlaut'
  5, 0x38, 0x54, 0x54, 0x55, 0x59,	// 130 - 'e acute'
  5, 0x21, 0x55, 0x55, 0x79, 0x41,	// 131 - 'a accent'
  5, 0x21, 0x54, 0x54, 0x78, 0x41,	// 132 - 'a umlaut'
  5, 0x21, 0x55, 0x54, 0x78, 0x40,	// 133 - 'a grave'
  5, 0x20, 0x54, 0x55, 0x79, 0x40,	// 134 - 'a acute'
  5, 0x18, 0x3c, 0xa4, 0xe4, 0x24,	// 135 - 'c sedilla'
  5, 0x39, 0x55, 0x55, 0x55, 0x59,	// 136 - 'e accent'
  5, 0x38, 0x55, 0x54, 0x55, 0x58,	// 137 - 'e umlaut'
  5, 0x39, 0x55, 0x54, 0x54, 0x58,	// 138 - 'e grave'
  3, 0x45, 0x7c, 0x41,	// 139 - 'i umlaut'
  4, 0x02, 0x45, 0x7d, 0x42,	// 140 - 'i hat'
  4, 0x01, 0x45, 0x7c, 0x40,	// 141 - 'i grave'
  5, 0xf0, 0x29, 0x24, 0x29, 0xf0,	// 142 - 'A umlaut'
  5, 0xf0, 0x28, 0x25, 0x28, 0xf0,	// 143 - 'A dot'
  4, 0x7c, 0x54, 0x55, 0x45,	// 144 - 'E grave'
  7, 0x20, 0x54, 0x54, 0x7c, 0x54, 0x54, 0x08,	// 145 - 'ae'
  6, 0x7c, 0x0a, 0x09, 0x7f, 0x49, 0x49,	// 146 - 'AE'
  5, 0x32, 0x49, 0x49, 0x49, 0x32,	// 147 - 'o hat'
  5, 0x30, 0x4a, 0x48, 0x4a, 0x30,	// 148 - 'o umlaut'
  5, 0x32, 0x4a, 0x48, 0x48, 0x30,	// 149 - 'o grave'
  5, 0x3a, 0x41, 0x41, 0x21, 0x7a,	// 150 - 'u hat'
  5, 0x3a, 0x42, 0x40, 0x20, 0x78,	// 151 - 'u grave'
  4, 0x9d, 0xa0, 0xa0, 0x7d,	// 152 - 'y umlaut'
  5, 0x38, 0x45, 0x44, 0x45, 0x38,	// 153 - 'O umlaut'
  5, 0x3c, 0x41, 0x40, 0x41, 0x3c,	// 154 - 'U umlaut'
  5, 0x3c, 0x24, 0xff, 0x24, 0x24,	// 155 - 'Cents'
  5, 0x48, 0x7e, 0x49, 0x43, 0x66,	// 156 - 'Pounds'
  5, 0x2b, 0x2f, 0xfc, 0x2f, 0x2b,	// 157 - 'Yen'
  5, 0xff, 0x09, 0x29, 0xf6, 0x20,	// 158 - 'R +'
  5, 0xc0, 0x88, 0x7e, 0x09, 0x03,	// 159 - 'f notation'
  5, 0x20, 0x54, 0x54, 0x79, 0x41,	// 160 - 'a acute'
  3, 0x44, 0x7d, 0x41,	// 161 - 'i acute'
  5, 0x30, 0x48, 0x48, 0x4a, 0x32,	// 162 - 'o acute'
  5, 0x38, 0x40, 0x40, 0x22, 0x7a,	// 163 - 'u acute'
  4, 0x7a, 0x0a, 0x0a, 0x72,	// 164 - 'n accent'
  5, 0x7d, 0x0d, 0x19, 0x31, 0x7d,	// 165 - 'N accent'
  5, 0x26, 0x29, 0x29, 0x2f, 0x28,	// 166
  5, 0x26, 0x29, 0x29, 0x29, 0x26,	// 167
  5, 0x30, 0x48, 0x4d, 0x40, 0x20,	// 168 - 'Inverted ?'
  5, 0x38, 0x08, 0x08, 0x08, 0x08,	// 169 - 'LH top corner'
  5, 0x08, 0x08, 0x08, 0x08, 0x38,	// 170 - 'RH top corner'
  5, 0x2f, 0x10, 0xc8, 0xac, 0xba,	// 171 - '1/2'
  5, 0x2f, 0x10, 0x28, 0x34, 0xfa,	// 172 - '1/4'
  1, 0x7b,	// 173 - '| split'
  5, 0x08, 0x14, 0x2a, 0x14, 0x22,	// 174 - '<<'
  5, 0x22, 0x14, 0x2a, 0x14, 0x08,	// 175 - '>>'
  5, 0xaa, 0x00, 0x55, 0x00, 0xaa,	// 176 - '30% shading'
  5, 0xaa, 0x55, 0xaa, 0x55, 0xaa,	// 177 - '50% shading'
  5, 0x00, 0x00, 0x00, 0x00, 0xff,	// 178 - 'Right side'
  5, 0x10, 0x10, 0x10, 0x10, 0xff,	// 179 - 'Right T'
  5, 0x14, 0x14, 0x14, 0x14, 0xff,	// 180 - 'Right T double H'
  5, 0x10, 0x10, 0xff, 0x00, 0xff,	// 181 - 'Right T double V'
  5, 0x10, 0x10, 0xf0, 0x10, 0xf0,	// 182 - 'Top Right double V'
  5, 0x14, 0x14, 0x14, 0x14, 0xfc,	// 183 - 'Top Right double H'
  5, 0x14, 0x14, 0xf7, 0x00, 0xff,	// 184 - 'Right T double all'
  5, 0x00, 0x00, 0xff, 0x00, 0xff,	// 185 - 'Right side double'
  5, 0x14, 0x14, 0xf4, 0x04, 0xfc,	// 186 - 'Top Right double'
  5, 0x14, 0x14, 0x17, 0x10, 0x1f,	// 187 - 'Bot Right double'
  5, 0x10, 0x10, 0x1f, 0x10, 0x1f,	// 188 - 'Bot Right double V'
  5, 0x14, 0x14, 0x14, 0x14, 0x1f,	// 189 - 'Bot Right double H'
  5, 0x10, 0x10, 0x10, 0x10, 0xf0,	// 190 - 'Top Right'
  5, 0x00, 0x00, 0x00, 0x1f, 0x10,	// 191 - 'Bot Left'
  5, 0x10, 0x10, 0x10, 0x1f, 0x10,	// 192 - 'Bot T'
  5, 0x10, 0x10, 0x10, 0xf0, 0x10,	// 193 - 'Top T'
  5, 0x00, 0x00, 0x00, 0xff, 0x10,	// 194 - 'Left T'
  5, 0x10, 0x10, 0x10, 0x10, 0x10,	// 195 - 'Top side'
  5, 0x10, 0x10, 0x10, 0xff, 0x10,	// 196 - 'Center +'
  5, 0x00, 0x00, 0x00, 0xff, 0x14,	// 197 - 'Left side double H'
  5, 0x00, 0x00, 0xff, 0x00, 0xff,	// 198 - 'Left side double'
  5, 0x00, 0x00, 0x1f, 0x10, 0x17,	// 199 - 'Bot Left double V'
  5, 0x00, 0x00, 0xfc, 0x04, 0xf4,	// 200 - 'Top Left double V'
  5, 0x14, 0x14, 0x17, 0x10, 0x17,	// 201 - 'Bot T double'
  5, 0x14, 0x14, 0xf4, 0x04, 0xf4,	// 202 - 'Top T double'
  5, 0x00, 0x00, 0xff, 0x00, 0xf7,	// 203 - 'Left Side double spl'
  5, 0x14, 0x14, 0x14, 0x14, 0x14,	// 204 - 'Center double'
  5, 0x14, 0x14, 0xf7, 0x00, 0xf7,	// 205 - 'Center + double'
  5, 0x14, 0x14, 0x14, 0x17, 0x14,	// 206 - 'Bot T double H'
  5, 0x10, 0x10, 0x1f, 0x10, 0x1f,	// 207 - 'Bot Right double V'
  5, 0x14, 0x14, 0x14, 0xf4, 0x14,	// 208 - 'Top T double H'
  5, 0x10, 0x10, 0xf0, 0x10, 0xf0,	// 209 - 'Top Right double V'
  5, 0x00, 0x00, 0x1f, 0x10, 0x1f,	// 210 - 'Bot Left double V'
  5, 0x00, 0x00, 0x00, 0x1f, 0x14,	// 211 - 'Bot Right double H'
  5, 0x00, 0x00, 0x00, 0xfc, 0x14,	// 212 - 'Top Right double H'
  5, 0x00, 0x00, 0xf0, 0x10, 0xf0,	// 213 - 'Top Right double V'
  5, 0x10, 0x10, 0xff, 0x10, 0xff,	// 214 - 'Center + double V'
  5, 0x14, 0x14, 0x14, 0xff, 0x14,	// 215 - 'Center + double H'
  5, 0x10, 0x10, 0x10, 0x10, 0x1f,	// 216 - 'Bot Right'
  5, 0x00, 0x00, 0x00, 0xf0, 0x10,	// 217 - 'Top Left'
  5, 0xff, 0xff, 0xff, 0xff, 0xff,	// 218 - 'Full Block'
  5, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,	// 219 - 'Half Block Bottom'
  3, 0xff, 0xff, 0xff,	// 220 - 'Half Block LHS'
  5, 0x00, 0x00, 0x00, 0xff, 0xff,	// 221 - 'Half Block RHS'
  5, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,	// 222 - 'Half Block Top'
  5, 0x38, 0x44, 0x44, 0x38, 0x44,	// 223 - 'Alpha'
  5, 0x7c, 0x2a, 0x2a, 0x3e, 0x14,	// 224 - 'Beta'
  5, 0x7e, 0x02, 0x02, 0x06, 0x06,	// 225 - 'Gamma'
  5, 0x02, 0x7e, 0x02, 0x7e, 0x02,	// 226 - 'Pi'
  5, 0x63, 0x55, 0x49, 0x41, 0x63,	// 227 - 'Sigma'
  5, 0x38, 0x44, 0x44, 0x3c, 0x04,	// 228 - 'Theta'
  5, 0x40, 0x7e, 0x20, 0x1e, 0x20,	// 229 - 'mu'
  5, 0x06, 0x02, 0x7e, 0x02, 0x02,	// 230 - 'Tau'
  5, 0x99, 0xa5, 0xe7, 0xa5, 0x99,	// 231
  5, 0x1c, 0x2a, 0x49, 0x2a, 0x1c,	// 232
  5, 0x4c, 0x72, 0x01, 0x72, 0x4c,	// 233
  5, 0x30, 0x4a, 0x4d, 0x4d, 0x30,	// 234
  5, 0x30, 0x48, 0x78, 0x48, 0x30,	// 235
  5, 0xbc, 0x62, 0x5a, 0x46, 0x3d,	// 236 - 'Zero Slashed'
  4, 0x3e, 0x49, 0x49, 0x49,	// 237
  5, 0x7e, 0x01, 0x01, 0x01, 0x7e,	// 238
  5, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a,	// 239 - '3 Bar Equals'
  5, 0x44, 0x44, 0x5f, 0x44, 0x44,	// 240 - '+/-'
  5, 0x40, 0x51, 0x4a, 0x44, 0x40,	// 241 - '>='
  5, 0x40, 0x44, 0x4a, 0x51, 0x40,	// 242 - '<='
  5, 0x00, 0x00, 0xff, 0x01, 0x03,	// 243 - 'Top of Integral'
  3, 0xe0, 0x80, 0xff,	// 244 - 'Bot of Integral'
  5, 0x08, 0x08, 0x6b, 0x6b, 0x08,	// 245 - 'Divide'
  5, 0x36, 0x12, 0x36, 0x24, 0x36,	// 246 - 'Wavy ='
  5, 0x06, 0x0f, 0x09, 0x0f, 0x06,	// 247 - 'Degree'
  4, 0x00, 0x00, 0x18, 0x18,	// 248 - 'Math Product'
  4, 0x00, 0x00, 0x10, 0x10,	// 249 - 'Short Dash'
  5, 0x30, 0x40, 0xff, 0x01, 0x01,	// 250 - 'Square Root'
  5, 0x00, 0x1f, 0x01, 0x01, 0x1e,	// 251 - 'Superscript n'
  5, 0x00, 0x19, 0x1d, 0x17, 0x12,	// 252 - 'Superscript 2'
  5, 0x00, 0x3c, 0x3c, 0x3c, 0x3c,	// 253 - 'Centered Square'
  5, 0xff, 0x81, 0x81, 0x81, 0xff,	// 254 - 'Full Frame'
  5, 0xff, 0xff, 0xff, 0xff, 0xff,	// 255 - 'Full Block'
};

#endif //INCLUDE_LOCAL_FONT



Det verkar finnas stöd för att enkelt göra egna tecken / fonter, om du inte vill in och "bitbanga"

https://majicdesigns.github.io/MD_MAX72 ... ility.html

:)
Användarvisningsbild
GeekJoan
Admin
Inlägg: 10642
Blev medlem: 26 maj 2003, 15:59:27
Ort: Solna

Re: Scroller / Arduino

Inlägg av GeekJoan »

Jo, men om jag vill skicka tex 'A dot' från serial monitorn hur skriver jag?
Nu skriver jag ju bara: Du e dum ENTER så kommer det i scrollen.
nifelheim
Den första
Inlägg: 2318
Blev medlem: 27 mars 2008, 22:31:16
Ort: stockholm

Re: Scroller / Arduino

Inlägg av nifelheim »

kan du inte prova att bara ändra i koden och skicka tecknet till dispayen för att se om det funkar.
Att det är lite svårare från serie monitorn beror nog på tecken kodningen , om det är UTF8 så blir det ju flera bytes av special tecknen.

Jag ska testa :)
nifelheim
Den första
Inlägg: 2318
Blev medlem: 27 mars 2008, 22:31:16
Ort: stockholm

Re: Scroller / Arduino

Inlägg av nifelheim »

Det kom en semla emellan :)

Det finns ett färdigt test,
I menyn under
Fil->Exempel->08Strings->CharacterAnalysis


Kör jag den och skicka "åäöÅÄÖ" blir svaret

Kod: Markera allt


You sent me: '⸮'  ASCII Value: 229

Give me another byte:

You sent me: '⸮'  ASCII Value: 228

Give me another byte:

You sent me: '⸮'  ASCII Value: 246

Give me another byte:

You sent me: '⸮'  ASCII Value: 197

Give me another byte:

You sent me: '⸮'  ASCII Value: 196

Give me another byte:

You sent me: '⸮'  ASCII Value: 214

Give me another byte:

Stämmer det med dom tecken du får?
Om det gör det är det väl bara byta plats på dom i teckentabellen så dom hamnar på "rätt" ställe :)



edit : menar alltså när du kör ditt program , dvs 228 blir 'Theta' 229 blir 'mu' osv.
Användarvisningsbild
GeekJoan
Admin
Inlägg: 10642
Blev medlem: 26 maj 2003, 15:59:27
Ort: Solna

Re: Scroller / Arduino

Inlägg av GeekJoan »

Ska testa. Tack!
Skriv svar