Functions won’t eat arrays whole - Do this simple thing instead!

  Рет қаралды 12,589

Programming Electronics Academy

Programming Electronics Academy

Күн бұрын

Пікірлер: 25
@robertobrenes5283
@robertobrenes5283 2 жыл бұрын
This channel is one of those gemstones you find on the internet, thank you for your great work!
@programmingelectronics
@programmingelectronics 2 жыл бұрын
Thank you Roberto!
@naboulsikhalid7763
@naboulsikhalid7763 10 ай бұрын
Grateful you add this topic to Arduino tutorials, but I found it very important when dealing with multiple identical elements and you want to apply the function to those elements. thank you
@programmingelectronics
@programmingelectronics 10 ай бұрын
Thanks for watching!
@ediekimo9110
@ediekimo9110 2 жыл бұрын
Man! I love how you explain the concepts. All of the sudden a confusing idea becomes so familiar
@programmingelectronics
@programmingelectronics 2 жыл бұрын
Thanks Edie - I hope these are helping!
@OliverMotorized
@OliverMotorized Жыл бұрын
I was trying to pass an int array from function to function but could not get it to work, the end result would be random numbers. I guess it’s because once that function is executed, the values are erased. Is there a way to do this without initialization a global array variable?
@icarossavvides2641
@icarossavvides2641 2 ай бұрын
Watch the video again, it's explained quite clearly. You cannot pass anything from one function to another because they are different Scopes, Once you exit a function all the local variables disappear. Whats your problem with global arrays, I wonder?
@flashback9966
@flashback9966 Жыл бұрын
Excellent, simply put.
@programmingelectronics
@programmingelectronics Жыл бұрын
Glad you liked it Flashback!
@aeronca1946
@aeronca1946 Жыл бұрын
what is the difference between your youtube lessons and your accadamy course?
@programmingelectronics
@programmingelectronics Жыл бұрын
Great question! Our academy has in-depth structured courses as well as a private forum. If you like our KZbin channel content, thank you would enjoy our training program.
@itzikovadia851
@itzikovadia851 2 ай бұрын
Very usefull thanks a lot
@jonathangriffiths1668
@jonathangriffiths1668 Жыл бұрын
I have just started working with Arduino a few weeks ago. I'm using buttons and the Adafruit NeoPixel library to set a certain pixel to a certain color. This is working, but obviously when I reset the Arduino, the pixels reset as well. I am trying to use micro SD card to store the specific pixels and the color I've set them to. But I can't figure out how to store the info and then read it back, so that when the Arduino starts up, the pixels light up with the correct color. I need to be able to set pixels one at a time, to red, green, or blue. Any help would be greatly appreciated.
@FD_1776
@FD_1776 2 жыл бұрын
Super appreciate these great tutorials. Got a question: Since the BUFFER array is being used to store the multiplication results does this imply that the two original arrays are left intact?
@programmingelectronics
@programmingelectronics 2 жыл бұрын
Great question Frank! You are correct.
@km077
@km077 Жыл бұрын
"Yay, functions will make my code cleaner." *tries to return an array in his first function* "malloc(), free(), pointers, return by reference... well, this is BS..." I just wanted to have a few elements neatly sorted in an array. Everything works fine with no stinky functions. Idk what's so problematic about arrays like holy fck... they might weight a bit more, but that's it. If they work everywhere but in functions, then what's the point of using those? I hope this wonderful video will fix this without wasting precious memory that people on the forums were freaking about. EDIT: Hmm... so basically, since memory-wise arrays don't store their elements, but rather pointers to those elements, we can just forget about sending an array out of a function, because the manipulations we do, we do on the actual original elements themselfes, so everything is "already sent" so to speak. (It's as if instead of writing a letter to somebody, we write in their diary. lol) Thanks a lot, man, finally got it.
@icarossavvides2641
@icarossavvides2641 2 ай бұрын
May I request people learn to write more clearly and moderate their language please?
@executive
@executive 2 жыл бұрын
array funtions?
@programmingelectronics
@programmingelectronics 2 жыл бұрын
Thanks executive! Updated
@yashaswikulshreshtha1588
@yashaswikulshreshtha1588 2 жыл бұрын
@@programmingelectronics Hey I am really glad that you're making these programming concept videos on Arduino. Just want to let you know, you're making a lot more of positive impact than you may notice. I learned programming using Arduino, not the best path but was stuck in there but I am really happy that you helped me get out. Keep up the great work!
@ramakrishna4092
@ramakrishna4092 2 жыл бұрын
@@programmingelectronics hi sir informative video on arrays concept . Can you pls do a video on how to return function pointer . And how to use understand the usage typedef with function pointer .
@programmingelectronics
@programmingelectronics 2 жыл бұрын
Thanks so much @yashaswi! It means a lot!
@programmingelectronics
@programmingelectronics 2 жыл бұрын
I'll see what we can do - thanks so much for the recommendation!
Using Arrays with For Loops
17:24
Programming Electronics Academy
Рет қаралды 34 М.
you will never ask about pointers again after watching this video
8:03
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 38 МЛН
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 17 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 69 МЛН
How to Organize Code
14:37
Programming Electronics Academy
Рет қаралды 65 М.
Arrays Part 3 - Using Arrays to Control Arduino Pins
8:45
Circuit Crush
Рет қаралды 6 М.
the TRUTH about C++ (is it worth your time?)
3:17
Low Level
Рет қаралды 785 М.
Arduino UNO R4 Lesson12 - millis Function | Handling Multiple Tasks | Non-Blocking Code
23:38
Passing an Array to a Function | C Programming Tutorial
9:30
Portfolio Courses
Рет қаралды 45 М.
Using tabs to organize code with the Arduino IDE
12:18
Programming Electronics Academy
Рет қаралды 61 М.
#BB7 Pass by Value or Reference - What's the difference?
16:35
Ralph S Bacon
Рет қаралды 14 М.
Using Arrays with Arduino
13:51
Programming Electronics Academy
Рет қаралды 31 М.
array vs &array Pointers Difference Explained | C Programming Tutorial
17:38
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 38 МЛН