Тёмный

Using Arrays with Arduino 

Programming Electronics Academy
Подписаться 227 тыс.
Просмотров 29 тыс.
50% 1

🤩 FREE Arduino Crash Course 👇👇
bit.ly/get_Arduino_skills
**Want to learn more? Check out our courses!**
bit.ly/3GAntjQ
**Get your Free Trial of Altium PCB design Software**
www.altium.com/yt/programming...
**Get the code, transcript, challenges, etc for this lesson on our website**
bit.ly/3lOQRuU
**We designed this circuit board for beginners!**
Kit-On-A-Shield: amzn.to/3lfWClU
FOLLOW US ELSEWHERE
---------------------------------------------------
Facebook: / programmingelectronics...
Twitter: / progelecacademy
Website: www.programmingelectronics.com/
CONTINUED…
bit.ly/3lOQRuU
**About Us:**
This Arduino lesson was created by Programming Electronics Academy. We are an online education company who seeks to help people learn about electronics and programming through the ubiquitous Arduino development board.
**We have no affiliation whatsoever with Arduino LLC, other than we think they are cool.**

Опубликовано:

 

17 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 39   
@mariaviklund4546
@mariaviklund4546 Месяц назад
I was banging my head trying to get this to work on a project before i found this video. Now i know what i did wrong. Mixed the data types! Thanks so much!
@programmingelectronics
@programmingelectronics Месяц назад
So glad it helped!!!
@frazier283
@frazier283 2 года назад
Great info. You are absolutely right to be concerned about inserting element values outside the size of your array. I learned first-hand you should always always always specify the size of your array when initializing. I spent several hours re-reading a multi-array code before I finally found the typo that bricked two Nanos by changing a value Beyond its array size. Fortunately I was able to salvage them by reloading their bootloader. However if I had specified the size of the array, the typo would have been caught when compiling and would have saved me hours of trouble.
@KW-ei3pi
@KW-ei3pi 2 месяца назад
Love your channel. It's probably the best source of videos for Arduino instruction. I've been watching your videos for about a year. I was wondering where you are from, as you have different way of pronouncing the word "put". It was very noticeable in this video. Thanks. Regards
@programmingelectronics
@programmingelectronics 2 месяца назад
Thanks! I'm from the midwest, but I just say "put" wrong 😀 I have no idea how I lived over 4 decades saying it incorrectly, but I am working on it! I don't even play golf.
@ChadKapper
@ChadKapper 2 года назад
This a super-valuable lesson! Thank you!
@programmingelectronics
@programmingelectronics 2 года назад
Thanks Chad!
@peterlyne9378
@peterlyne9378 Год назад
Thank you so much, very well explained
@leythecg
@leythecg 2 года назад
Very well explained! Thanks very much!
@programmingelectronics
@programmingelectronics 2 года назад
Thanks so much!!
@tohcp5729
@tohcp5729 Год назад
it is great thing to learn and ready "open my eyes " and how the person created the so interesting guiding in Arduino programming way ...keep up
@programmingelectronics
@programmingelectronics Год назад
Awesome! Thank you!
@jaysonbutcher1178
@jaysonbutcher1178 2 года назад
Thank you! You explain it well. ;)
@programmingelectronics
@programmingelectronics 2 года назад
Thanks so much for the note!!
@joshuapitong899
@joshuapitong899 2 года назад
Really helpful.🙌
@programmingelectronics
@programmingelectronics 2 года назад
Glad it was helpful!
@jean-francoismaury5822
@jean-francoismaury5822 4 месяца назад
Really video, thanhs !
@jlr3636
@jlr3636 Год назад
Your explanation of what you are going is very clear, however an example of why or where to use an array escapes me. An example would help. Your videos on Arduino are among the best, thanks.
@felixcosty
@felixcosty 2 года назад
Thanks for the video. Could you please do a video on the joystick library. Trying to convert an old analog joystick to digital using a pro micro. Could you show how to program the Hat, and triggers/switches so that the triggers and switches work like joystick switchers. Right now my switches work as keyboard commands trigger = A and so on. I have seen short programs that make the switches act as joystick commands, would like to see the longer version where each switch is its own bit of code. Hope this makes sense.
@programmingelectronics
@programmingelectronics 2 года назад
Glad you liked the vid! Thanks for the recommendation on the joy stick library!
@tharchit9028
@tharchit9028 6 месяцев назад
THANKS MY DEAR !
@programmingelectronics
@programmingelectronics 6 месяцев назад
Thanks for watching!
@voytechj
@voytechj 2 года назад
@7:10 other elements will be initialized with default value, and for a type of byte it will be zero.
@midianalbertokhaiyow8195
@midianalbertokhaiyow8195 2 года назад
excellent video, I have a question, let's imagine I have many arrays, let's say those have names like red blue green, and each array has several elements that in some cases can be as few as 7 or 10, and in other cases they are as large as 300 elements, In the main function, what it does is take an array as for example the "green" one and execute anything with the elements, such as adding the elements to each other or subtracting them, that is not really the important thing, the important thing is that I want to learn is how to change the array that is being used in the function through serial communication, for example, command by serial communication "red" and in the main function it is executed but in this case instead of using the "green" array use the "red" and if I write "blue" then change the "red" for "blue" ...
@programmingelectronics
@programmingelectronics 2 года назад
Great question! I’ll see if we can come up with a video to help on this. You might consider using a switch case statement to select the appropriate array based on the serial input.
@midianalbertokhaiyow8195
@midianalbertokhaiyow8195 2 года назад
@@programmingelectronics Hello, thanks for your answer, I did not consider using a switch case, because there are too many arrays, neither consider using an array of arrays, because of the big difference between the content of arrays, since some contain few elements (4 or 10) and others contain many elements (300 or 400). I suppose that I could use pointer methods, what I am not clear about is how to convert a string sent by serial as "red" to a pointer, and then be able to use the pointer to fill it with the content of the "red" array and execute the code
@bassman2162
@bassman2162 2 года назад
@@midianalbertokhaiyow8195 put the array names in a switch case that calls different functions depending on the color (array name). Then write a function to handle that array. If some of the functions do similar things, pass arguments to the function to determine how it process the passed array.
@programmingelectronics
@programmingelectronics 2 года назад
@@midianalbertokhaiyow8195 I was thinking what @Bass Man mentioned below, but I may not fully understand what you're after. Sounds like a cool application though! We do have several lessons on using serial input on RU-vid that may be helpful on this potentially. Best of luck!
@platine141
@platine141 2 года назад
Is it possible to just pick up elements from 0 to 4 for example like in python? And why my array shows double the size of its elements? I didn't set the size of it
@programmingelectronics
@programmingelectronics 2 года назад
Great questions! 1) I believe you you are referring to "slicing" an array? Like you would with a list in python? myArray[] = { 10, 20, 30, 40, 50 } where... myArray[0:2] would give you the elements 10, 20 ->To my knowledge you cannot slice arrays like this with Arduino. 2) How are you finding the size of your array? Are you using the sizeof operator? If you use sizeof() it will return the number of total bytes in your array, not the total number of elements it can store. If you want to get the size of your array, you need to divide the sizeof(myArray) / sizeof(myArray[0] -> this will give you the actually size of the array.
@senpuuxd1032
@senpuuxd1032 Год назад
How to remove something from array? I want remove uid tag from 2 dimensional array after he was scaned and compare to array i don't know how to so this and can't find simple (to me) way
@learn3715
@learn3715 2 года назад
Great upload video! 👍 stay connected! 😍Like 👍👍👍
@programmingelectronics
@programmingelectronics 2 года назад
Thanks so much!
@Dartheomus
@Dartheomus 9 месяцев назад
It is killing me not to know where 155 came from. It's not an arbitrary value... it must have derived it from something. =P
@karimazeli2653
@karimazeli2653 2 года назад
Why not start with a Hardware example? That would make it less abstract, because we end up building physical things, not just software programming...
@billferner6741
@billferner6741 2 месяца назад
Maybe this helps? I use it in a temperature measurement for calculating the average of 10 masurements. Each new data point is put in a different position of that array. Then computet the sum, decided by 10. Voila, the average temperature.
@billferner6741
@billferner6741 2 месяца назад
I miss an example of a two-dimensional array.
@planker
@planker Год назад
Like! Zero, accept it and move on... It's the stupid machine that thinks it's a number, ie; 1001011. 0 has a value to it. Machines also think Green is a primary Color. Stupid machines.
@gaptoofgranny
@gaptoofgranny 7 месяцев назад
I know you need to run ads in your videos in order to make a living, I get that, but you need to either place the ad before the lesson or after. Some of us need to keep the lesson going in one continuous stream, otherwise our methods of processing information in order to learn it gets disrupted and we have to start all over again. It really is bad practice. I couldn't do that when I was teaching, otherwise my students would look at me like I grew a second head and get absolutely thrown for a loop.
Далее
Using Arrays with For Loops
17:24
Просмотров 31 тыс.
What is the ? code!?  Learn about the ternary operator!
12:30
Everything Starts with a Note-taking System
21:23
Просмотров 176 тыс.
Which Arduino IDE should I use?
13:43
Просмотров 83 тыс.
How to Organize Code
14:37
Просмотров 60 тыс.
Pin Change Interruptions ISR | PCINT | Arduino101
14:19
LESSON 31: Understanding Arduino Arrays
29:47
Просмотров 68 тыс.
Arduino Joystick 2.0  Library  - Beginners Guide
25:22
Просмотров 81 тыс.
Serial Communication with Arduino - The details!
16:51