ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก
Arduino Control Flow
ฝัง
- เผยแพร่เมื่อ 5 มี.ค. 2017
- SparkFun RedBoard - Programmed with Arduino www.sparkfun.c...
We switch gears this week and cover some computer science concepts. Specifically, we go over how an Arduino program executes sequentially and how it can be visualized in flowchart form by examining the ever popular Blink example. You can follow along with an Arduino and the Arduino development environment: learn.sparkfun...
I wish there were more of these videos....I learned more from this video (learn= understand & retain) than going through the book of circuits and stuff that came with my kit! please make more of these that explain the the different coding commands and parameters for other types of projects! PLEASE...I'll watch them all and if there's ads, I'll click them and watch them all the way through! These videos would be invaluable for people like me...that have used the prewritten codes and gone through some predeveloped circuits/projects and still don't "get" why or how some things are happening. AGAIN, THIS VIDEO WAS AWESOME! THANK YOU!
I don't see many Arduino tutorials that focus on the how and why of coding, so I'm really glad to hear it helped! I'm working on micro:bit tutorials at the moment, but I plan to get back to these in a few weeks knowing that people find them useful, so I do appreciate the feedback!
This video may be over 3yrs old but the way you explain this is powerful! Some people understand technical terms more easy but some (like me, even as an adult) still need simplified teaching even more. Thank you for this.
I like the flow chart you made. That's the best way to learn it.
We were all beginners, at one time...
tanx....
Shawn, Thank you for making these great tutorials on the Arduino. I ask my students to watch it for our electronics class. They are very well made and enjoyable to watch.
Thank you. I'm glad to hear that your students use and like them!
thank you so much for this video, exactly what i needed to teach to my students.
bruh, this...this right here is GOLD. I mean this cleared up ALOT! lol thank you!
Learning about a block diagram and pseudo code was very helpful.
What a nice job explaining how to use pseudocode.
Well done Shawn; you are a very good lecturer.
Nice work explaining ! Best video on how to program Arduino basics!
Good explanation for beginners... Nicely done
Thanks! I had a rough time trying to figure out how to define terms in a generic computer science-y way while still being able to show examples.
Thank you. I having hard time on finding a basic on coding in an arduino.
Great walkthrough Shawn! Funnily, I was trying to give exactly the same walkthrough to a friend last Saturday and got stumped at the very first line in setup(). The problem was one that crops up very often in programming-languages, and one we have learned to ignore.. though on the long-term, i.m.o. it stunts our reasoning-ability. The problem was as follows (remember - this friend knew _nothing_ about electronics): I could not explain, for the love of me, how a pin can become an output. I tried my best starting with an explanation of tri-state buffers and ending in simplistic analogies of a postman that delivers letters as opposed to a postman that fetches letters (the latter worked reasonably). The Problem still remained - Why is that pin an output? Why have we set its mode to 'output'? The pin isn't an output at all - it has merely been instructed to push out bits. The nomenclature "Outputter" would have been nearly perfect. ("The outputter sends a digital state out of the chip"). By clearly discriminating the doer from the action from the target from the consequence, the "train of thought" would become easier to follow and, more importantly, easier to identify flawed reasoning in.
However I know that we, being the stubborn humans we are, aren't going to change our ways anytime soon ;) Cheers!
You are absolutely correct: explaining how a pin's voltage is controlled through code is extremely difficult to explain to a beginner without going into how registers work and how the electronics inside a GPIO pin works. I love your example of the postman, however. I usually stick to "output" means we get to control the voltage of the pin through code, and "input" means we get to read the voltage on that pin. Luckily, I haven't had too many "how exactly does that happen?" questions.
Thanks Shawn. The difficulty, though (I hasten to point out), was in the *nomenclature* and not in explaining the workings - I mean - an "output" is, abstractly speaking, the thing that gets delivered. Not the postman. The postman can thus be designated as an "outputter" but not as an "output". The "output" would be the logic-level that the that the pin pushes out. I know this is nit-picking, but a well-nit-picked naming-system (like the IUPAC) forms the basis of any platform for logical reasoning. (Remember the time they changed "Lanthanides" to "Lanthanoids" to avoid possibility for misinterpretation?)
excellent I shall try this later, very helpful
that was so helpful , thank you very much
goooooood for start
Perfect for beginners and as well for the peoples who are already working with arduino but still require revise the whole chapter 😊.
Can you please explain or drop me a link for micro stepping tutorial of a stepper motor.
Thanks
Thank you for posting this video... I would like to know if you cover blinking LEDs using Millis() as
I needed this!! Thanks
Wow!I needed that!
2:36 nice shirt!
Great video but... should't you have used //pinMode(LED_BUILTIN, OUTPUT); to make the... INTERNAL LED light up?
instead of pin 13?, Thanx
On the UNO, LED_BUILTIN resolves to 13, so it doesn't ultimately matter for the sake of the video. LED_BUILTIN is a useful tool if you want to avoid hardcoding numbers for the various Arduino platforms. I chose to show it hardcoded so that you could see how it relates to the pin numbers that are printed on the board.
// heartbeat programme;
void setup() {
// put your setup code here, to run once:
pinMode(13, OUTPUT );
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite (13,HIGH);
delay (100);
digitalWrite (13,LOW);
delay (200);
digitalWrite (13,HIGH);
delay (100);
digitalWrite (13,LOW);
delay (1000);
}
Can I use the arduino in multiple thread?
Great! 👌You deserve👍.
#EEE
Ever popular?
Blink is the most emulated, worst programming paradigm ever