#101

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

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

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

    It is very cool that any time I find a new device on Ebay, at least new to me, for a great price and fall for the add, ordering a couple, I can always learn how to use it by looking at your list of videos. Thanks a million! I have crawled out of my pit of disparate after the loss of my wonderful wife of 51 years and have began to live once more. This includes watching my favorite videos on RUclips and building gadgets using Arduino's and ESP devices. Nice to be back among the living once more, I never knew a person could suffer so much pain and come out the other side alive.

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

      I'm very glad you have rejoined us, Jerry and I can only imagine how much pain you must feel losing your wife of 51 years. I'm sure others have told you to "keep busy" (what they mean is, distracted) so you don't keep thinking about your loss. I've learned that the pain never goes away, you just learn to live with it, and deal with it. Keep watching the videos and I look forward to your (long!) comments on future videos - which might be a while in coming as I'm right in the middle of a house move and I don't have a workshop (yet) in the new place. See you there soon.

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

      @@RalphBacon Thanks for the reply, hope your house move goes well, we used to say a house move is as good as a fire with all that gets damaged by the movers, of course if one does it your self then the blame is difficult to assign. I guess the long posts come from my days as a fledgling author, while I have only had a few short stories and a couple poems published before I decided it was more fun to play with electrons, then stories, the love of telling tales has stayed with me. My nieces and nephews all remember me as the story teller of the family, when they were young children and came to visit, I would sit them on my lap and tell them tall tales that I made up as we went along. They all loved them, did the same for my kids of course but they soon tired of them, well when they hit their pre-teens they did I guess but my grand sons still enjoy coming to visit the old man of the family from time to time.

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

      I find your stories interesting, Jerry! I guess I, too, tell stories but about Arduino-related items, that's why my videos are always too long!

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

    Hi Ralph, great one; pure brilliancy. It is great that people like you keep the Arduino dream alive. Saved your video as part of my arduino code refs. Thanks.

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

      Wow, that's nice of you to say and I'm glad you liked the video (personally I thought it was a bit disjointed with that bit I put in the middle but it was important, so there it was). Thanks for posting.

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

    I really appreciate what you do with all your Arduino projects and coding. It has helped me to really start to understand the basics of the code and how to use it to what I need it to do rather than hunt for a code and copy and paste. You are so through and patient with your explanations...thanks...

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

      That's very nice of you to say, most appreciated. Thanks for posting.

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

    This looks like a nice little diagnostic display. Thanks for pointing it out to us.
    Merry Christmas and Happy New Year!

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

      It does indeed look very nice in real life too, Tab Maryland. Thanks for you greetings and the same to you.

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

    Informative as ever Ralph - going to add a few of these to some of my projects! Keep up the good work, really appreciated :-)

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

      Yes, add them to your projects, Bruce, me too! Thanks for your support and for posting.

  • @tablatronix
    @tablatronix 7 лет назад +1

    Someone has a pull request on adafruits library to add scrolling, but you have to pull the PR and another PR for the adafruit GFX library. I have played with it before, it seemed to work ok. I will be looking into again soon, will let you know.

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

      I was quite surprised that the Adafruit library did not include this, given that their library code is beautifully constructed, documented and laid out. Perhaps they just plain forgot? If there is a fork of this library with vertical scrolling that would be good (apart from my version), so thanks for that, tablatronix.

    • @tablatronix
      @tablatronix 7 лет назад +1

      No but I can make one, I think this is more of a real time console push auto scroll, rather than a static scroll like you show, it uses a double buffer, so maybe they can both be accomplished just the same. I switched to u8g2lib because adafruit does not PR stuff that does not relate to their products, such as sh1106 support.

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

    Nice. I have a few ideas for projects to use that OLED in. Thanks for the video.

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

      Great to hear from you again Maxx B, and if you do use it add a couple of posts here so we can find out how they fare in the Real World!

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

    Another great video from the master.

    • @RalphBacon
      @RalphBacon  Год назад +1

      Thank you for your kind words 👍

    • @darktherapy
      @darktherapy Год назад +1

      Really useful video. I’ve used this screen with a rotary encoder for a project. Displaying variables

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

    Hi Ralph, excellent video.
    What plugin for eclipse are you using? Sloeber?

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

      Yes, it's Sloeber. Glad you liked the video, agaelema!

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

    In my tech writing experience, "feature is not available" often meant a manager didn't think the engineers would get it to work before tape out. But sometimes they got it to work after all and nobody bothered to tell the tech writer.
    But beware. At other times it meant they couldn't get the feature to work _reliably_ and decided not to document it. Undocumented features are a capricious gift that might work on some parts and not on others. _See also_ "HCF instruction."

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

      Yes, use at your own risk. Many a developer has been caught out by using undocumented features. It might work _now_ but will it work with official next release 1.1?

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

    Hi, Ralph that was good and all your extra work made it very usable I have seen a video on running two displays from one Arduino using i2c so that would make a good overall display you could have messages in one window with temperature in another stacked I think that would be nice!! will it work with the D1 mini?
    Thanks for all your hard work Bob

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

      Thanks Bob! Now coincidentally enough there is a video squirming to be released all about another type of SSD1306 but in a different module. I compare it to my Wemos D1 Mini OLED too! Cheap and fast. Watch it this Friday!

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

    Finally managed to get the code working.
    I wonder how you could have this code working using strlen() and not strlen_P(), since your allMyText variable is in the program memory.

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

      Without looking at the video/code I don't know the answer to your query but work it did! Perhaps it worked _despite_ what I did, rather than _because_ of what I did? But work, it certainly did, as the demo showed.

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

    I hope you might be able to provide some insight. I am trying to use your hacked library to do a vertical scroll on multiple lines of text here, but I am using the 128x64 adafruit OLED display.
    I have been trying to get a pure vertical scroll using your code, but all i can get is a diagonal scroll, or a weird split scroll where part of the text scrolls vertically and the rest scrolls diagonally ("shearing" the text). I changed the value of 32 to 64 in the first section for the vertical scrolling area, and I have been able to get the "split" point to move upward in the block of text by varying the "Start" hex value from the 0x04 value you used. The split is in the 3rd (bottom) line of text when using 0x04. The split moves upward as i INCREASE the start value, so when I use 0x07, it is in the middle of the first line of text, but if I go up to 0x08, it goes to a pure diagonal. Values less than 0x04 seem to do a pure diagonal scroll.
    Eventually it occurred to be that the STOP value of 0x1F is decimal 31 (the height of your display), so I thought that changing this to 0x3F (63) would do the trick, but I still get similar behavior. I did modify the .h file so I am using the 128x64 display, so I am stumped. I really want to make this work so I don't keep burning in my OLED displays!

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

      Tricky stuff, Jeff. As you have tried out several things I would download the Adafruit library again (I've been using the new version recently) and they now cover more screens and have included scrolling text too.
      It's certainly worth a shot. You may have to edit the header (.h) file for your specific screen size, but that's obvious where you do this (you uncomment certain lines and comment out others).
      github.com/adafruit/Adafruit_SSD1306
      But see this line here (on that page):
      Arduino library for SSD1306 monochrome 128x64 and 128x32 OLEDs www.adafruit.com/category/63_98
      There's also a forked library for smaller screens (that I'm using):
      github.com/mcauser/Adafruit_SSD1306 but this is a bit behind the master so use with care.

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

      @@RalphBacon Thanks for the response. I actually tried reverting to the original Adafruit library now. Obviously the vertical scrolling function is missing, but by trial and error I am able to get a vertical scroll by using:
      display.startscrolldiagleft(0x07, 0x3F);
      I can't really explain WHY it works, but it does. Before your response, I did get your modified library to work, with the same line above (but with "startvertscroll"), but I had to start the block of text at row 7 to prevent it from getting sliced in half horizontally. After going back to the original library I didn't need to start the text on row 7.

  • @tadejsmole3469
    @tadejsmole3469 2 года назад

    Hello thanks for great video but I need a little help please. I'm trying to do some project with Nano and rotary encoder (so scrolling would be done manually) can it be done?

    • @RalphBacon
      @RalphBacon  2 года назад

      The short answer is: of course.
      The longer answer is:
      1. How much have you done for this project? Have you tried getting a rotary encoder working successfully (I have several videos coving that).
      2. Have you got the screen working to display text? This video covers that.
      3. Have you thought about _how_ you intend to scroll the text (eg a buffer)?
      You mention a Nano but I would strongly recommend an UNO for development work and when you have it running then use your Nano (identical hardware). The Nano can be too small and cramped to use for development work.

    • @tadejsmole3469
      @tadejsmole3469 2 года назад

      @@RalphBacon everything works separately i just have problems putting it together i will try to understand this buffer thank you for the help again.

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

    Nice Cheap TFT, I mean OLED, Ralph. And thanks for the library changes. Excellent video.

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

      Indeed Raad, a nice TFT, er, OLED screen! More than one person has now mentioned that I really must call these by their true name! That said, A rose by any other name would smell as sweet, says the Bard. Glad you liked the library change and video, nice to hear from you again.

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

      And I've changed the video's title to include the correct word too! Thanks for the nudge (everyone)!

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

    In your code you have sometimes declared the counting variable "cnt" as an int, or sometimes as a uint8_t. Does that make any difference in your code?

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

      Yes, it does, the two are not the same. Read on!
      When we declare a variable as an "integer" this depends on what device we're coding for. On the Arduino it's a 16-bit length variable but how do know this? On the ESP32, for example, an "integer" is a 32-bit variable.
      So to be clear in our intention, we can declare an "integer" (numeric) variable as 8-bit, 16-bit or whatever (as long as the compiler and underlying hardware supports the "whatever").
      In your question, the uint8_t means:
      u - unsigned
      int - integer
      8 - 8-bit
      _t - type
      So it's an 8-bit unsigned integer, that can only hold a value from 0 to 255. It only takes one byte (8-bits = 1 byte) so it's efficient in terms of storage space.
      Similarly, an int16_t would be a _signed_ 16-bit (two-byte) integer type, and the compiler is optimised to handle these, even on an 8-bit device like the ATMega328P Arduino Uno. In this case it's _signed_ because that's the default and we didn't specify that it was _unsigned_ by prefixing the declaration with the "u" character.
      Saving space is all well and good when we're dealing with 8-bit devices that have limited storage and run-time memory (like the UNO) but when we get to bigger processors with much more memory it's (probably) best to use "int" and let the compiler figure out what the default for the device is.
      Just be aware (or beware) that such code is not particularly portable, though, as the integer size varies depending on the device you're running it on (compiling it on) and might cause issues (eg overflow).

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

      @@RalphBacon Thanks. I understand what a uint8_t is, but what I meant to ask is the effect in the code itself that you wrote. As far as I see it, it doesn't make any difference in the code if you initialize the for-loop with a uint8_t or an int as long as the max index < 256, which is the case in your code. Or did I miss something?

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

    Thanks for sharing 😀👍, and a happy Christmas to you

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Thank you, Asger, for your continuing support on my channel and I wish you a very merry Christmas too.

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

    No problems here with the YT links, however I *do* find it convenient to grab one single file off of github as opposed to getting each one separately out of the video description.

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

      I try and put more in the GitHub, such as pictures and links to sketches etc, so I'm glad to hear you like the GitHub, Roy.

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

    What software you using for your interface? not the normal IDE

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

      It's Eclipse, the Sloeber version:
      eclipse.baeyens.it/
      The new Arduino IDE is also built using Eclipse so it won't be too different from this.

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

    Brilliant video Ralph - for a non-programmer like myself you have helped to clear away some of the fog surrounding this "Black Art"! How can one contact you via email or off the public comments area? Cheers from Down Under and keep up the great work.

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

      Thanks for your positive words of encouragement, Ian. Whilst you can contact me via the email address on the About page of my channel I do try and keep all channel-related communication open, right here, unless it is something not to be shared publically. I only get that email about once a week so please bear with me for a reply!

    • @ozgemmo3445
      @ozgemmo3445 6 лет назад +1

      Thanks mate - much appreciated. Cheers

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

    That was really good.

    • @RalphBacon
      @RalphBacon  3 года назад +1

      Glad it helped, Jonathan!

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

    Can you get this display to work on the Nano with a RF24 module also? I can't. Seems there isn't enough memory for the 1K frame buffer which is done with a malloc() in the begin() method (maybe?). Pulled out most of my hair trying to get this to work. I ended up going back to the 20x04 LCD display.

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

      I haven't tried this combination, Dirk, but what you say seems very plausible. You could try using a different device with more memory (eg the LGT32 that I did a video on recently, that has more memory and is a lot faster too). Or an STM32 but that's quite different in design.

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

      ​@@RalphBacon I found a library last night, U8x8 that is working. the U8x8 allows only text and uses no page or frame buffer. It displays 8x8 characters so there's 16x8 characters. If I were under 40 I could probably read the 8x8 characters but fortunately there is an 8x16 mode that is very readable (up-close). So for just displaying some text on the screen it works great.

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

      And that corroborates your hypothesis that memory is the issue. I'd still try one of the LGT32s as that might be a better solution. Cheap too.

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

      @@RalphBacon I've been experimenting with the software I2C constructors in the U8g2 library. I realized there's no reason a project has to have just one micro-controller. With software I2C I can hook multiple displays with the same I2C address up to a Nano that then connects with hardware I2C to the main micro-controller. Since the SSD1306 OLEDs I have use an I2C address that is the same and un-changeable I'm able to use more than one and the 2nd micro-controller means I don't have any low-memory issues.

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

      @@RalphBacon I soon as I finish up this project with the 328s and RF24s I plan on trying out the ESP32/STM32/Blue-Pill type micro-controllers. Maybe WiFi and LoRa type IoT projects. There's so much fun to be had with micro-controllers--the world is my oyster. :) Thanks for all your help along the way. When I look at the 5 devices I've created in the RF24 network, I see a lot of your knowledge in them. Like you once said, I'm standing on the shoulders of giants. Cheers.

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

    do you know if this one can display the pound sine? instead of making your own?

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

      Follow the instructions in this web page which prints all the available characters out (20 at a time) so you can see what is available without creating your own:
      forums.adafruit.com/viewtopic.php?f=47&t=30092

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

    Hi Ralph,
    Excellent video tutorials you make about Arduino and more.
    Also this video showing the auto scroll mechanism. I get the code from Github. And it runs fine an a 128x32 display. It does also on a 128x64 (which I like to use in a DCC monitor project). The characters are stretched. I did some wteaking in your code, but cannot get it right.
    Do you have any idea's how I can fix this?
    I thought I might need another library. Cannot think of which one yet.
    Update:
    I edit this line: static const DevType MEM_TYPE Adafruit128x64x128 = { Adafruit128x64init, sizeof(Adafruit128x64init), 128, 128, 0 };
    That did the trick for the streched characters.
    Now struckling with the lines.

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

      It's always tricky getting LCD screens working exactly as they should. You can read the datasheet for the LCD and ensure the correct commands are being sent?

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

      Thanks Ralph for your response. I must admit I haven't looked at the data sheet yet. I am an engineer and I am "supposed" not to look at documentation at all ;-).
      I will.
      I have the display going with 8 lines. Also it scrolls more or less. The nineth value is shown and directly after the first line. Also for the next lines.
      I'll give it another try.

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

      And I watched your video once more.
      Suddenly I realized I did not use your version of the Adafruit_SSD1306 library. Now I will start from there.
      Thanks for all the clear explanation and instruction video's.

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

      I have a scrolling display now. It will only scroll vertical when the rows are less then 25. When selecting pixel 0,25 to print from (or scroll from), part of the text is garbled and/or scrolling in the lower part of the display in a horizontal manner.
      What I need is scroll up 8 pixel lines (or one text line) when the text has reached it's last line (8) on the display.
      I might need to read the lines into an array and shift the array when a new line comes in.

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

      @Ralph, and others interested:
      I created a short test sketch. The input of the serial is read and limited to 21 characters or terminated with a newline.
      The lines (8 lines x 21 characters) are written from top to bottom. When line 9 is received the whole display is "scrolled" up 1 line. The initial first line is shifted off the screen.
      I will use this as a little status monitor screen.
      It is nothing special. Just a couple of loops.
      If anyone is interested, I can publish it somewhere (where?).
      Might do that on my own website (2rsweb.nl).
      Just add a comment when interested.

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

    Hi any video tutorial for 7 inch tft display?

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

      I'm afraid not, Syed, as I can't afford a 7" display (they're not cheap are they?), but maybe one day I will.

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

    thanks for your amazing work! i have tried your modified sketch, but it didn't work, it seems it doesn't recognize the "display.startvertscroll" command.
    i would be thankful if you are able to point out what i've done wrong.

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

      so sorry to bother you. but i got my mistake. thanks a lot for this nice well organized project.

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      Glad you got it sorted Jasim, it is a nice display, don't you think (I'm guessing you may have one already if you are experimenting with the library?)

    • @jasimwaqat5242
      @jasimwaqat5242 7 лет назад +1

      Ralph S Bacon yes i do, i used one with my radio project that i’ve built as frequency display, i think the nice feature you’ve just added may help me to add stations name and so on. actually I prefer the .91 oled over the .96 one.

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

    great video. will implement this for a
    Multi function text display my flightsim

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

      Good luck with your project, patrick maartense and thanks for posting.

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

    Hi, Ralph very good video at that price you could have two end to end and make a long display. All the best and have a nice Xmas from Bob -UK

    • @RalphBacon
      @RalphBacon  7 лет назад +1

      You could indeed do that Bob, tricky (but not impossible) to get the message spanned across the displays though, if that's what you mean. Have a great Christmas and see you again in the New Year.

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

    Hello, what kind of IDE are you using?
    thank you

    • @RalphBacon
      @RalphBacon  6 лет назад +2

      I mainly use Eclipse (Sloeber), Gian, here is a link: eclipse.baeyens.it/
      It may take you a while to get it up and running but a good IDE when you have it working.

    • @gianluca2703
      @gianluca2703 6 лет назад +1

      thanks a lot

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

    you used two boards,it is also possible with a single board?

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

      When you say "two boards", Engr, do you mean the Arduino Nano plugged into a development board (so it looks like an Arduino Uno, with more pins to plug things into)? This would run quite happily just from an Uno (or any other µController I should think that gives you I2C or SPI).

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

      @@RalphBacon yeah,exactly,does using both arduino affects the written code in any way?
      Reason is because i tried every other examples,and they worked fine,but the extended scroll didn't work,it came out as blank.😅
      P.s. i used an arduino nano .

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

    Great video as always, Ralph. We should do a collaboration? What do you think?

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

      Glad you liked it, learnelectronics. I've been offered collaborations before but I just don't have the time, really I don't. Even though I no longer produce a weekly video (it was: give that up or have a meeting with the divorce lawyer!) I still don't have any time doing the stuff I'm doing. Lovely idea though, and I'll willingly give your channel a mention if you want (and perhaps you do the same for me, we seem to be in the same field, with about the same subscriber levels, although you are going stratospheric, good work!). Keep it fun and let me know if you want to cross-mention our channels (not sure how we do that, but we can figure that out). Thanks for posting.

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

    My ethos only, if you use adafruit libraries, buy adafruit.

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

      Indeed, Rick. I do (occasionally) buy Adafruit modules but they do come with a price premium. Your ethos could be extended to say "If you use Arduino libraries, by Arduino.cc boards". But many buy from the Far East, as it's all Open Source after all.
      Perhaps better stated is, "If you regularly use software from a particular manufacturer then support them by buying something from them occasionally". A bit like buying something from a USA gas station if you use their restrooms. Just a soda or chocolate bar. Not the entire shop. You reckon that's OK?