How Classes and Objects Work in Arduino Programs - Ultimate Guide to the Arduino #20

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

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

  • @vegansynths7757
    @vegansynths7757 ปีที่แล้ว +6

    I’ve read write ups and watched many videos on classes but this is by far the clearest explanation I’ve seen. Thank you so very very much. 😊

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

    Slow and steady tutorial. Very easy to follow up. Well explained. Well done. Waiting for more tutorials like this.

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

      Here's a link to the playlist for the whole course: th-cam.com/play/PLW4FQTHYB40QKQBempqODlsZ2NrKIgdyQ.html

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

    Most excellent tutorial on writing classes and how to use objects. Thank you kindly.

  • @paulalmquist5683
    @paulalmquist5683 9 หลายเดือนก่อน +3

    Good explanation of the structure needed to create and use a class but your use of the term "rate" is misleading. What you call "rate" is the delay time, ie, the on time and off time of the LEDs. "Rate" (more specifically a temporal rate) is something per unit of time, like flashes per second or miles per hour. In a practical application it may be easier to express the rate as so many flashes per second with a flash duration of some number of milliseconds or a percentage of the cycle time. This complicates the code so in your setting one may easily lose sight of the basic structure to use and get over involved in the application so a simple example is appropriate. I taught programming for many years and found it important to choose variable and function names with care to reflect what is actually happening in an example compared to the formal structure.
    Most of my programming was in the pre-object oriented era and am now trying to learn this new to me methodology. While watching your video I created a formal structure for the code using terms like "className" and "functionName" and in parallel wrote the blinker example using "Blinker" for the class name and blinkLED for the function name. "MyClass" in the example is meaningless to the purpose of the example. I have not yet seen great benefit of classes and objects compared to the vintage concepts of subroutines and functions I used while programming in Fortran decades ago. There may be more benefit in very large projects than the size of the ones I worked on. I have been dabbling with microcontrollers for a relatively short time so much to learn, so little time.

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

    Best explanation so far

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

    Does writing classes and objects like this still use the same or more bytes during upload? Does the class and objects like this help with multi tasking? Is it similar to using outside python script with excel for data or even act as the same as a library or an example in arduino. Meaning it shortens the amount of bytes used?

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

    Great explanation, but for me it would have been so much easier to follow if you named the class “BlinkingLed” or something else that makes sense!

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

    Thanks for the great tutorial. The information was very concise and exactly what I was looking for. I took notes and everything. Saved to my 'watch later' folder for reference. Thanks again.

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

    Great stuff, I have learnt a lot ....cheers.

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

    Very usefull thanks

  • @jimmacino8712
    @jimmacino8712 9 หลายเดือนก่อน +6

    The 'background noise/music/beat box. is VERY irritating, and UNNECESSARY! Good material, drop the disco!!!

  • @novichkovv
    @novichkovv 3 หลายเดือนก่อน +1

    I hate those pauses between each statement, the video is informative though

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

    Did I just miss an explanation why using Class and Object? It is very workintensive and restricts development on only this machine.

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

      A reason to use classes and objects is to achieve something called information hiding. A class is a "factory" that produces black boxes. These black boxes have an interface that anybody can use and an internal interface that only the black box can use to perform it's functions in the background. A program that uses classes can be ran on other computers. I hope I didn't misunderstand your question.

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

    Sehr gut