Arduino Nokia 5110 LCD Tutorial #2 - Getting Text on the Display

Поделиться
HTML-код
  • Опубликовано: 29 дек 2024

Комментарии • 124

  • @JulianIlett
    @JulianIlett  11 лет назад +19

    Here's the Arduino code listing:
    #define RST 12
    #define CE 11
    #define DC 10
    #define DIN 9
    #define CLK 8
    #include "font.h";
    void LcdWriteString(char *characters)
    {
    while(*characters) LcdWriteCharacter(*characters++);
    }
    void LcdWriteCharacter(char character)
    {
    for(int i=0; i

    • @FutzWith
      @FutzWith 10 лет назад

      If I needed to display a variable that is a number how would I do That using this code? I am just starting with setting these up!

    • @FutzWith
      @FutzWith 10 лет назад

      Futz With I figured it out!
      Later, FW!

    • @dunroving1962
      @dunroving1962 7 лет назад

      Hi, I have been trying to follow your video and code but I keep getting error messages, can you help please? This is the code and error message. void setup() {
      #define RST 12
      #define CE 11
      #define DC 10
      #define DIN 9
      #define CLK 8
      #include "font.h";
      voidLcdWriteString(char*characters)
      {
      while(*characters)LcdWriteCharacter(*characters++)
      }
      voidLcdWriteCharacter(charcharacter)
      {
      for(inti=0; i

    • @ronym4315
      @ronym4315 7 лет назад

      Richard Green... try to delete... void setup() ... before define

    • @MartynDerg
      @MartynDerg 7 лет назад

      Hey, do you know if it's possible to translate this code to python? I only know a little bit of Python and an even smaller amount of C#, not to mention I'll be hooking this up to a Raspberry Pi

  • @middelbh
    @middelbh 11 лет назад +9

    I think this is one of the most clear presentations I have ever seen! Compliments!!!

  • @freeelectron8261
    @freeelectron8261 5 лет назад

    I really like Julian's Arduino explorations. He talks just like a British airline pilot :)

  • @JulianIlett
    @JulianIlett  11 лет назад +14

    And here's the font data:
    #include
    static const byte ASCII[][5] =
    {
    {0x00, 0x00, 0x00, 0x00, 0x00} // 20
    ,{0x00, 0x00, 0x5f, 0x00, 0x00} // 21 !
    ,{0x00, 0x07, 0x00, 0x07, 0x00} // 22 "
    ,{0x14, 0x7f, 0x14, 0x7f, 0x14} // 23 #
    ,{0x24, 0x2a, 0x7f, 0x2a, 0x12} // 24 $
    ,{0x23, 0x13, 0x08, 0x64, 0x62} // 25 %
    ,{0x36, 0x49, 0x55, 0x22, 0x50} // 26 &
    ,{0x00, 0x05, 0x03, 0x00, 0x00} // 27 '
    ,{0x00, 0x1c, 0x22, 0x41, 0x00} // 28 (
    ,{0x00, 0x41, 0x22, 0x1c, 0x00} // 29 )
    ,{0x14, 0x08, 0x3e, 0x08, 0x14} // 2a *
    ,{0x08, 0x08, 0x3e, 0x08, 0x08} // 2b +
    ,{0x00, 0x50, 0x30, 0x00, 0x00} // 2c ,
    ,{0x08, 0x08, 0x08, 0x08, 0x08} // 2d -
    ,{0x00, 0x60, 0x60, 0x00, 0x00} // 2e .
    ,{0x20, 0x10, 0x08, 0x04, 0x02} // 2f /
    ,{0x3e, 0x51, 0x49, 0x45, 0x3e} // 30 0
    ,{0x00, 0x42, 0x7f, 0x40, 0x00} // 31 1
    ,{0x42, 0x61, 0x51, 0x49, 0x46} // 32 2
    ,{0x21, 0x41, 0x45, 0x4b, 0x31} // 33 3
    ,{0x18, 0x14, 0x12, 0x7f, 0x10} // 34 4
    ,{0x27, 0x45, 0x45, 0x45, 0x39} // 35 5
    ,{0x3c, 0x4a, 0x49, 0x49, 0x30} // 36 6
    ,{0x01, 0x71, 0x09, 0x05, 0x03} // 37 7
    ,{0x36, 0x49, 0x49, 0x49, 0x36} // 38 8
    ,{0x06, 0x49, 0x49, 0x29, 0x1e} // 39 9
    ,{0x00, 0x36, 0x36, 0x00, 0x00} // 3a :
    ,{0x00, 0x56, 0x36, 0x00, 0x00} // 3b ;
    ,{0x08, 0x14, 0x22, 0x41, 0x00} // 3c <
    ,{0x14, 0x14, 0x14, 0x14, 0x14} // 3d =
    ,{0x00, 0x41, 0x22, 0x14, 0x08} // 3e >
    ,{0x02, 0x01, 0x51, 0x09, 0x06} // 3f ?
    ,{0x32, 0x49, 0x79, 0x41, 0x3e} // 40 @
    ,{0x7e, 0x11, 0x11, 0x11, 0x7e} // 41 A
    ,{0x7f, 0x49, 0x49, 0x49, 0x36} // 42 B
    ,{0x3e, 0x41, 0x41, 0x41, 0x22} // 43 C
    ,{0x7f, 0x41, 0x41, 0x22, 0x1c} // 44 D
    ,{0x7f, 0x49, 0x49, 0x49, 0x41} // 45 E
    ,{0x7f, 0x09, 0x09, 0x09, 0x01} // 46 F
    ,{0x3e, 0x41, 0x49, 0x49, 0x7a} // 47 G
    ,{0x7f, 0x08, 0x08, 0x08, 0x7f} // 48 H
    ,{0x00, 0x41, 0x7f, 0x41, 0x00} // 49 I
    ,{0x20, 0x40, 0x41, 0x3f, 0x01} // 4a J
    ,{0x7f, 0x08, 0x14, 0x22, 0x41} // 4b K
    ,{0x7f, 0x40, 0x40, 0x40, 0x40} // 4c L
    ,{0x7f, 0x02, 0x0c, 0x02, 0x7f} // 4d M
    ,{0x7f, 0x04, 0x08, 0x10, 0x7f} // 4e N
    ,{0x3e, 0x41, 0x41, 0x41, 0x3e} // 4f O
    ,{0x7f, 0x09, 0x09, 0x09, 0x06} // 50 P
    ,{0x3e, 0x41, 0x51, 0x21, 0x5e} // 51 Q
    ,{0x7f, 0x09, 0x19, 0x29, 0x46} // 52 R
    ,{0x46, 0x49, 0x49, 0x49, 0x31} // 53 S
    ,{0x01, 0x01, 0x7f, 0x01, 0x01} // 54 T
    ,{0x3f, 0x40, 0x40, 0x40, 0x3f} // 55 U
    ,{0x1f, 0x20, 0x40, 0x20, 0x1f} // 56 V
    ,{0x3f, 0x40, 0x38, 0x40, 0x3f} // 57 W
    ,{0x63, 0x14, 0x08, 0x14, 0x63} // 58 X
    ,{0x07, 0x08, 0x70, 0x08, 0x07} // 59 Y
    ,{0x61, 0x51, 0x49, 0x45, 0x43} // 5a Z
    ,{0x00, 0x7f, 0x41, 0x41, 0x00} // 5b [
    ,{0x02, 0x04, 0x08, 0x10, 0x20} // 5c ¥
    ,{0x00, 0x41, 0x41, 0x7f, 0x00} // 5d ]
    ,{0x04, 0x02, 0x01, 0x02, 0x04} // 5e ^
    ,{0x40, 0x40, 0x40, 0x40, 0x40} // 5f _
    ,{0x00, 0x01, 0x02, 0x04, 0x00} // 60 `
    ,{0x20, 0x54, 0x54, 0x54, 0x78} // 61 a
    ,{0x7f, 0x48, 0x44, 0x44, 0x38} // 62 b
    ,{0x38, 0x44, 0x44, 0x44, 0x20} // 63 c
    ,{0x38, 0x44, 0x44, 0x48, 0x7f} // 64 d
    ,{0x38, 0x54, 0x54, 0x54, 0x18} // 65 e
    ,{0x08, 0x7e, 0x09, 0x01, 0x02} // 66 f
    ,{0x0c, 0x52, 0x52, 0x52, 0x3e} // 67 g
    ,{0x7f, 0x08, 0x04, 0x04, 0x78} // 68 h
    ,{0x00, 0x44, 0x7d, 0x40, 0x00} // 69 i
    ,{0x20, 0x40, 0x44, 0x3d, 0x00} // 6a j
    ,{0x7f, 0x10, 0x28, 0x44, 0x00} // 6b k
    ,{0x00, 0x41, 0x7f, 0x40, 0x00} // 6c l
    ,{0x7c, 0x04, 0x18, 0x04, 0x78} // 6d m
    ,{0x7c, 0x08, 0x04, 0x04, 0x78} // 6e n
    ,{0x38, 0x44, 0x44, 0x44, 0x38} // 6f o
    ,{0x7c, 0x14, 0x14, 0x14, 0x08} // 70 p
    ,{0x08, 0x14, 0x14, 0x18, 0x7c} // 71 q
    ,{0x7c, 0x08, 0x04, 0x04, 0x08} // 72 r
    ,{0x48, 0x54, 0x54, 0x54, 0x20} // 73 s
    ,{0x04, 0x3f, 0x44, 0x40, 0x20} // 74 t
    ,{0x3c, 0x40, 0x40, 0x20, 0x7c} // 75 u
    ,{0x1c, 0x20, 0x40, 0x20, 0x1c} // 76 v
    ,{0x3c, 0x40, 0x30, 0x40, 0x3c} // 77 w
    ,{0x44, 0x28, 0x10, 0x28, 0x44} // 78 x
    ,{0x0c, 0x50, 0x50, 0x50, 0x3c} // 79 y
    ,{0x44, 0x64, 0x54, 0x4c, 0x44} // 7a z
    ,{0x00, 0x08, 0x36, 0x41, 0x00} // 7b {
    ,{0x00, 0x00, 0x7f, 0x00, 0x00} // 7c |
    ,{0x00, 0x41, 0x36, 0x08, 0x00} // 7d }
    ,{0x10, 0x08, 0x08, 0x10, 0x08} // 7e ←
    ,{0x78, 0x46, 0x41, 0x46, 0x78} // 7f →
    };

    • @TheBrandon164
      @TheBrandon164 11 лет назад

      But...
      How do i Make it an .h File?
      and Where do i Place it to be able to import it?

    • @171Manoj
      @171Manoj 10 лет назад

      Brandon Ruiz Vasquez Hey thats not necessary just copy the font data for #include ........to.....}; .Then it worked fine for me

    • @JulianIlett
      @JulianIlett  10 лет назад +1

      Brandon Ruiz Vasquez In the same folder as the .ino file.

    • @Bri4nMivzik
      @Bri4nMivzik 10 лет назад

      Revisa, has pegado mal los datos :D

    • @PierluigiLuisi
      @PierluigiLuisi 10 лет назад

      Walter Brayan Castillo Alayo a mi no me funciona, qué es el problema?

  • @alanpowell328
    @alanpowell328 11 лет назад

    Julian,
    Thank you - i am a hardware man and I have used Arduino before without actually understanding how some of the code is derived, in this case, from the data sheet. Very useful.
    Alan

  • @DFX2KX
    @DFX2KX 10 лет назад +3

    pretty impressive video. I've never manually controlled an LCD before, but this was interesting to watch.

    • @JulianIlett
      @JulianIlett  10 лет назад

      Thank you kindly.

    • @DFX2KX
      @DFX2KX 10 лет назад

      Indeed. keep up the good work! (I'm looking at getting a Gamebuino, which I guess uses this exact same screen, if I do, and feel like controlling it manually, I might keep these video handy for reference)

  • @joeballer4036
    @joeballer4036 8 лет назад

    10:30 Yes They are Pointers :) Pointers to characters of string type :D You're video is amazing!! It is greatly appreciated. Thank you soo much for taking time to make this!

  • @LordKaos666
    @LordKaos666 7 лет назад

    You put me nostalgic with this tutorial remembering my beginnings on reading binary, mentally convert to decimal....but to hexa I needed the calculator :D Nice video....VERY useful for me.

  • @northshorepx
    @northshorepx 8 лет назад +2

    Thank you for video. I've got my screen up and running. Actually it's thanks to your video that I bought the screen ;-) Keep up the good work!

  • @GRAHAMAUS
    @GRAHAMAUS 10 лет назад +1

    *var means var is a pointer that you are dereferencing - i.e. access the data that var points to. It's the inverse of &var, which takes the address of the data . So:
    int a = 10;
    int* b = &a; //bis now the pointer to a
    *b = 5; // changes the value of a to 5

    • @JulianIlett
      @JulianIlett  10 лет назад

      Graham, thanks for that very timely piece of advice. I kind of get pointers, but as with all new things, getting to grips with the jargon is the hardest part. Dereferencing means nothing to me, I'll look it up. But I can see how modifying *b actually modifies a. Cheers.

    • @GRAHAMAUS
      @GRAHAMAUS 10 лет назад +1

      Julian Ilett Dereferencing just means "follow the pointer to the data it points to". If you know any assembler (as a hardware person you may well do!) it's like an indirect addressing mode, and if that means nothing then don't sweat it, most C programmers have no idea what these language features turn into when compiled.
      Actually my example is slightly wrong, or the wording is. To declare a pointer to a variable of type , you write var* (i.e. the * follows the type), as I've written int* b. To dereference the pointer (access the data it points to), you write *, i.e. the * precedes the name, as in *b = 5;
      Hope that makes sense, but I'm sure any C text will be far clearer than my explanation. BTW thanks for an interesting tutorial, I've done a bit with Arduino but nothing as sophisticated.

  • @beehive808
    @beehive808 10 лет назад +1

    I just got my Nokia 5110 today.
    Thanks for Post all of the code. I tried to fix it on my own, but I have a long way to go
    Great video

  • @staygoodyeah2496
    @staygoodyeah2496 9 лет назад +1

    The best tutorial I've ever seen ! Thank you ! ! !

  • @grantcivyt
    @grantcivyt 7 лет назад

    Regarding DRY, I would suggest you have three functions: lcdWrite, lcdWriteCommand and lcdWriteData. The nicely-named functions simply call the underlying lcdWrite function with an appropriate flag set.
    Violating DRY is asking always inviting trouble. Thanks for the very helpful video!

  • @BGroothedde
    @BGroothedde 11 лет назад

    It's a lot more fun to see this and try to interface an Arduino with a 5110 myself than using one of those pre-made classes. This way, I feel like I learn a lot more about what I'm actually doing. Great tutorial videos, thanks Julian!
    As a final tip, for sharing code, I suggest pastebin.com or any other code-snippet website. Those websites add syntax highlighting colours and make sure the indentation is preserved! :)

    • @JulianIlett
      @JulianIlett  11 лет назад

      Cheers Bas - thanks for the tip, I'll take a look at pastebin

  • @jaa4th
    @jaa4th 10 лет назад +1

    Nice code, Julian! I fought for hours with SparkFun's code. Your's is easy easy to understand and cleaner. Had my screen up and running in minutes! Next, going to see if I can pull in the LCD_Functions library to use the drawing tools there... unless you have code for that, too??!

  • @vascofg
    @vascofg 11 лет назад

    Hi Julian, great job as always!
    Your guess was correct, * means pointer in C and C++.
    A C string is represented as a char pointer, which basically points to the memory address of the first character in your string and ends with the ASCII 0 character, which is the string null terminator character.

    • @JulianIlett
      @JulianIlett  11 лет назад

      Hey, thanks for that. I've read that pointers are one of the least understood parts of the C language and I've yet to get my head around them.

  • @mnelson10000
    @mnelson10000 10 лет назад

    For those of you getting "stray \357" etc etc etc errors, I think it's because the code was pasted with a different character encoding. I copy/pasted the same font from the Arduino website and then manually corrected the lines with the errors in the INO and it compiled.

  • @DupczacyBawol
    @DupczacyBawol 7 лет назад

    The arficacts after reset may occur because you probably are not using logic level shifting. There are also different PCB versions of this Nokia modula - some can be powered with 5V, some not.

  • @MikePoirier
    @MikePoirier 11 лет назад

    Hi julian, well explained, I'm gald your sharring this whole series, it's useful, saves people tons of time, it's practical. Bloody well done!

  • @TheFunkman
    @TheFunkman 10 лет назад +1

    Great so far!! I can't find the font.h file you refer to.

  • @m0gga
    @m0gga 10 лет назад

    Hi Julian, first of all thanks for your very informative videos which I enjoy immensely. Regarding this Nokia LCD, I like yourself, like a challenge and enjoy programming a lot, but surely there must be an Arduino library out here which would reduce the amount of hands on code bashing required to program it? Keep up the good work!

  • @Jarjarbean75
    @Jarjarbean75 10 лет назад +1

    Fantastic, helped me a lot. Will make good use of your knowledge. thanks for teaching!

  • @dave-in-nj9393
    @dave-in-nj9393 7 лет назад

    12:18 contrast - I am usign 5v and the screen contrast is dark, cannot get it light, is there a range to use ?

  • @redserpent
    @redserpent 10 лет назад

    Nice work Julian, thank you. Like the fact that you showed the data sheet. I have a Nokia 3770 i wonder how that will go.

  • @christianramsvik77
    @christianramsvik77 9 лет назад

    You could shorten the overall code by having LCDWriteCmd call LCDWriteData with a parameter for that defaults to high, but your Cmd function sets it to low?
    Appologies if this has been mentioned before or doesn't really work. I'm still waiting for my hardware to arrive, but I'm reading up and watching vids. Yours are excellent! :-)

  • @marcomaroso733
    @marcomaroso733 3 года назад

    Nice work...but...it doesnt work for me. I get exit status 1
    'ASCII' was not declared in this scope
    ...where do I get the font.h ?

  • @georgepederson5015
    @georgepederson5015 5 лет назад

    HI Julian where did you get ASCII code you used on the NOKIA 5110 display

  • @theorgandude
    @theorgandude 9 лет назад

    excellent thorough and well paced tutorial. thx.

  • @xSuperCartmanx
    @xSuperCartmanx 10 лет назад

    Can I get some help on how to send a 'int' or 'float" variable to be displayed on the screen. I know it's not that complicated but I am having trouble imagining a way to do it.

  • @alnoorratansi9364
    @alnoorratansi9364 10 лет назад

    Hi Julian
    I understand you can put14 characters on each row, (14x6) which command do I use to position the character. example I what to put a letter "A" in the second line 5th position over.

  • @SirArghPirate
    @SirArghPirate 9 лет назад

    I'm really bad at bitwise operation. What does the LcdXY() function do exactly?

  • @dajgon
    @dajgon 11 лет назад

    Congrats Julian, it's amazing how clear you are during your explanation. I did really appreciate your video.
    One question: In my experience when I try to light the upper left dots using the 0x55 and 0xaa commands, in my LCD, they are not displayed exactly at the upper left position of the display, but in almost end of the first line. Do u have a clue for that?
    Thanks again,

    • @JulianIlett
      @JulianIlett  10 лет назад

      Thanks David. Display not resetting properly? There are commands for setting the display address - you could try sending them.

    • @TheScoutsHonor
      @TheScoutsHonor 9 лет назад

      David Gonzalez Your display is upside down.

  • @MrMr999Mr
    @MrMr999Mr 10 лет назад

    Thank-you. I got my nokia 5110 working with my TI MSP430 Launchpad using energia. Same code, same pinout.
    The only change I made was I didn't make the font.h file, I just pasted the ASCII array into my main code right under the define statements and removed the include "font.h"

  • @MkmeOrg
    @MkmeOrg 11 лет назад

    Hey Julian. These are great vids! Programming the 5110 at a core level is something I haven't seen yet. I just take the easy path using the Adafruit 5110 library :) Cheers!

    • @JulianIlett
      @JulianIlett  11 лет назад +1

      Thanks Eric. I couldn't find a video about programming this display from bit level upwards, so I thought I'd have a go myself. At some point, I fancy having a go at writing a library - maybe I'll write one for the 5110, or perhaps the 128x64 OLED.

    • @MkmeOrg
      @MkmeOrg 11 лет назад

      Very cool! Look forward to more.

  • @STRATOS13PAO
    @STRATOS13PAO 10 лет назад +1

    hello! can i display a long type variable instead of a char?

  • @71GA
    @71GA 6 лет назад

    I have no random pixels ON. Is it possible you resetted it wrong? Reset needs to be done 30ms after VCC comes ON.

  • @TheFunkman
    @TheFunkman 10 лет назад +1

    I have the font.h attached as you show. However, I'm getting this error. It's not seeing the ASCII from the font.h file.
    Nokia_5110_tutorial.ino: In function 'void LcdWriteCharacter(char)':
    Nokia_5110_tutorial:15: error: 'ASCII' was not declared in this scope

    • @khaled19540
      @khaled19540 9 лет назад +1

      put this in your code: #include "font.h"

  • @Luken888
    @Luken888 8 лет назад +1

    Hello Mister Ilett,
    I copied your code and also included the font.h data but I still get error massages. For Example expected ',' or ';' before 'void'
    void LcdWriteCharacter(char character)
    ^
    I tried fixing this for a long time but I don't know how. Can you help me out?
    Bloody beginner btw.
    Thanks for the great videos and good explanations!

    • @DupczacyBawol
      @DupczacyBawol 7 лет назад

      Cant you put the , o r ; there yourself? The code works fine.

  • @jusb1066
    @jusb1066 11 лет назад +1

    excellent vids again, thank you

  • @MilosMaric1982
    @MilosMaric1982 9 лет назад +1

    Hi,
    the code works great, but I`ve got one problem:
    "The End" stands on the display for around 0,1 sec, aber this the whole display is full with black pixels.
    What`s the problem?
    Thanks a million...

    • @Booruvcheek
      @Booruvcheek 9 лет назад +1

      MilosMaric1982 Try changing contrast value in this line of code:
      LcdWriteCmd(0xBF); // set LCD Vop (contrast)
      0xB0 works for me, with 0xBF I can still see the letters, but the screen is almost black around them.

  • @ZuNunchaku
    @ZuNunchaku 10 лет назад

    dou you know how, if i want to write upside down, so the lcd display can be rotate like smartphone

  • @WelshMullet
    @WelshMullet 11 лет назад

    What are your thoughts on using the screen to display 2 large digits, and possibly a direction indicator? Would I need to write custom code to compose the entire screen image in an array and then send that serially?

    • @JulianIlett
      @JulianIlett  11 лет назад

      Creating entire screen images isn't practical - you'd need 100 of them to encode all combinations of your 2 digits. You can cut that down to 10 by encoding each digit separately.

  • @hobbyelectronics7600
    @hobbyelectronics7600 10 лет назад

    What board are you useing with the arduino nano?

  • @adaminsanoff
    @adaminsanoff 9 лет назад

    Thank you Mr Ilett!
    1st part was very easy to understand, but in the 2nd part I have a problem as many people here (I guess). Does not matter how I lower the screen contrast, it still remains lit fully but not dark as before. Even I can not to display "55" and "AA".
    Could you please help me?

    • @adaminsanoff
      @adaminsanoff 9 лет назад

      +Adam Insanoff Yes! Now it works. I figured out that I should decrease contrast much more. I put 0xA4 and it is just works!

    • @vbbartlett
      @vbbartlett 8 лет назад

      +Adam Insanoff- Depending on the hardware, if you change the voltage from 5v to 3.3V, those values work as expected.

  • @bendavey1394
    @bendavey1394 10 лет назад

    When I try the code I am getting this error "
    fatal error: ASCII.h: No such file or directory
    compilation terminated.
    Error compiling."

  • @neotherion
    @neotherion 10 лет назад

    great video.. made me understand a lot!.. but.. how do i print values to the lcd , not just "strings" but actual float or integer variables ?

    • @JulianIlett
      @JulianIlett  10 лет назад +2

      Good point - that's an idea for a part #3. Not sure why I didn't think of that. I use 'dtostrf'.

    • @neotherion
      @neotherion 10 лет назад

      Julian Ilett thanks man! .. i was stuck but you´ve pointed me in the right direction.. i 'll be here waiting for part #3

    • @JulianIlett
      @JulianIlett  10 лет назад +1

      juan lobos Finally made a part3 - ruclips.net/video/cwsCxUhHbQM/видео.html
      Thanks for giving me the idea.

  • @dave-in-nj9393
    @dave-in-nj9393 7 лет назад

    any chance a new version for u8g2 will be available ?

  • @hansdegroot652
    @hansdegroot652 5 лет назад

    So many clip explaning how to use 1 display. but how do you use 2?

  • @rrgiri
    @rrgiri 10 лет назад +1

    amazing stuff :) Thank you very much :)

  • @slap_my_hand
    @slap_my_hand 9 лет назад

    Aren't there librarys for this stuff?

  • @Amy-ft5mt
    @Amy-ft5mt 8 лет назад

    how do you do the same thing with a TV as the display?

  • @arthurjohnson2165
    @arthurjohnson2165 7 лет назад

    I keep on getting this error message:
    Arduino: 1.8.1 Hourly Build 2016/12/24 01:12 (Mac OS X), Board: "Arduino/Genuino Uno"
    In file included from /Users/AdaJohnson/Documents/Arduino/sketch_mar27b/sketch_mar27b.ino:7:0:
    font.h:101: error: stray '\357' in program
    };
    ^
    font.h:101: error: stray '\273' in program
    font.h:101: error: stray '\277' in program
    /Users/AdaJohnson/Documents/Arduino/sketch_mar27b/sketch_mar27b.ino: In function 'void setup()':
    /Users/AdaJohnson/Documents/Arduino/sketch_mar27b/sketch_mar27b.ino:48:37: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
    LcdWriteStng("Hi, My Name Is Theo");
    ^
    exit status 1
    stray '\357' in program
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

    • @arthurjohnson2165
      @arthurjohnson2165 7 лет назад

      I fixed it

    • @mokdadali
      @mokdadali 7 лет назад

      I'm getting same error, how did you fix it? This is my first manual library

    • @demyanrudenko
      @demyanrudenko 4 года назад

      @@arthurjohnson2165 That was kinda rude of you m8

  • @aarifhassan8946
    @aarifhassan8946 Год назад

    first of all thanks to you and i need a help where i'm finding "font.h" librery

  • @TheFunkman
    @TheFunkman 10 лет назад

    Thank you. I missed the "show more" link before.

  • @michaeladams1397
    @michaeladams1397 10 лет назад

    Firstly, thanks for all the superb videos, and your infectious enthusiasm. It infected me greatly. I know you're a busy chap, but I wondered if you could help me with a particularly tenacious compiling error. I followed (many times) parts 1 and 2 of your 5110 tutorials, and copied and pasted your code from this forum, but continue to get this straightforward error:
    Nokia5110_2_5:10: error: expected ',' or ';' before 'void'
    from this code:
    #include "font.h";
    void LcdWriteString(char *characters)
    {
    while(*characters) LcdWriteCharacter(*characters++);
    }
    It all looked fine to me, but I tried inserting and removing semicolons anyway, without joy.
    Could it be something to do with different versions of Arduino software or Nano version? My Nano is V3.0, and I'm using Arduino 1.0.5. I even checked for non printing characters in the text, but that looked clean.
    I searched for the error and followed the pointers, but it all looks as it should to my relatively untrained eye. I have rtfm, so to speak.
    I'd be very grateful for any advice you may be able to give me.
    Regards,
    Mike Adams

    • @1holy1holy1
      @1holy1holy1 10 лет назад

      Michael,
      I had the same issue and found the solution to be inside the font header file itself. If you tried to copy the font.h file from this page, try deleting the final semi-colon in the file, which is at the bottom of the file directly following the curly bracket. Press enter to obtain a new line and then type a semi-colon and it should then compile without error.

    • @michaeladams1397
      @michaeladams1397 10 лет назад

      Thanks very much. I'll give it a go. That was kind of you.

    • @richellemeyer8156
      @richellemeyer8156 6 лет назад

      @@1holy1holy1 Thanks a lot for this tip, now it works

  • @alphahr
    @alphahr 9 лет назад

    I have bee following along from the first video and was able to get all the pixels to lite, but now on the second video I inserted the (0x0C) to put the display back to normal and no matter what I do the display stays with all pixels lit

    • @resneptacle
      @resneptacle 9 лет назад

      +alphahr You must set the contrast with a potentiometer (i think)

  • @donpalmera
    @donpalmera 11 лет назад

    I would suggest instead of having comments for every command write that you define the commands and modifier bits and use them like CMD_DISPMODE | DISPMODE_NORMAL ... that way the meaning is in the code. :) Pointers are one of the most useful features in C especially when fiddling with memory mapped stuff. You can use a pointer like an array.. you can have pointers to pointers.. fun stuff :)

  • @bendavey1394
    @bendavey1394 10 лет назад

    How do I get the language to be a .h file and once I do that where do I put it

  • @FlowPerformanceVideo
    @FlowPerformanceVideo 7 лет назад

    I found that I need to add 10K resistors on my data lines to get the display to work

  • @boriskling
    @boriskling 8 лет назад

    Where can I find font.h file?
    Thank you.

  • @AaronCZim
    @AaronCZim 11 лет назад +4

    I was about to ask for the font.h file but I found a copy elsewhere. If anyone else needed the font.h file look here playground.arduino.cc/Code/PCD8544

  •  10 лет назад

    Dear Julian, THX!!

  • @ThatGuy-nv2wo
    @ThatGuy-nv2wo 8 лет назад

    "star variables" are just pointers

  • @tarasfomin4722
    @tarasfomin4722 10 лет назад +1

    Thank you!

  • @Whosurdady2011
    @Whosurdady2011 9 лет назад

    for me is not working..and i changed 9 with c

  • @walterbrayancastilloalayo9380
    @walterbrayancastilloalayo9380 8 лет назад

    error in line 9, 16, 17, 30 and 62.

  • @msreeram8825
    @msreeram8825 5 лет назад +1

    Can anyone send me the link to the code

  • @Bri4nMivzik
    @Bri4nMivzik 10 лет назад

    Tengo q descargar algunas librerias?

  • @aonutube
    @aonutube 6 лет назад

    Hi, I can't find the font.h file

    • @kukuruzicful
      @kukuruzicful 6 лет назад

      Hi. Sort coment by time, and you can find this file in second coment.

  • @Crux161
    @Crux161 11 лет назад

    Very inspiring! ^_^

  • @metamud8686
    @metamud8686 5 лет назад

    Of course 6x84 is divisible by 3, every multiple of 6 is divisible by 3 and by 2 as 6 = 3*2 :-)

  • @AaronCZim
    @AaronCZim 11 лет назад

    Thanks again.

  • @happyhippr
    @happyhippr 7 лет назад

    Cute ending

  • @jackpurdum3976
    @jackpurdum3976 9 лет назад

    I found this very helpful, Julian. If you want a simple intro to pointers, see my article:
    www.drdobbs.com/cpp/computer-programming-and-precise-termino/208808373
    After reading that, a valid pointer has an rvalue that is a memory address (or null). The indirection operator (*) simply says: "Go to the memory address and fetch what's there." The address of operator (&) simply says: "Fetch the address of where this variable is stored in memory." So, in the following code fragment:
    int val = 10;
    int *iptr;
    char name[] = "Jack";
    char *cptr;
    iptr = &val;
    cptr = name;
    Suppose val exists in memory at address 1000 and name is at 2000. The statement iptr = &val make the rvalue of iptr equal to 1000. The statement printf(*iptr); would say: "Get the rvalue of iptr (i.e., 1000), go to that address and fetch "int" bytes (2 bytes) of data, and then print those two bytes (10)".
    In C, an array name is the same as the array's lvalue, so cptr = name is syntactically the same as cptr = &name[0]. In a totally biased plug, take a look at Beginning C for Arduino on Amazon.com. You can click on the cover and "look inside" to see the Table of Contents...there are two chapters on pointers.

  • @TheFunkman
    @TheFunkman 10 лет назад

    Disregard please I found the problem.