EP4 - How to Program Arduino - Displays, LCD Menu & PlatformIO

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • This episode covers a range of things including a general discussion on displays & drivers, specific examples of using the prolific liquid crystal 16x2 display.
    Also in this episode, I will also help you make the big leap from Arduino IDE across to PlatformIO, which I will be using from here on in.
    This is the forth episode in a series where I will be providing some practical lessons on how to write programs using Arduino. These lessons are intended to be useful information that you can use in your own code immediately, but I also hope it serves as a general lesson to get you thinking about how to write code better.

ความคิดเห็น • 20

  • @jstro-hobbytech
    @jstro-hobbytech ปีที่แล้ว +1

    the arduino ide likes to blow the protection diode when you try to upload a sketch. i usually just 0ohm it with a resistor or a wire. it's directly under the usb port beside the cap. i threw away so many nanos when i was new hahaha

  • @rrowan327
    @rrowan327 ปีที่แล้ว +2

    You don't need to move your functions to the top. You need to declare each function at the top(above the setup() ). ie: boolean btnIsUP(int btn); The Arduino IDE does this in the background for you.

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      Hey thanks for the comment, feedback much appreciated! Actually, I think I have seen this comment on another person's PIO video, so I am aware of the solution you propose. But it is downright silly you need to declare the same thing in the code twice..., but I have also seen this with C classes, so I am not entirely surprised. But here is the point I am really making.. Why is there no similar error shown in pre-compile error checks??!.. sort of kills the point of the error checking a bit.. Additionally, if Arduino wised up and realised that getting people to declare things twice is not a great solution, wouldn't it make sense for PlatformIO to implement it the same way? Personally I think they will fix this at some point, and for me in the meantime, I will just keep shuffling my subroutines around to avoid it.. Thanks again!

  • @ianbertenshaw4350
    @ianbertenshaw4350 ปีที่แล้ว +2

    Arduino IDE 2.0 is a step towards platform io- no where near as good but an improvement on the old Arduino IDE.

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      Well, I guess that save saves me the time checking it out then! Sort of good to hear, and a little disappointing at the same time. Thanks for the comment Ian.

  • @PexiTheBuilder
    @PexiTheBuilder 8 หลายเดือนก่อน +1

    37:47 It tells in previous line on comment "Create LCD Object with ports to use -> [Register select] [Enable] [D4] [D5] [D6] [D7]"

    • @ForOurGood
      @ForOurGood  8 หลายเดือนก่อน

      Yes it does! But this section of the video is mainly focusing on the advantages of PIO now providing auto-complete (Intellisense). The previous line is just copy and paste from an old Arduino IDE project, where you really need to add such comments due to the lack of Intellisense. Thanks for the comment!

    • @Hellbrate
      @Hellbrate 6 หลายเดือนก่อน +1

      ​@@ForOurGood Why dont you share code in your videos description? So we can copy paste and edit code

    • @ForOurGood
      @ForOurGood  6 หลายเดือนก่อน

      @@Hellbrate Thanks for your question! I give a good explanation about this in episode 7 of this series, so check it out!

    • @Hellbrate
      @Hellbrate 6 หลายเดือนก่อน

      @@ForOurGood So you dont want to share codes? Thats your explanation?

    • @ForOurGood
      @ForOurGood  6 หลายเดือนก่อน +1

      @@Hellbrate There was much more to the explanation given in episode 7 if you watched it, but as a part of that explanation, yes, I stated I don't share the raw files. But you're very welcome, and I am glad you found the videos informative.

  • @johnastigra8475
    @johnastigra8475 ปีที่แล้ว +1

    question: what is the main differences between the Menu in EP1 and this Menu ? Thx for your posting, very informative!

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      I believe it is exactly the same. I just added code to simultaneously display the menu on the LCD. The idea is to show that this menu structure should work regardless of the display method, or even number of simultaneous displays of the same menu. Thanks for the question!

    • @johnastigra8475
      @johnastigra8475 ปีที่แล้ว +1

      @@ForOurGood Hi there , do you have any good tutorial of an analog value say a joystick that maps the analog input value to an output value?

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      @@johnastigra8475 I have just finished shooting, and am in the middle of editing, a video which includes showing how to do just this. This method uses a rolling averaging stack for the analogue input sampling and a proportional output adaptation for the output. For my demonstration I am using a stack of 30 items and sampling every 100ms, which heavily dampens or smooths the result. For my application I needed that, but you could change the size of the averaging stack (or not even use one) and change the sampling rate to match the response/dampening balance that suits your requirement. Unfortunately the video looks like it will take many many more days to edit yet. I am hoping for this weekend to finish it, but I suspect it will be the week after... Thanks for the question!

    • @johnastigra8475
      @johnastigra8475 ปีที่แล้ว

      @@ForOurGood thx seems advanced, will watch it !

  • @romansfans1157
    @romansfans1157 ปีที่แล้ว +1

    Very nice content , increased the level to learn towards lcd program .
    Sir can you plz provide the code .

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      Sorry! Normally I don't give out the raw code, but everything you need to know is there in the video. This is my method for teaching. Thanks for the query and nice comment!