Improve your Arduino programming skills - SRAM management

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • Random and hard to trace errors or lockups can be caused due to a bad SRAM data management. In this video I explain the most important SRAM areas with the use of simple and understandable Arduino examples.
    Video about direct register access:
    • Improve your Arduino p...
    Video about the qualifier volatile:
    • Improve your Arduino p...
    Video about pointers:
    • Pointers and floats - ...
    You can download the examples here:
    77.161.83.3/Arduino_SRAM_examples.zip

Komentáře • 85

  • @divyanshu_harkhka
    @divyanshu_harkhka Před 5 lety +45

    Professor: "Show an example of a perfect explanation.."
    Me : *Opens Joop Brokking's channel*

  • @omy2295
    @omy2295 Před 4 lety +5

    I took real-time process and processing course in college to learn something about programming hardware for real-time processes, the professor had never touched this subject. I realize now how important it is to know how to manage SRAM thanks to this wonderful guy named Joop. I love your way of teaching, man. May God bless you with happiness, good health and long term prosperity for sharing your knowledge with us.

  • @woodtv4481
    @woodtv4481 Před 4 lety +6

    We miss you Sir Joop, you haven't had any update project lately. Hope to see more of your videos.

  • @woodtv4481
    @woodtv4481 Před 3 lety +12

    IS SIR JOOP OK? I KINDA MISS HIM FOR HIS WONDERFUL TUTORIALS... I HAVE LEARN SO MUCH FROM HIS CHANNEL. HOPE HE'LL BE MAKING MORE VIDEOS SOON.

  • @paulkafig5788
    @paulkafig5788 Před 3 lety +3

    Wonderful video! Couple of hiccups that I ran into along with the solutions that might help someone else testing this code:
    1. When I first ran this, the variables in example 1 weren't showing up in the SRAM dump. The C compiler must have optimized them out because they weren't used. If you declare them as "volatile long" instead of long, you will see them in the dump. Maybe there was a change to the compiler since this video was made.
    2. I was getting a lot of "garbage" in my serial monitor before the data could be seen. If you slow down the baud rate, this will help. If you change UBRR0L from 16 to 103, this will change the baud rate from 57600 to 9600. It's a lot slower, but the output is cleaner. For other baud rates, see the ATmeg328P data sheet and be sure to change the baud rate in your monitor to match the Arduino.

  • @AppliedMetaphysician
    @AppliedMetaphysician Před 5 lety +2

    This very clearly exemplifies the necessity of understanding & practicing good memory management; in the broader realm of computer programming, but most-especially when working in the limited memory world of micro-controllers. Well done!

  • @williamna5800
    @williamna5800 Před 4 lety +5

    I'm really missing your videos. Hope all is well!

  • @PCBWay
    @PCBWay Před 4 lety +4

    What an impressive tutorial!

  • @capistor1
    @capistor1 Před 3 lety +2

    a beautiful video. we miss you

  • @longdongsilver4719
    @longdongsilver4719 Před 3 lety +2

    Hi Joop. Your channel is exactly what I was looking for. Thanks for the precious work and for the sharing!

  • @andrewtoogood1429
    @andrewtoogood1429 Před 5 lety +1

    This playlist is amazing. Learning so much! Your brief mention of int main() is huge esp. for attiny ir other smaller processors, seems obvious but i never considered it previously. Please keep these coming!

  • @avijitbanik531
    @avijitbanik531 Před 4 lety

    Before this I just know a little bit of codes.
    But with your wonderful explanation I have understood a lots of the Arduino's memory works.

  • @KrisTemmermanNP
    @KrisTemmermanNP Před 5 lety +2

    Great stuff! Thanks for your in-depth tutorials!

  • @robinharris4706
    @robinharris4706 Před 4 lety

    Super video - I learnt a tonne of stuff and find your style very clear to follow. Now I will run your examples and experiment to consolidate what I have learnt. My particular problem is some code that creates 'random' wdt resets after a few hours and I suspect heap / stack collision due to using strings. Although I can remove the problem empirically I want to dig deep and find out the real cause. Lots of learning opportunities! Will watch the videos you referenced too. Great material, thanks Joop.

  • @cheako91155
    @cheako91155 Před 4 lety

    It's worth looking into the Rust programming language, I hear there is an effort to support microcontrollers. Rust takes revolutionary steps to ensure memory safety.

  • @sandipanchanda9563
    @sandipanchanda9563 Před 3 lety

    Hi Joop, how are you?
    Any updates? Please come back to this hobby again, we are really missing you.

  • @SyedMehraj007
    @SyedMehraj007 Před 3 lety +1

    Sir come back please miss you😭

  • @janhvibhosle3852
    @janhvibhosle3852 Před 5 lety +1

    Excelllent video sir, please make more videos on arduino.

  • @Mr0neShotAway
    @Mr0neShotAway Před 4 lety +1

    Hey, are you planing to upload more videos?

  • @zambumm
    @zambumm Před 4 lety +1

    how do you get it running without loop and setup? i always get a compile error.
    i thought in arduino IDE that is impossible to programm in int main style

    • @zambumm
      @zambumm Před 4 lety

      okay, i found out it compiles when using something like arduino nano- but not with ESP32 - i think because of the underlying usage of freertos tasks

  • @tonybell1597
    @tonybell1597 Před 4 lety +1

    Outstanding, very clear, thanks Joop

  • @hubercats
    @hubercats Před 3 lety

    Very helpful video. Thanks!

  • @adelashour3253
    @adelashour3253 Před 3 lety

    please make a video of Raspberry Pico with C programming

  • @artcodezen
    @artcodezen Před 3 lety

    Great explanation, you helped me a lot with your videos! Thanks a lot!

  • @taihengwei1415
    @taihengwei1415 Před 4 lety

    Excellent and Clear! Your video is very perfect!

  • @eyal4
    @eyal4 Před 4 lety +1

    Hey, joop thank you for the video again!! can you do a video about how to design PCBs? I saw that you design a lot of PCBs in your videos

  • @AdemOmerovicBA
    @AdemOmerovicBA Před 2 lety

    Thanks for amazin explenation. 🙏

  • @koffibanan3099
    @koffibanan3099 Před 4 lety

    Fantastic explanation!!! Bedankt Joop!

  • @ecky_thump
    @ecky_thump Před 5 lety

    Thanks for taking the time to inform and educate 👍👌

  • @peckfamily6662
    @peckfamily6662 Před 5 lety

    Thank you. Very clear explanation with great examples. 👍😃

  • @josecelso6342
    @josecelso6342 Před 4 lety

    in the design of the arduino drone, if i use a 4 cell battery, what is the maximum current i can use?

  • @birendrakumar-gl5gq
    @birendrakumar-gl5gq Před 4 lety

    Hlo, i have a humble request
    If u could show a path/ guide to become a drone programmer. Sources, material and where to start as beginner.
    I've following you ymfc from the beginning but there are lot of difficulty in understanding the code and also some topics like interrupt and other doesn't make much sense to me, pls read this comment it will help a lot of students and diyers.
    If some in comment section can suggest pls do so.

  • @pavelnemec3867
    @pavelnemec3867 Před 4 lety

    Hi Joop,, thank you for nice tutorials.
    I did not get variables set at 0x0100 when using your zip examples and latest IDE (1.8.10) possibly due to different code optimization default setting. Variable appears when used (in while loop).

  • @rameshboina8832
    @rameshboina8832 Před 3 lety

    Joop sir please give me some knowledge about ymfc pcb please update in ur website

  • @tejramgupta7942
    @tejramgupta7942 Před 3 lety

    👍👍👍👍👍 very useful

  • @FloetschMaster
    @FloetschMaster Před 3 lety

    example link doesnt work :( -> edit: right click "download link" work... its just youtube which blocks the link...

  • @bobyla13
    @bobyla13 Před 2 lety

    why subtitles are closed & unavailable!!!!!!

  • @MediocreReview
    @MediocreReview Před 4 lety

    Hi joop I'm building an Arduino base drone similar to your ymfc project but I am adding 4 ultrasonic sensor to it for obstacle detection and was wondering if there's a way to get to you. I am not very good at coding but have a good knowledge on it would love your help on few aspect on my codes thank you .

  • @argentinomacrifuevidaltamb3772

    Excelente video, gracias por compartir.

  • @Rami7605
    @Rami7605 Před 4 lety

    Good explánation

  • @Dhruv.Wadhwa
    @Dhruv.Wadhwa Před 4 lety

    Plzzz make a tutorial on how to make a gimbal using brushless motor

  • @MicEib
    @MicEib Před 4 lety

    So good seriously. Thank you.

  • @hammershigh
    @hammershigh Před 5 lety

    Excellent! Thank you.

  • @erikisberg3886
    @erikisberg3886 Před 3 lety

    Great video! Your code examples seem to be blocked for download by chrome for some reason.

  • @mostafagaberahmed6657
    @mostafagaberahmed6657 Před 3 lety

    why there is 5 dislike? this video need to be on Rank :)

  • @george12121979
    @george12121979 Před 4 měsíci

    I m lucky. I find your channel

  • @merijnvinea3546
    @merijnvinea3546 Před 4 lety

    Hoi Joop,
    Ik leer een hoop van je video's en ben erg geinspireerd geraakt.
    Ik heb nu de upgrade gemaakt van Arduino naar de STM32F103C6T8 (Blue pill).
    Deze wil ik graag programmeren buiten de Arduino IDE. Ik kan .bin files uploaden. (Deze maak ik wel via de Arduino IDE)
    Maar ik probeer nu via STM32CubeIDE een 'Blink' programma te maken. Daar loop ik een beetje vast.
    Zou je me hiermee kunnen helpen? Zoja: via wat wil je communiceren?
    Sorry als de reacties niet de goede plek zijn om dit te vragen maar kon geen betere manier vinden.
    Alvast heel erg bedankt!

    • @merijnvinea3546
      @merijnvinea3546 Před 4 lety

      Oke op een of andere manier kan ik de GPIO C dingen niet aan sturen maar werkt het met GPIO B wel. Geen idee dan maar geen geintregeerde LED.
      Toch bedankt voor alle je leuke videos!

  • @viggibot
    @viggibot Před 5 lety

    please make a tiny quardcopter using coreless motor and arduino mini

  • @daskasspatzle2396
    @daskasspatzle2396 Před 5 lety

    Excellent explanation, thank you ;-)

  • @adelashour3253
    @adelashour3253 Před 3 lety

    Please show us a drone made of raspberry pico

  • @paranoidpenguin9077
    @paranoidpenguin9077 Před 4 lety

    I just came across your channel this week and wanted to let you know that I absolutely love your content! Out of curiosity, do you see any possibility that you would produce a video series on self-leveling planes?

  • @madhusudan8925
    @madhusudan8925 Před 4 lety

    Hello from electronoobs
    🔥

  • @suncrafterspielt9479
    @suncrafterspielt9479 Před 4 lety

    Hey, will you follow up with another video?

  • @RSP13
    @RSP13 Před 5 lety

    OMG! Thank You sooooooooo much.

  • @RSP13
    @RSP13 Před 5 lety

    AMAZING!

  • @ishaanbhatia8942
    @ishaanbhatia8942 Před 4 lety

    Sir, please help me out, I was following the video for ymfc _Al version 1
    And my quad flips while taking off
    the orientations of the motors are correct!!!
    Please help me out!!

    • @ishaanbhatia8942
      @ishaanbhatia8942 Před 4 lety

      It's very urgent!!

    • @ajduk6012
      @ajduk6012 Před 4 lety +1

      Dot on Gyro needs to point to the left rear of quad, if gyro is mounted correctly mybe you failed in setup when you where calibrating gyro.
      If everything is ok try lifting right wing up at first step in gyro calibration.

    • @ishaanbhatia8942
      @ishaanbhatia8942 Před 4 lety

      @@ajduk6012 I have done both the things , issue not solved, any more ideas?

  • @sachinupadhyay2790
    @sachinupadhyay2790 Před 5 lety

    Great Work Done Bro *****/5

  • @osamaomar9096
    @osamaomar9096 Před 5 lety

    thank you sir

  • @anj000
    @anj000 Před 4 lety

    It is always funny for me as a Pole.
    "Sram" means "I'm shitting"

  • @dinvinchester3353
    @dinvinchester3353 Před 2 lety

    update link for code the examples please !

  • @fatih1922
    @fatih1922 Před 4 lety

    Joop you rock !!!

  • @nanomiterctech423
    @nanomiterctech423 Před 3 lety

    Hello sir , haven't seen you active for a long time . Are you okay ? Please respond through a community post or through a video !

  • @e-seeker8239
    @e-seeker8239 Před 3 lety

    Miss you Sir...Hope everything is ok :/

  • @rayashstudio3222
    @rayashstudio3222 Před 4 lety

    Hello from electronoob

  • @Electronieks
    @Electronieks Před 3 lety

    Hela waar zijn de nieuwe uploads?😉

  • @aivaraspetrikas15
    @aivaraspetrikas15 Před 4 lety

    Hello Joop, I have several questions with regards to stm32 quadcopter project. I have been struggling to get the project to work and I hope you can find time to discuss the issues with me via email or something. It would really help me out.. Thanks!

  • @ajaypadale6797
    @ajaypadale6797 Před 4 lety

    Hii from electronoobs

  • @duckbear1892
    @duckbear1892 Před 3 lety

    Would you consider adding a camera to your drone

  • @mustafayasiraydin
    @mustafayasiraydin Před 4 lety

    Hello everyone, i came here from electronoobs channel.

  • @Artnovetor
    @Artnovetor Před 4 lety

    👍

  • @3D_Printing
    @3D_Printing Před 4 lety

    Push on the Stack, Pop off the Stack is fast

  • @MrKlaygomes
    @MrKlaygomes Před 2 lety

    What happened to you? We miss you a lot!

  • @AxelWerner
    @AxelWerner Před 5 lety

    I head "Goat" all the time! What is it about the Goat here ?!?

  • @koteuek2305
    @koteuek2305 Před 3 lety

    Funny fact: In Polish lanaguage "sram" means "i'm pooping"

  • @kopazwashere
    @kopazwashere Před 4 lety

    please remove dealextreme links on your website on parts list for YMFCs, this website is terrible they shouldn't be promoted. :/
    their website doesnt even let you log in and overcharges you for shipping/items.

  • @BlackopTN
    @BlackopTN Před 4 lety

    electronoobs brought me here

  • @marcosdouglas9256
    @marcosdouglas9256 Před 4 lety

    Hi!
    Do you have some email address, so we can reach you?

  • @digmatology
    @digmatology Před 2 lety

    I will be Unsubing all channels until the dislike button works. No dislike? No like!

  • @bobyla13
    @bobyla13 Před 2 lety

    hard to understand your English pronunciation