Building a GPS Based Arduino Speedo using an M5Stack | Beginner Tutorial from Start to End

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 พ.ค. 2024
  • In this video we are going to learn the very basics of building with Arduino and learning how to create a gauge, pull in GPS speed and ultimately make a GPS based Speedometer.
    If you are brand new to Arduino you will need to do a little work first. I will not be walking through setting up the Arduino IDE or pairing your specific boards. We walk through the various equipment you will need and what we are going to cover.
    I will be using an M5Stack and a GPS unit from M5. Here are some helpful links. Note I am not an affiliate of any of these sites so pick the gear that is right for you.
    m5stack.com/
    shop.m5stack.com/products/gps... (great option!)
    shop.m5stack.com/products/min... (this is the gps antenna I am using)
    www.adafruit.com/
    www.sparkfun.com/
    www.arduino.cc/
    arduiniana.org/libraries/tinyg... (This is the gps library we will be using. very simple to use)
    00:00 Introduction to Arduino
    04:23 Project Needs
    18:01 Getting Set Up in the IDE and Example Review
    24:28 Including and reviewing M5Stack.h
    27:49 Define Global Variables
    29:23 Verifying and error handling
    31:25 What is a CONST INT and #Define
    34:43 Creating comments and planning the learning process
    45:46 Visualizing an LCD in MS Paint
    54:03 Learning to Display Simple Text on an LCD
    01:04:20 Learning to Display Shapes on an LCD
    01:11:22 Planning the Gauge Graphics
    01:17:41 Creating and Calling Custom Functions
    01:24:38 Making a Function to Draw a Triangle Sweep using For Loops
    01:38:09 Making a Function to Draw a Sweeping Needle
    01:58:24 Making a Function to Draw a Filled Arc with Triangles
    02:25:15 Getting Ready to use GPS
    02:29:08 Setting up the GPS Antenna Library and Pins
    02:45:59 Making a GPS Speedo with a Sweeping Arc and Number Display
    03:15:15 Process Review
    03:21:19 Next Possible Steps and Conclusion
  • แนวปฏิบัติและการใช้ชีวิต

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

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

    Gold content

    • @LearnEverythingAboutDesign
      @LearnEverythingAboutDesign  2 ปีที่แล้ว

      Thanks Rhein. There is a 2nd part coming soon where I build a sweeping needle gauge using a sprite of a needle overlaid to the sprite of a gauge so you don't have any flickering. Should be out monday.

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

    Excellent tutorial, thanks for sharing.

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

      Glad you liked it! I always want to do more just can't seem to find the time. If you are looking to do displays definitely check out Nexion displays.

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

      @@LearnEverythingAboutDesign No, never enough time :) I am putting a project together at the moment and was actually considering one of the Nextion screens, they look really good but a bit pricey.

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

      @@dfn808 For sure, but there are limitations you can run into depending on the part you are using and the library as well. The M5Stack i used in these videos uses a slimmed down version of the TFTeSPI library. So if you are just on an ESP based board but not the M5 then you have the ability to layer sprites over the gauge for things like warnings. On the M5 i can only push rotated. This library was suggested to me as running a bit faster than teh TFT eSPI github.com/lovyan03/LovyanGFX

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

      @@LearnEverythingAboutDesign Thanks for this, I have heard of that library but never used it. I am thinking of using the M5Stack Core2 as a main controller and satellite devices using ESP32's so that I can utilise the ESP-NOW protocol. I haven't ruled out a Nextion just.

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

      @@dfn808 one thing I didn't so on my project was to use the M5s micro sd storage to pull in images. I found the delay/speed to not be ideal. but this is where the Nextion stuff really makes a difference since it has its own processor on board and storage for the sprites. I think their UI tools look really great as well.
      I think for simple gauges the M5 works great. My GPS speedo stuff ran just fine with its being drawn or pulling up Sprites. No matter what direction you go its all fun and learning :) If you want to share what you've done or are working on you can always drop me an email. support@caducator.com

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

    I've probably made two comments on YT videos...ever. This video is good enough to bring me out of the shadows to provide my encouragement and offer some (hopefully) constructive criticism. Somewhere in the 5 hours of content (I watched all of it) you mention that these videos did not receive many views, and this unfortunately still seems to be the case. Such great videos deserve more views. I'm far from an expert, but I suspect that a couple modifications would help grab more viewers.
    First, the dedication to detail on this, and the followup video, is exceptional. Great detailed information on coding, and excellent advice on structuring the code during development. These two videos are helping me to muddle through my holiday prototyping project using an ESP32-S2 dev kit, three SPI displays, and two ADS1115.
    I think that both videos would be less "intimidating", and actually a bit more useful, if they were broken into chapters. The first video seems to have at least two natural break points, but could probably be broken into four or five. Breaking into smaller chunks should allow viewers to digest the information better, it may also bring in the people that passed on watching due to the length. In my case, having the breaks would make it easier to go back to rewatch specific chapters of interest as I work on my own project.
    I also suspect that modifying the titles, and thumbnail pictures, might also bring more viewers. Grabbing attention without resorting to "clickbaity" titles I'm sure is an art, but one that seems to be necessary to grow on the YT platform. Veritasium has a nice video on this subject, I think.
    You have an excellent presentation style, and are very organized. Perhaps working to "feed the algorithm" will help to grow this channel. Thanks for the wonderful content. Keep it up!

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

      Thanks so much for watching and taking the time to comment. All feedback is welcomed and appreciated! I will say that I have never in a video asked someone to like or subscribe and i do tend to avoid click bait type titles. I stay in the lane of what i know ;)
      I have done chapters on other long videos and TH-cam has an "auto chapter" thing built into the algorithm. Watching loads of "how to be good at youtube" tend to vary on the subject of using or not using chapters, but I will circle back on these and have a look at what could be helpful.
      I will also take another look at the images. I tried to start making them consistent with color borders for the software awhile back but I am still working through that process of what works and what doesn't.
      Again thanks so much for watching and leaving the helpful comments!

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

      I just took a look and there are 21 chapters on this video. Were they not showing up for you?

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

      @@LearnEverythingAboutDesign I could have used a better term. Instead of "chapters", perhaps "episodes" or "volumes" would have been clearer. I do have a tendency to pass by on videos that are very long. Maybe others do the same? In this case, I was hungry for the coding details, and am glad that I watched.
      You are correct that the chapters are already there, and are already well organized. What I meant was that I believe that breaking the long videos into multiple episodes, might bring people in that didn't watch due to the lengths of the current videos. If I was to guess at a "popular" length, I'd say to aim for somewhere between 20-30 minutes an episode, maybe 45 minutes max.
      I have no YT creator skills, but have been "consuming significantly" for the last 5 years. My recommendations are simply based on my observations, and personal preference. I could be completely wrong.
      Your coding content helped me a lot with my current project, and I really appreciate you making these videos. The time investment you have put into this site is impressive. Once I get through this Arduino project, I am looking forward to your Fusion 360 videos. Always something to learn there... 🙂

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

      @@butchberney9569 Thanks again for taking the time to respond! So I have mixed info about the long vs short videos. I had done a poll awhile back asking users which they prefer and got an even split. So i have a 4 part car modeling series where they are broken up by the task. 6.5hr video modeling the body. then one for details, one for rendering etc. I also have a 12 part car modeling series that is broken up in smaller chunks for the areas of the car or "milestones". Hard to tell what does better really. I have some more coding content coming which will be broken up in smaller chunks fyi. Still playing around but it will be an ESP32 based game controller with a small OLED Display. Still trying to work out details and its fighting me! So weeks of figuring turns into minutes of explaining lol. That series, whenever i get to it, will go over the breadboard prototype phase, pcb design as well as housing design for 3d printing and injection molding.

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

    Hi, Thanks for a very good tutorial.
    Can you add a link to your code so I can download it?

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

      Gordon, I don't have it hosted anywhere but I am happy to share it if you would send me an email. support@caducator.com

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

      I would love to continue building on top of that code. Do you still have a copy of it?@@LearnEverythingAboutDesign

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

      @@alainberube1535 Sure, send me an email support@caducator.com

    • @elishaseme3019
      @elishaseme3019 18 วันที่ผ่านมา

      @@LearnEverythingAboutDesign Hey does this speedomater able to caaculate the distance travelled on a bike, and can the arduiono communicate with a sever to that information?

    • @LearnEverythingAboutDesign
      @LearnEverythingAboutDesign  18 วันที่ผ่านมา

      @@elishaseme3019 hmmm. well yes to distance traveled. You can store and update variables to track that information. If you are recording MPH you need to also track the time and can figure out distance traveled. There are some other variables you can pull from GPS as well.
      As for communicating with a server, that might be a bit trickier. If you are paired to a device like a smart phone it should be possible. I would look into IoT devices. There are a lot of sensors and controllers already built for these types of tasks.