Programskim kodom se upravlja maketom malog DC motora koji je spojen na inkrementalni enkoder. Sa inkrementalnog enkodera se čitaju dvije faze impulsa pomoću kojih se računa brzina vrtnje iz impusla u vrenenu i smjer vrtnje iz odnosa stanja faza enkodera. Popunjenost PWM-a se zadaje potenciometrom a promjena smjera i pokretanje je se upravlja tipkalima.
Revision 0:a19b3eba5b1b, committed 2020-02-11
- Comitter:
- mlucan
- Date:
- Tue Feb 11 09:55:03 2020 +0000
- Commit message:
- I2c oled, pisanje na ekran;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CriusOLED.h Tue Feb 11 09:55:03 2020 +0000 @@ -0,0 +1,276 @@ +/* ============================================ +Modified Code from Crius +The CriusOLED Hardware MUST be modified for correct function of ACK +Copyright (c) 2014 Michael Ruck michael@ruck.com + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +=============================================== +*/ +#include "data.h" +#define OLED_ADDR (0x78) + +I2C i2c(p9, p10); + +void displayOn(void); +void displayOff(void); +void SendByte(unsigned char data); +void sendcommand(unsigned char com); +void SendByte(unsigned char com); +void printBigNumber(unsigned char s, int X, int Y); +void SendByteXY(unsigned char data, int X, int Y); + + +//==========================================================// +// Turns display on. +void displayOn(void) +{ + sendcommand(0xaf); //display on +} + +//==========================================================// +// Turns display off. +void displayOff(void) +{ + sendcommand(0xae); //display off +} +//==========================================================// +// Actually this sends a byte, not a char to draw in the display. +// Display's chars uses 8 byte font the small ones and 96 bytes +// for the big number font. +void SendByte(unsigned char data) +{ + //Create a temporary buffer + char buff[2]; + + //Load the control byte and 8-bit data + buff[0] = (0x40); + buff[1] = data; + + //Write the data + i2c.write(OLED_ADDR, buff, 2); + +} + +//==========================================================// +// Used to send commands to the display. +void sendcommand(unsigned char com) +{ + //Create a temporary buffer + char buff[2]; + + //Load the control byte and 8-bit command + buff[0] = 0x00; + buff[1] = com; + + //Write the command + i2c.write(OLED_ADDR, buff, 2); +} +//==========================================================// +// Set the cursor position in a 16 COL * 8 ROW map. +void setXY(unsigned char row,unsigned char col) +{ + sendcommand(0xb0+row); //set page address + sendcommand(0x02+(8*col&0x0f)); //set low col address + sendcommand(0x10+((8*col>>4)&0x0f)); //set high col address +} +//==========================================================// +// Clears the display by sendind 0 to all the screen map. +void clear_display(void) +{ + unsigned char i,k; + for(k=0; k<8; k++) { + setXY(k,0); + { + for(i=0; i<128; i++) { //clear all COL + SendByte(0); //clear all COL + //delay(10); + } + } + } +} +//==========================================================// +// Resets display depending on the actual mode. +void reset_display(void) +{ + displayOff(); + clear_display(); + + + displayOn(); +} + +//==========================================================// +void printBigTime(char *s) +{ + + int Y=0; + int lon = strlen(s); + if(lon == 3) { + Y = 0; + } else if (lon == 2) { + Y = 3; + } else if (lon == 1) { + Y = 6; + } + + int X = 2; + while(*s) { + printBigNumber(*s, X, Y); + + Y+=3; + X=2; + setXY(X,Y); + *s++; + } +} + + +//==========================================================// +// Prints a display big number (96 bytes) in coordinates X Y, +// being multiples of 8. This means we have 16 COLS (0-15) +// and 8 ROWS (0-7). +void printBigNumber(unsigned char s, int X, int Y) +{ + setXY(X,Y); + int salto=0; + for(int i=0; i<96; i++) { + if(s == ' ') { + SendByte(0); + } else + SendByte(bigNumbers[s-0x30][i]); + + if(salto == 23) { + salto = 0; + X++; + setXY(X,Y); + } else { + salto++; + } + } +} +//==========================================================// +// Prints a display char (not just a byte) in coordinates X Y, +// being multiples of 8. This means we have 16 COLS (0-15) +// and 8 ROWS (0-7). +void SendByteXY(unsigned char data, int X, int Y) +{ + i2c.start(); + i2c.write(OLED_ADDR); + i2c.write(0x40); + + for(int i=0; i<8; i++) + i2c.write((int)(myFont[data-0x20]+i)); // <<------------------------------------- + + i2c.stop(); // stop transmitting +} + + + +//==========================================================// +// Prints a string regardless the cursor position. +void sendStr(unsigned char *s) +{ + unsigned char i=0; + while(*s) { + for(i=0; i<8; i++) { + SendByte(myFont[*s-0x20][i]); + } + *s++; + } +} + + + + + + + +//==========================================================// +// Prints a string in coordinates X Y, being multiples of 8. +// This means we have 16 COLS (0-15) and 8 ROWS (0-7). +void sendStrXY( char *s, int X, int Y) +{ + setXY(X,Y); + unsigned char i=0; + while(*s) { + for(i=0; i<8; i++) { + SendByte(myFont[*s-0x20][i]); + } + *s++; + } +} + + + +//==========================================================// +// Inits oled and draws logo at startup +void init_OLED(void) +{ + sendcommand(0xae); //display off + sendcommand(0xa6); //Set Normal Display (default) + // Adafruit Init sequence for 128x64 OLED module + sendcommand(0xAE); //DISPLAYOFF + sendcommand(0xD5); //SETDISPLAYCLOCKDIV + sendcommand(0x80); // the suggested ratio 0x80 + sendcommand(0xA8); //SSD1306_SETMULTIPLEX + sendcommand(0x3F); + sendcommand(0xD3); //SETDISPLAYOFFSET + sendcommand(0x0); //no offset + sendcommand(0x40 | 0x0); //SETSTARTLINE + sendcommand(0x8D); //CHARGEPUMP + sendcommand(0x14); + sendcommand(0x20); //MEMORYMODE + sendcommand(0x00); //0x0 act like ks0108 + + sendcommand(0xA0 | 0x1); //SEGREMAP //Rotate screen 180 deg + //sendcommand(0xA0); + + sendcommand(0xC8); //COMSCANDEC Rotate screen 180 Deg + //sendcommand(0xC0); + + sendcommand(0xDA); //0xDA + sendcommand(0x12); //COMSCANDEC + sendcommand(0x81); //SETCONTRAS + sendcommand(0xCF); // + sendcommand(0xd9); //SETPRECHARGE + sendcommand(0xF1); + sendcommand(0xDB); //SETVCOMDETECT + sendcommand(0x40); + sendcommand(0xA4); //DISPLAYALLON_RESUME + sendcommand(0xA6); //NORMALDISPLAY + + clear_display(); + sendcommand(0x2e); // stop scroll + //----------------------------REVERSE comments----------------------------// + // sendcommand(0xa0); //seg re-map 0->127(default) + // sendcommand(0xa1); //seg re-map 127->0 + // sendcommand(0xc8); + // delay(1000); + //----------------------------REVERSE comments----------------------------// + // sendcommand(0xa7); //Set Inverse Display + // sendcommand(0xae); //display off + sendcommand(0x20); //Set Memory Addressing Mode + sendcommand(0x00); //Set Memory Addressing Mode ab Horizontal addressing mode + // sendcommand(0x02); // Set Memory Addressing Mode ab Page addressing mode(RESET) + + setXY(0,0); + + sendcommand(0xaf); //display on + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PisanjeNaEkran.cpp Tue Feb 11 09:55:03 2020 +0000 @@ -0,0 +1,57 @@ +#include "PisanjeNaEkran.h" +#include "mbed.h" +#include "CriusOLED.h" + + +PisanjeNaEkran::PisanjeNaEkran(PinName pin) :ain(pin) +{ + i2c.frequency(40000); + init_OLED(); + displayOn(); + reset_display(); +}; + +void PisanjeNaEkran::ekran(int brzina_1, int brzina_2, int frekvencija, bool smjer, bool smot) +{ + char buf[9]; + char brz1[9]; + char brz2[9]; + char frekv[9]; + float dataAI; + + dataAI=ain*100; + sprintf(buf, "%.2f ", dataAI); + sprintf(brz1, "%drpm ", brzina_1); + sprintf(brz2, "%drpm ", brzina_2); + sprintf(frekv, "%dHz ", frekvencija); + + sendStrXY( buf,0,0); + if(smjer==0) { + sendStrXY( "ljevo",1,0); + } else { + sendStrXY( "desno",1,0); + } + + if(brzina_1==0) { + sendStrXY( "0rpm ",2,0); + } else { + sendStrXY( brz1,2,0); + } + if(brzina_2==0) { + sendStrXY( "0rpm ",3,0); + } else { + sendStrXY( brz2,3,0); + } + if(frekvencija==0) { + sendStrXY( "0Hz ",4,0); + } else { + sendStrXY( frekv,4,0); + } + + if(smot==0) { + sendStrXY( "ljevo",5,0); + } else { + sendStrXY( "desno ",5,0); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PisanjeNaEkran.h Tue Feb 11 09:55:03 2020 +0000 @@ -0,0 +1,16 @@ +#ifndef MBED_PISANJENAEKRAN_H +#define MBED_PISANJENAEKRAN_H + +#include "mbed.h" + + +class PisanjeNaEkran +{ +public: + PisanjeNaEkran(PinName pin); + void ekran(int brzina_1, int brzina_2, int frekvencija, bool smjer, bool smot); + +private: + AnalogIn ain; +}; +#endif \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data.h Tue Feb 11 09:55:03 2020 +0000 @@ -0,0 +1,217 @@ +/* + * This file contains all the static arrays to draw things in the display. + */ + +// Big numbers font, from 0 to 9. 96 byte each. +char bigNumbers [][96] = { +{0x00, 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0F, 0x0F, 0x0F, +0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x03, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xF0, +0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, +0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xC1, 0xC0, 0xC0, 0xC0, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, +0x03, 0x03, 0x83, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, +0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0xC1, 0xC0, 0xC0, 0xC0, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE1, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x81, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x87, +0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, +0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE0, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, +0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC1, 0x81, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x81, 0x83, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x87, +0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, +0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC1, 0x81, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x87, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x87, +0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, +0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF, 0xE1, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE1, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x87, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x87, +0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0F, 0x0F, 0x0F, 0x0F, +0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0xE0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, +0xF0, 0xF0, 0xF0, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xE1, +0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x07, +0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0F, 0x0F, 0x0F, 0x07, 0x00, 0x00, 0x00, 0x00}, + +{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x3C, 0x7E, 0x7E, 0x7E, 0x7E, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF8, 0xF8, 0xF8, 0xF8, 0xF0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} +}; + +// Big numbers minus simbol. +char minus [] = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x0C, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, +0x1E, 0x1E, 0x1E, 0x1E, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +// Km/h in big font. This avoids to create an entirely new big font and saves flash space. +char kmh [] = { +0x00, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xE0, 0x00, 0x80, +0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xF0, 0xF8, 0xFC, +0x9E, 0x0E, 0x06, 0xE0, 0xF0, 0xF0, 0xF0, 0x70, 0xF0, 0xE0, 0xF0, 0xF0, 0x70, 0xF0, 0xE0, 0xC0, +0x00, 0x00, 0xE0, 0xFE, 0x1F, 0x01, 0x00, 0xFF, 0xFF, 0xFF, 0x18, 0x18, 0xF8, 0xF0, 0xF0, 0x00, +0x00, 0x00, 0x07, 0x07, 0x07, 0x00, 0x01, 0x03, 0x07, 0x07, 0x06, 0x07, 0x07, 0x07, 0x00, 0x00, +0x07, 0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x07, 0x00, 0x1E, 0x1F, 0x01, 0x00, 0x00, 0x00, 0x07, +0x07, 0x07, 0x00, 0x00, 0x07, 0x07, 0x07, 0x00 +}; + +// degrees, outside the ascii table myFont +char myDregree [8] = { +0x00,0x00,0x0C,0x12,0x12,0x0C,0x00,0x00 +}; + + +// Small 8x8 font +char myFont[][8] = { +{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}, +{0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00}, +{0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00}, +{0x00,0x14,0x7F,0x14,0x7F,0x14,0x00,0x00}, +{0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00,0x00}, +{0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x00}, +{0x00,0x36,0x49,0x55,0x22,0x50,0x00,0x00}, +{0x00,0x00,0x05,0x03,0x00,0x00,0x00,0x00}, +{0x00,0x1C,0x22,0x41,0x00,0x00,0x00,0x00}, +{0x00,0x41,0x22,0x1C,0x00,0x00,0x00,0x00}, +{0x00,0x08,0x2A,0x1C,0x2A,0x08,0x00,0x00}, +{0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00}, +{0x00,0xA0,0x60,0x00,0x00,0x00,0x00,0x00}, +{0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00}, +{0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00}, +{0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00}, +{0x00,0x3E,0x51,0x49,0x45,0x3E,0x00,0x00}, +{0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x00}, +{0x00,0x62,0x51,0x49,0x49,0x46,0x00,0x00}, +{0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x00}, +{0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x00}, +{0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00}, +{0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x00}, +{0x00,0x01,0x71,0x09,0x05,0x03,0x00,0x00}, +{0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00}, +{0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00}, +{0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00}, +{0x00,0x00,0xAC,0x6C,0x00,0x00,0x00,0x00}, +{0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00}, +{0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00}, +{0x00,0x41,0x22,0x14,0x08,0x00,0x00,0x00}, +{0x00,0x02,0x01,0x51,0x09,0x06,0x00,0x00}, +{0x00,0x32,0x49,0x79,0x41,0x3E,0x00,0x00}, +{0x00,0x7E,0x09,0x09,0x09,0x7E,0x00,0x00}, +{0x00,0x7F,0x49,0x49,0x49,0x36,0x00,0x00}, +{0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00}, +{0x00,0x7F,0x41,0x41,0x22,0x1C,0x00,0x00}, +{0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x00}, +{0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00}, +{0x00,0x3E,0x41,0x41,0x51,0x72,0x00,0x00}, +{0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00}, +{0x00,0x41,0x7F,0x41,0x00,0x00,0x00,0x00}, +{0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00}, +{0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00}, +{0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00}, +{0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00}, +{0x00,0x7F,0x04,0x08,0x10,0x7F,0x00,0x00}, +{0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00}, +{0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00}, +{0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00}, +{0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00}, +{0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00}, +{0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00}, +{0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00}, +{0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00}, +{0x00,0x3F,0x40,0x38,0x40,0x3F,0x00,0x00}, +{0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00}, +{0x00,0x03,0x04,0x78,0x04,0x03,0x00,0x00}, +{0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00}, +{0x00,0x7F,0x41,0x41,0x00,0x00,0x00,0x00}, +{0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00}, +{0x00,0x41,0x41,0x7F,0x00,0x00,0x00,0x00}, +{0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00}, +{0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00}, +{0x00,0x01,0x02,0x04,0x00,0x00,0x00,0x00}, +{0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x00}, +{0x00,0x7F,0x48,0x44,0x44,0x38,0x00,0x00}, +{0x00,0x38,0x44,0x44,0x28,0x00,0x00,0x00}, +{0x00,0x38,0x44,0x44,0x48,0x7F,0x00,0x00}, +{0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00}, +{0x00,0x08,0x7E,0x09,0x02,0x00,0x00,0x00}, +{0x00,0x18,0xA4,0xA4,0xA4,0x7C,0x00,0x00}, +{0x00,0x7F,0x08,0x04,0x04,0x78,0x00,0x00}, +{0x00,0x00,0x7D,0x00,0x00,0x00,0x00,0x00}, +{0x00,0x80,0x84,0x7D,0x00,0x00,0x00,0x00}, +{0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00}, +{0x00,0x41,0x7F,0x40,0x00,0x00,0x00,0x00}, +{0x00,0x7C,0x04,0x18,0x04,0x78,0x00,0x00}, +{0x00,0x7C,0x08,0x04,0x7C,0x00,0x00,0x00}, +{0x00,0x38,0x44,0x44,0x38,0x00,0x00,0x00}, +{0x00,0xFC,0x24,0x24,0x18,0x00,0x00,0x00}, +{0x00,0x18,0x24,0x24,0xFC,0x00,0x00,0x00}, +{0x00,0x00,0x7C,0x08,0x04,0x00,0x00,0x00}, +{0x00,0x48,0x54,0x54,0x24,0x00,0x00,0x00}, +{0x00,0x04,0x7F,0x44,0x00,0x00,0x00,0x00}, +{0x00,0x3C,0x40,0x40,0x7C,0x00,0x00,0x00}, +{0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x00}, +{0x00,0x3C,0x40,0x30,0x40,0x3C,0x00,0x00}, +{0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00}, +{0x00,0x1C,0xA0,0xA0,0x7C,0x00,0x00,0x00}, +{0x00,0x44,0x64,0x54,0x4C,0x44,0x00,0x00}, +{0x00,0x08,0x36,0x41,0x00,0x00,0x00,0x00}, +{0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00}, +{0x00,0x41,0x36,0x08,0x00,0x00,0x00,0x00}, +{0x00,0x02,0x01,0x01,0x02,0x01,0x00,0x00}, +{0x00,0x02,0x05,0x05,0x02,0x00,0x00,0x00} +}; + + + + + +//************************************************************************************************* \ No newline at end of file