I never comment on videos, I feel as though it just becomes noise in the midst of the rest of the comments. I truly hope you see this because I want you to know that this is truly one of the best maker videos on UA-cam, and I do not say that lightly. I consume a mass amount of various maker videos to learn, make my projects better, and to come up with great new ideas. Your video was excellent for several reasons; first, you were extremely informative and detailed in your code and explanation of the code. So many just throw out what they have copied and pasted from some other source online. Without a doubt, I'm certain that you are experienced and advanced enough that you can write all of this from scratch. Secondly, you showed what can go wrong and how to debug and find solutions to solve the problem. This is the essence of all programming is debugging and solving problems. It is so refreshing to know that I am not alone in banging my head on the keyboard when my sketches won't compile or run in the manner they were intended or expected. It reminds me that to succeed, you must press through and persevere. Thirdly, your videography was the best of any maker video I have seen yet, bar none! And as I have said, I have sometimes wondered if I have reached the end of UA-cam. I know how much time, effort and painstaking editing that it took to create content of this caliber. It has a greater purpose that I initially didn't realize other than just making impressive shot sequences and Premier tricks such as your coding text being typed out on the screen. Let's face it, even for the enthusiast, the nuts and bolts of coding can bring on the glazing over of the eyes and the absent wandering of the mind, even when we want to pay attention. The creativity of your video kept me engaged and hyper-interested and held off the monotony of codeing. Your lighting was excellent, your audio was excellent, and your editing was superb. I haven't even watched any of your other videos before I wanted to comment and encourage you that your hard work and effort is greatly appreciated, at least by me. I know that UA-cam creaters are swimming in a see that is so crowded, the sharks have given up. Keep swimming, you my friend, will stand out when the rest have sunk to the bottom!
Dan Peters thank you for typing this! Definitely not lost in the sea of comments. This comment helped me get out of bed the other day. I’m glad you picked up on my emphasis on debugging. One of the best parts of this coding method is how it helps with debugging, so I wanted to “show” it instead of say it. I also like that you noticed my audio. I think audio is more important than video so I definitely put some effort into it. Haha ya, this video took me almost a year to make. LUCKILY people search for it. It’s not as popular as my video on mechanical drawing, but I’m glad there is a small audience that really like it some people let me know. It’s definitely my baby and the peak of my video making. In the future I’m going to dial it way back and make simpler videos. This video took me about a year to make in between my day job. I definitely bit off more than I could chew :). Thanks again. Happy hacking!
Seriously! Your meticulous attention to detail - even using stop motion animation! - to relay your thought and add visuals while you speak helps the audience fully understand what you're saying.
Honestly, you've helped me so much. I've adopted your approach and have been able to untangle my code, and also do far more complicated tasks simultaneously without the dreaded delay! Makes coding far more enjoyable. Thanks heaps.
Well done. The information was presented on a logarithmic fashion with a slow start and a steeply rising level of complexity. The last part with the most information happened really quick. Fortunately, there is a rewind available on UA-cam. I used it a LOT! Thanks for all your efforts.😊
Man every arduino learner should watch this video. Not just because State machine is the jump from beginner to advance level, but the video itself is clear, thorough, and fun to watch. Hope to see more of your works!
Nicely done...I used to build interrupt driven state machines with error handling in LabVIEW. That was many years ago. Now, I have found microcontrollers again and really enjoyed your very good description of how to build state machines...my new model...thanks very much...!
I don't like complicated codes, but the way how you put this complicated code together makes it easy to grasp. thank you for sharing knowledge, I liked and subscribed
Well done! My first attempt at employing a state machine was 40years ago and was for a multiple-input/output alarm card to be used in telephone exchange equipment - well before Arduino. The State Machine concept greatly simplifies the hardware pre-MCU days and your examples show how well it can be employed in software. I particularly liked how you overlayed the code. That alone is something that could be made great use of by other channels.
The 115200 is a remanence from the pre-USB era, where our computers had serial ports with DB9 and DB25 plugs. The max speed for a standard RS-232 serial connection back then was 115200 Bps. When initializing a connection to an attached serial device, say like a telephone modem, the device would usually expect a speed of 9600 Bps until it would receive commands to change the speed. Older devices would expect lower speeds and some, like what we called “dim console terminals” often expected 38400 Bps. But for the longest period, the default initialization speed was 9600 Bps. I’m going to spare you for the whole Baud vs. Bps explanation since it is not really that important anymore and one of those things, I would hope to forget one day. Most Arduinos have a small secondary microcontroller on board for controlling communications through the USB port. This UART controller simulates one of these “good” old-fashioned RS-232 com-ports by default. This is why your Arduino shows up as a COM device when you hook it up to your computer. But this small controller can be reprogrammed to simulate RS-422 or RS-485 as well or even pretend to be a keyboard, a mouse or various other devices like joysticks, gamepads, PlayStation or Xbox controllers, etc. etc... basically any kind of device you can imagine to hook up via USB. So, with the “Serial.Begin(115200)” instruction you are pretty much just telling the Arduino to establish a serial connection to your computer through the simulated COM port at the speed of 115200 Bps. The Serial.print(“Some Text”) could be interpreted as SendString instead and Serial.println as SendString(“Some Text”) followed by a CR and a LF (next line). CR = Carriage Return = ASCII value 13 / 0x0D LF = Line Feed = ASCII value 10 / 0x0A I really enjoyed your video by the way 🙂
@@TheNormalUniverse I am still in the learning phase when it comes to Arduinos and micro-controllers. But with 35-36 years of computer-baggage, it is quite easy for me to connect the dots. It almost happens automatically without me actually noticing that I am doing it. Maybe you will find this interesting (it is not something I have made): github.com/AlanChatham/UnoJoy
I also have never really comment on videos and I just want to say that I've been studying C and C++ for the last month and your video actually finally allowed me to feel confident on how to organize my code. Please keep making more awesome videos!
Awesome! Thanks for letting me know. I should say that I'm somewhat self taught on coding, so I don't know if these ideas are considered "correct" by the experts. But I asked a few friends who are real programmers and they said "ya this looks fine." I think there are a lot of different ways to set up a state machine and everyone does something different.
Good stuff this video has aged so well it's still incredibly relevant even though Tech and coding environments keep changing You speak great truth and do it very well thank you
Well it is now 5 years later and the start of winter, it snowed 3 days ago. I like what you did, I have 5 contacts, one is a push button. The 2nd and 3rd are a rocker switch, if switch left move stepper left, if right move stepper right. Left or right will go until it sees a stop switch the last 2 of the 5 will put it into standby mode, wait for left or right, the push button will bypass a pot that sets the speed, to full speed to the end stop. I plan on using a modified version of what you wrote here! FYI, I did not know a comment helps in your content until today! Lee
Yo dude you just simplified months of thinking into a 30 minute video. PLEASE MAKE MORE TUTORIALS ON THIS and working with more complext Arduino code, especially using other languages on arduino PLEASE PLEASE PLEASE. Thank you so much This is the definitive best maker video on this channel. It's simple, fun, not cringey, well recorded and gets to it's point plus it uses timestamps for easy reviewing. BEST MAKER VIDEO EVER
Thanks for the super nice comment Nen! This video was definitely my peak and I'm glad people are getting use out of it because it took a long time to make. That was kind of the apex of my coding knowledge (self taught) so I won't be able to make another video soon because I have more learning to do. One topic I want to cover is how to use object oriented programming on Arduino. It's a good way to make your code and portable as the projects start to get more and more complex. Synergizes well with the state machine stuff covered in this video.
@@TheNormalUniverse I would love to see that video so much. This is legitimately amazing and I'm here for more of your stuff. I love seeing approaches to learning from people who are still learning and can admit that. Continue to make content man, I'd love to see you being a huge maker content creator like the VoidStarLabs guy but in your style
I wonder why such a crystal-clear video is having such a low count of views.One of the best Arduino FSM videos I watched. Right now, I am working on an Arduino Kinetic art project and was framing my FSM with stepper motor + led-fading + tilt-switch sensing (of course with debouncing) states and found this tutorial to be extremely useful as a quick-recapitulation (perhaps video is so clear that nobody revisits :-)). Thanks a tonne !!
Awesome! Thanks for letting me know you like it. This video definitely appeals to a very niche set of nerds. But I'm happy that the people who do watch it tend to like it a lot!
Hands down one of the best, or at least most engaging videos on programming that I've ever seen. Well done and hats off to you for making such a dull subject an entertaining treat. Great content, will be sure to check out more of it!
Juicyblunts thanks! I probably wont make something this involved for a long time haha. Too much work. Expect more sewing and simpler projects in the near future
14:38, I've never seen anyone put a composite of two video feeds like this... dude... thank you for this. This sparks inspiration beyond the source material just in the effort and the ideas in the video itself. Thanks again. Super cool way to show code.
Thanks Jimmy! I was really proud of that. I knew I would have lots of coding in this video so I wanted to find a way to make it less boring. What I did was filmed my face and recorded my screen at the same time. In final cut I put the screen recording footage on top of my camera footage and used a chroma key to make the background of my text editor transparent so only the text shows up. Also I used a dark theme on the computer and set up the lighting in my garage to provide a dark background for the text.
I'm going through the beginning of the video, really interesting, enjoyable and one important thing is the passion of a programming hobby mixed with another hobby ! Also the video editing and the natural location effects are remarkable.
Thanks! I'm glad you enjoyed it. I knew I wanted an example activity to describe how a complex behavior can be broken down into states, and archery came to mind.
Benjamin Younes haha thanks. You can kind of see how I got better at making video as this video goes on. Will do! For a while the vids will be much simpler. This one consumed all my free time for 4 months.
This is an excellent tutorial. I started out totally clueless, but after watching this 30 minute video, I coded my very first state machine! I wish there was a lot more content on this channel, as it's presented so wonderfully that even a lunkhead like me can learn easily. - Trevor
Thanks for the nice comment! Yup I know I have nothing to be nervous about, and I enjoy teaching a lot. Always working on improving my delivery. It's just much harder to teach when you're talking to camera instead of, say, helping your friend with homework. The camera doesn't give you the feedback loop that you get when your friend asks questions and keeps the flow going.
This video was an excellent resource getting back into the mentality of state machine coding, and got me back on my feet from years and years of just not needing it. I also love the charm in the way it was all presented, and the ease of explanation made it all a breeze. I was able to create a complex state machine, while simply taking the concept from the video, allowing the code to grow to use organically. Well done, my dude. Well done. Hopefully you intend to do much more content like this! I will definitely be linking this video in one of my own on the way, with an automated climate control system vivarium build! I hope you don't mind!
This was an excellent breakdown of the workflow and specifics required to get a state machine working. I've watched a lot of tutorials on this in the past but they always miss something in describing how to think about problems and turn them into FSMs. It finally clicked for me with this video. Thanks man. Liked and sub'd.
Great video! You made sure that programmers at any level would be able to understand the topics discussed. Two tips for others interested in creating State Machines: - Use Enum instead of numbers to define the states. (This is the most usual method, though it made sense to use numbers in the video to make it clearer) - LucidChart is a marvelous software for creating flowcharts and diagrams!
Arsenio Dev thanks! I was really excited when I got that code overlay effect working. I had to block all my windows to make the background in my garage dark.
This video is a gem!!! I am keeping it saved and downloading it for future revisions. I don't know how did I end up here, I work on 32-bit ARM cortex-m microcontrollers; for the very first time I am happy with youtube's recommendation. uint8_t Make_more_of_these_videos=1; char * state; If ( Normal Universe && Make_more_of_these_videos ) printf("%s", state = "Happy"); else printf("Do make me Happy!! "); //either way please continue your videos coding like this
Hey thanks for the super nice comment! I was burned out on programming for a while after making this vid but back into it now. I'm trying to program an embedded synthesizer. I'll probably run it on Raspberry Pi. Stay tuned for more!
@@TheNormalUniverseI want to acknowledge that there is much more to your video than an explanation of the CASE statement. You begin by explaining the State Machine concept, then you show how to use Top Down design to create a State Machine diagram and implement it in code with the CASE statement. You made a complete and well organized presentation, which covers much more than the CASE statement. I only focused on your explanation of CASE in my first comment, because I didn't understand the CASE statement until I watched your video. The first time I read about CASE was on the Arduino website. That was many years ago, when the Arduino first went on sale. The only information they had on the Arduino website at that time about the CASE statement was a condensed one-line explanation. I didn't have a programming background and I never took a programming course. I didn't even know anyone who wrote code, so with nothing to go on but that little one-line explanation on the website, I was not able to get the CASE statement to work in my programs. As a result, I gave up on CASE and I've been trying to write Arduino code all these years with IF / ELSE and WHILE statements, without realizing that it would have been much easier to implement some of my code with the CASE statement. While watching the explanation of CASE in your video, I realized for the first time, that I failed to noticed the importance of BREAK in that original one sentence explanation of CASE on the old Arduino web site. It seems to me, that CASE is almost useless without understanding how to use BREAK. There was no intention on my part to minimize the first twenty minutes of your video, it was just that your explanation of CASE, which explained the use of BREAK, was a revelation to me that will change the way I write Arduino code going forward. At times, when writing code, it's the simplest little details that can stump us. For those people who already understood the CASE statement, the important part of your video was learning how to write a program by first organizing one's thoughts, then applying Top Down design philosophy to create a state machine, with the last step being to write the actual code. Your lesson is an important one, because many of us just start coding and try to build a program from the bottom up. That method works for small programs, but it fails miserably when the program begins to get complicated. I know I speak for many people when I say THANK YOU for all the time, thought, and effort you put into making this excellent video.
I'm very familiar with state machines, but not as much in the arduino/C++ ecosystem. This was awesome. It answers a few lingering questions I had. Thanks!
Thanks A LOT. Awesome video once again and I can't believe I just saw the whole video without a skip and woah. I didn't realize it's 30 mins already until you said it. Thumbs up once again.
Hell yeah! Thanks for letting me know. Feel free to tag me on Instagram or something if you make a project with a state machine, I’d love to see (I’m @lesguichets)
Dude! Seriously your REALLY GOOD at making videos! I've been watching A LOT of UA-cam videos regarding arduino and electronics and programming. You are definitely very good at making me engaged in what you're trying to explain and making it funny - which is always good to help keep it light, and still have my attention. Looking forward to finding more videos from you!
Thanks Charlton! I'm still amazed that people found my 30 minutes of rambling useful. Thanks for letting me know! I'm learning how to code synthesizers now I'll probably make videos on that in the future
Fantastic video!!! I’ve watched it several times, and find it is jam packed with information. You made State Machine seem achievable for mere mortals. You obviously put a ton of work into making this video. I really hope you enjoyed making the video, because it is really good. Subscribed and looking forward to your next installment. If you decide do a Patreon and more Arduino content, I’m in!
D Mc awesome! Thanks for letting me know you like it! I think this video took over 100 hours so I’m happy that people are finding it and watching it. This is definitely the peak of my arduino knowledge so if I make another arduino video in the future it will be dialed back haha
9:06 when a coder edits a video. 🤠 I should add that this is excellent content. There is a lot of good stuff on UA-cam for learning the how, but once you have the syntax down learning the why seems hard to find. This really hits the spot. I see you've not posted for a while, I hope you are well and wish you the best.
Great vedio bro. I'm surprised watching how much effort you put in to make this one of a kind vedio in UA-cam. Even after 3 year this stands relevent entertaining and very informative.
Thanks Joyal! I'm working on making my own synthesizer now and I'm actually feeling pretty strong at coding despite being self taught, thanks to the things I learned in this vid. I thought I wouldn't have any more coding videos to do after this one but now I'm getting some ideas. Happy hacking!
Very good! Never heard of that before and after this video I spent 2 days studying the concept. It makes things a whole lot easier. Thank you very much! Greetings from Brazil!
I agree with everyone here! This video was really well thought out. The dialog was concise and spot on. I really hope you keep up with the arduino coding projects and teach us about them. I have worked with case switches but never have thought about it in this way. I learned more than just the state machine stuff. Keep it up! I have sub'ed now!
Thanks for letting me know John! I thought I wasn't going to make a coding video again after this but recently I'm getting really jazzed about making a Synth on Teensy. Just getting started but I'm sure I'll have lots of topics to make videos about in the future. If you haven't heard of Teensy look for Voistar Labs' video on it.
Awesome! I'm working with some friends to create a system that turns on a LED strip based on an IR proximity sensor input. We are having issues with denounce and I was suggesting we look into state machines based on some research but didn't have enough knowledge to explain. Couldn't have found a more helpful video.
Great video! It describes very well how state machines can be designed and implemented on Arduino with 2 practical examples. I will refer back everytime I need a refresher...
Zhihao Zhang thanks a lot! I’m glad it helped. I probably won’t make an Arduino video for a while, sorry. This one took almost a year to do in between my real job. It’s definitely the video I’m most proud of though.
Hello Chris, Just few words to say you made my day (French's way to speak) ! Thanks for sharing great content ! you win my subscride ans consideration...
Merci beaucoup Guillaume! J'ai etudie le francais pour 5 ans, mais j'en ai oublie un peu. Je pense que cette video est mon meilleur. J'aime savoir quand mon video est utilize.
@@TheNormalUniverse 🙂 Crhis, your french is better than my frenglish don't worry ! You make me see an other way to code with yours videos and I'm thankful, you've really open my mind 😃 Have you some project arduino and video to come ? Amitiés.
great video, very understandable. I've see state machines examples in the past but never completely understood them. This explanation is very clear and now i know how and why to use them. have a grandson that I'm trying to get involved with Arduinos (Programming) and this will be a very good place for him to start understanding State Machines. Pleas, keep up the good videos.
Wow - that is really neat. Thinking back in it, MS_Basic comes to mind, with the evil GOTO statement. While that could (and often would) degenerate to a pile of spaghetti, it did provide a way to implement a state machine. Seeing this, I think that is what some programs I recall seeing and wondering about at the time were doing, in a loose way. Thanks!
Excellent job! This is exactly what I have been looking for. I have 17 multitasking Arduino game ideas (written descriptions in a notebook) and I have been searching for someone who uses some method of flow charting first, and coding second, to tackle complex scenarios. I believe I have found that after watching your Arduino Nerf Target Alarm Clock and this tutorial. Thank you so much. Also, if you are interested in being commissioned for Arduino coding, please contact me.
Great video! Great editing! Great subject! Great teaching! My two cents: when I debounce a switch, I enter the trigger state AS SOON as I detect a change. My way of debouncing is just by ignoring the switch for the remaining set debounce time after the trigger. Also, I check for the switch to be released to go back to reset. Your method waits for the electromechanical noise to end, then the set debounce time to elapse, then for the switch to be released. Mine is is as fast as can be and then waits for debounce time and button to be released before reseting and searching for a falling edge again.
Awesome! You really have a gift for explaining this stuff. I am new to programming, but I have been on this planet for quite a while. My current project is a Softball scoreboard using Arduino & an RF remote. Now I can use a state machine. Also, don't let the haters suppress your sense of humor! Life is too short not laugh. Where can I get the plans for the Nerf Alarm Clock. Love it!
Thanks for the nice comment! This video is definitely for a select group of nerds so I'm happy people are watching it. No worries I believe in being myself at full speed. I think I've only had 1 or 2 negative comments on this video so it's not a big trend. Sorry I didn't create plans for the clock and don't plan to dive back into that project.
How could I miss this one? Awesome work! Great subject and all the other things the other guys down here already told you :) I'm impressed! Keep it up!
yay I'm glad you liked it! This vid is definitely my mastahpiece so far. Sorry it was so long. I should have found a way to handle state machines and switch bouncing in separate videos.
Kudos to your passion in teaching .... liked the way you taught than what you taught. [ I would prefer to fix that bouncing issue rather in hardware using debounce circuit (schmitt trigger and RC filters)]
Thanks for letting me know! Haha sorry I might not make an arduino vid for a bit. This is totally the peak of my arduino knowledge. Maybe if I do an arduino project I’ll show you my state machine and point back to this video.
Cool video this convinced me to try and mix up different statemachines like you: 1 for the button one for the LED. However I come from an era where memory was an issue. This is also the case for an Arduino. Try using #define for the naming of your cases and pinNumbers. Also for example you don't need an unsigned long for the interval of 5 millis.
Vasilis Karastergios good to hear! I hope my perspective is unique/useful. It’s quite tricky to teach without someone asking you questions in real time.
Hi there && thanks for replying, I will give you a topic for a future video! How to use an external or the internal eeprom to store values. Greetings from Greece.
I think normally intermediate programmers can't do programming in organized manner as it is supposed be cuz they can't figure out how to make a state machine and what parts of problems corresponds to what states. I think once their vision is clear towards problem they can make this machine and it will be a lot helpful in programming
the Serial.begin(###); sets the baud rate for the bus. 9600 would be 9.6kbps, 115200 is 115.2kbps, etc. There are reasons for selecting different (optimal) baud rates based on the processing speed to reduce messaging errors.
Thank you for the video! You could do more like this one. How do you code without a white or black background of an IDE? What is the tool you use to code? A low background music would not be a bad idea, ok, there was a stubborn noise as you talked.
Thanks for the nice comment! -For the black background, I googled "Arduino IDE dark theme" -I used the Arduino IDE in this video -Sorry about the stubborn noise. I was screen recording on my iMac to capture the code, which cased the iMac to run its fans.
Great video, I've currently completed one project with millis() and the second is under construction. Both work but the code is kinda a mess, not to mention that I was coding without a diagram/flowchart which was a headache. I feel like I have to implement this method to get more reliable on my projects.
@@TheNormalUniverse The explanation was so subtle and detailed i loved it. Even for 1 sec i didn't required to rewind to understand the concept. Thanks alot for this amazing video.
Good to hear. My main concern was people getting lost in such a long vid. Luckily this video has sustained life! I'm glad because it took a lot of effort. Most videos only get views for the first week or so. A select club of nerds continue to find this video from youtube search :)
I did, but luckily people have continued to watch this vid ever since I uploaded it. It gets about 750 views per month from search traffic. Thanks for the nice comment!
Just subscribed to you in hope that there will be new videos soon ^^ Your Video Style is really awesome!! Super clean explanation of how it works and nice editing. I really liked the ways you overlayed to code to the facecam, never seen someone doing coding tutorials in such a clean way !
My friend! Thank you for the nice comment and appreciating the details of my hard work. More videos to come, just trying to find something interesting to make videos on. I'll probably do something on camping for the summer.
28:03 - oooh, that's a cute little construction! Nice idea! I may have to imitate that. :) Nice video overall, too. Now, if only we could represent the state machine in a way that built both the code and the diagram.... ;)
I am only just getting started with Arduino, but trying to make a project that operates a different "switch" each time there is an input. I have it working for one input one output, but it now seems a State Machine is a good solution to get it to "trigger" a different function each time it detects an input.
That's a great tutorial. Please make more videos on Arduino programming. One problem though, I still get multiple triggers even after adding the hold state to state machine. What could be the problem ?
Glad you liked it! Hard to say what the root cause of your bug is. As I suggest in the video start by printing out how your state machine is flowing through the states.
This Help ME SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo Much merci beaucoup
I never comment on videos, I feel as though it just becomes noise in the midst of the rest of the comments. I truly hope you see this because I want you to know that this is truly one of the best maker videos on UA-cam, and I do not say that lightly. I consume a mass amount of various maker videos to learn, make my projects better, and to come up with great new ideas. Your video was excellent for several reasons; first, you were extremely informative and detailed in your code and explanation of the code. So many just throw out what they have copied and pasted from some other source online. Without a doubt, I'm certain that you are experienced and advanced enough that you can write all of this from scratch. Secondly, you showed what can go wrong and how to debug and find solutions to solve the problem. This is the essence of all programming is debugging and solving problems. It is so refreshing to know that I am not alone in banging my head on the keyboard when my sketches won't compile or run in the manner they were intended or expected. It reminds me that to succeed, you must press through and persevere. Thirdly, your videography was the best of any maker video I have seen yet, bar none! And as I have said, I have sometimes wondered if I have reached the end of UA-cam. I know how much time, effort and painstaking editing that it took to create content of this caliber. It has a greater purpose that I initially didn't realize other than just making impressive shot sequences and Premier tricks such as your coding text being typed out on the screen. Let's face it, even for the enthusiast, the nuts and bolts of coding can bring on the glazing over of the eyes and the absent wandering of the mind, even when we want to pay attention. The creativity of your video kept me engaged and hyper-interested and held off the monotony of codeing. Your lighting was excellent, your audio was excellent, and your editing was superb. I haven't even watched any of your other videos before I wanted to comment and encourage you that your hard work and effort is greatly appreciated, at least by me. I know that UA-cam creaters are swimming in a see that is so crowded, the sharks have given up. Keep swimming, you my friend, will stand out when the rest have sunk to the bottom!
Dan Peters thank you for typing this! Definitely not lost in the sea of comments. This comment helped me get out of bed the other day.
I’m glad you picked up on my emphasis on debugging. One of the best parts of this coding method is how it helps with debugging, so I wanted to “show” it instead of say it. I also like that you noticed my audio. I think audio is more important than video so I definitely put some effort into it.
Haha ya, this video took me almost a year to make. LUCKILY people search for it. It’s not as popular as my video on mechanical drawing, but I’m glad there is a small audience that really like it some people let me know. It’s definitely my baby and the peak of my video making.
In the future I’m going to dial it way back and make simpler videos. This video took me about a year to make in between my day job. I definitely bit off more than I could chew :).
Thanks again. Happy hacking!
Agreed. You killed me with the Nerf gun alarm clock! We are proud nerds 💯
Seriously! Your meticulous attention to detail - even using stop motion animation! - to relay your thought and add visuals while you speak helps the audience fully understand what you're saying.
Thank you! Don't change anything about how you do your videos. They're great. Congratulations on your approach.
Thank you for the nice note Vard! I can't believe it's been 11 months since my last vid. I need to get back on the saddle.
Honestly, you've helped me so much. I've adopted your approach and have been able to untangle my code, and also do far more complicated tasks simultaneously without the dreaded delay! Makes coding far more enjoyable. Thanks heaps.
Well done. The information was presented on a logarithmic fashion with a slow start and a steeply rising level of complexity. The last part with the most information happened really quick. Fortunately, there is a rewind available on UA-cam. I used it a LOT!
Thanks for all your efforts.😊
Man every arduino learner should watch this video. Not just because State machine is the jump from beginner to advance level, but the video itself is clear, thorough, and fun to watch. Hope to see more of your works!
Thanks for the nice comment! This video really is my best work haha, but it took a year in between work and life.
Nicely done...I used to build interrupt driven state machines with error handling in LabVIEW. That was many years ago. Now, I have found microcontrollers again and really enjoyed your very good description of how to build state machines...my new model...thanks very much...!
Thanks for letting me know!
I don't like complicated codes, but the way how you put this complicated code together makes it easy to grasp. thank you for sharing knowledge, I liked and subscribed
Naboulsi Khalid thanks Naboulsi! I’m always quite jazzed that people are enjoying this video ^_^
Well done! My first attempt at employing a state machine was 40years ago and was for a multiple-input/output alarm card to be used in telephone exchange equipment - well before Arduino. The State Machine concept greatly simplifies the hardware pre-MCU days and your examples show how well it can be employed in software. I particularly liked how you overlayed the code. That alone is something that could be made great use of by other channels.
Glad you liked it! Ya I was really proud of how I did that code segment. New video coming out in two weeks or so!
Just learning state machines and this is a very simple and understandable code. Like how you walked through Code evaluation and changes.
Thanks for letting me know Steve! Glad you liked it
The 115200 is a remanence from the pre-USB era, where our computers had serial ports with DB9 and DB25 plugs. The max speed for a standard RS-232 serial connection back then was 115200 Bps.
When initializing a connection to an attached serial device, say like a telephone modem, the device would usually expect a speed of 9600 Bps until it would receive commands to change the speed. Older devices would expect lower speeds and some, like what we called “dim console terminals” often expected 38400 Bps. But for the longest period, the default initialization speed was 9600 Bps. I’m going to spare you for the whole Baud vs. Bps explanation since it is not really that important anymore and one of those things, I would hope to forget one day.
Most Arduinos have a small secondary microcontroller on board for controlling communications through the USB port. This UART controller simulates one of these “good” old-fashioned RS-232 com-ports by default. This is why your Arduino shows up as a COM device when you hook it up to your computer. But this small controller can be reprogrammed to simulate RS-422 or RS-485 as well or even pretend to be a keyboard, a mouse or various other devices like joysticks, gamepads, PlayStation or Xbox controllers, etc. etc... basically any kind of device you can imagine to hook up via USB.
So, with the “Serial.Begin(115200)” instruction you are pretty much just telling the Arduino to establish a serial connection to your computer through the simulated COM port at the speed of 115200 Bps.
The Serial.print(“Some Text”) could be interpreted as SendString instead and Serial.println as SendString(“Some Text”) followed by a CR and a LF (next line).
CR = Carriage Return = ASCII value 13 / 0x0D
LF = Line Feed = ASCII value 10 / 0x0A
I really enjoyed your video by the way 🙂
Awesome, Thanks for all the background info! I pinned this comment to the top. Im honored that someone as knowledgeable as you would enjoy my vid!!
@@TheNormalUniverse I am still in the learning phase when it comes to Arduinos and micro-controllers. But with 35-36 years of computer-baggage, it is quite easy for me to connect the dots. It almost happens automatically without me actually noticing that I am doing it.
Maybe you will find this interesting (it is not something I have made):
github.com/AlanChatham/UnoJoy
I also have never really comment on videos and I just want to say that I've been studying C and C++ for the last month and your video actually finally allowed me to feel confident on how to organize my code. Please keep making more awesome videos!
Awesome! Thanks for letting me know. I should say that I'm somewhat self taught on coding, so I don't know if these ideas are considered "correct" by the experts. But I asked a few friends who are real programmers and they said "ya this looks fine." I think there are a lot of different ways to set up a state machine and everyone does something different.
Good stuff this video has aged so well it's still incredibly relevant even though Tech and coding environments keep changing You speak great truth and do it very well thank you
Glad you enjoyed it! Thanks for letting me know
Well it is now 5 years later and the start of winter, it snowed 3 days ago. I like what you did, I have 5 contacts, one is a push button. The 2nd and 3rd are a rocker switch, if switch left move stepper left, if right move stepper right. Left or right will go until it sees a stop switch the last 2 of the 5 will put it into standby mode, wait for left or right, the push button will bypass a pot that sets the speed, to full speed to the end stop. I plan on using a modified version of what you wrote here! FYI, I did not know a comment helps in your content until today!
Lee
I’m glad the video helped you! Thanks for letting me know
Beautifully done (Yes, I find beauty in coding, state machines and Arduino boards) Very, very useful tutorial. I'll recommend to everyone I know.
Yo dude you just simplified months of thinking into a 30 minute video. PLEASE MAKE MORE TUTORIALS ON THIS and working with more complext Arduino code, especially using other languages on arduino PLEASE PLEASE PLEASE. Thank you so much
This is the definitive best maker video on this channel. It's simple, fun, not cringey, well recorded and gets to it's point plus it uses timestamps for easy reviewing. BEST MAKER VIDEO EVER
Thanks for the super nice comment Nen! This video was definitely my peak and I'm glad people are getting use out of it because it took a long time to make. That was kind of the apex of my coding knowledge (self taught) so I won't be able to make another video soon because I have more learning to do.
One topic I want to cover is how to use object oriented programming on Arduino. It's a good way to make your code and portable as the projects start to get more and more complex. Synergizes well with the state machine stuff covered in this video.
@@TheNormalUniverse I would love to see that video so much. This is legitimately amazing and I'm here for more of your stuff. I love seeing approaches to learning from people who are still learning and can admit that. Continue to make content man, I'd love to see you being a huge maker content creator like the VoidStarLabs guy but in your style
@@nen848 voidstarlabs is amazing! thanks again
Wow, as a self taught hobbyist, this has been the best and coolest thing that I've come across for organizing and building code. I love it. Subbed.
Jeff hell yeah! I’m also self taught, so maybe that’s why we jive.
I wonder why such a crystal-clear video is having such a low count of views.One of the best Arduino FSM videos I watched.
Right now, I am working on an Arduino Kinetic art project and was framing my FSM with stepper motor + led-fading + tilt-switch sensing (of course with debouncing) states and found this tutorial to be extremely useful as a quick-recapitulation (perhaps video is so clear that nobody revisits :-)).
Thanks a tonne !!
Awesome! Thanks for letting me know you like it. This video definitely appeals to a very niche set of nerds. But I'm happy that the people who do watch it tend to like it a lot!
Hands down one of the best, or at least most engaging videos on programming that I've ever seen. Well done and hats off to you for making such a dull subject an entertaining treat. Great content, will be sure to check out more of it!
Juicyblunts thanks! I probably wont make something this involved for a long time haha. Too much work. Expect more sewing and simpler projects in the near future
14:38, I've never seen anyone put a composite of two video feeds like this... dude... thank you for this. This sparks inspiration beyond the source material just in the effort and the ideas in the video itself.
Thanks again. Super cool way to show code.
Thanks Jimmy! I was really proud of that. I knew I would have lots of coding in this video so I wanted to find a way to make it less boring. What I did was filmed my face and recorded my screen at the same time. In final cut I put the screen recording footage on top of my camera footage and used a chroma key to make the background of my text editor transparent so only the text shows up. Also I used a dark theme on the computer and set up the lighting in my garage to provide a dark background for the text.
the view of you writing code while also showing your face is really good.
Thanks! I was really proud of that effect to make the code section less bland
I'm going through the beginning of the video, really interesting, enjoyable and one important thing is the passion of a programming hobby mixed with another hobby ! Also the video editing and the natural location effects are remarkable.
Thanks! I'm glad you enjoyed it. I knew I wanted an example activity to describe how a complex behavior can be broken down into states, and archery came to mind.
Dude! Excellent video!
Easy to follow with top tier production value.
Keep em coming! Subscribed and liked!
Benjamin Younes haha thanks. You can kind of see how I got better at making video as this video goes on.
Will do! For a while the vids will be much simpler. This one consumed all my free time for 4 months.
This is an excellent tutorial. I started out totally clueless, but after watching this 30 minute video, I coded my very first state machine! I wish there was a lot more content on this channel, as it's presented so wonderfully that even a lunkhead like me can learn easily. - Trevor
Ostrich Longneck hells to the yes! This makes me a happy panda. I’m almost ready with my first sewing video, just took half a year o_o
Let go man just be yourself, you're giving off nervous energy. Fantastic video and very well explained.
Thanks for the nice comment! Yup I know I have nothing to be nervous about, and I enjoy teaching a lot. Always working on improving my delivery. It's just much harder to teach when you're talking to camera instead of, say, helping your friend with homework. The camera doesn't give you the feedback loop that you get when your friend asks questions and keeps the flow going.
This video was an excellent resource getting back into the mentality of state machine coding, and got me back on my feet from years and years of just not needing it. I also love the charm in the way it was all presented, and the ease of explanation made it all a breeze. I was able to create a complex state machine, while simply taking the concept from the video, allowing the code to grow to use organically. Well done, my dude. Well done. Hopefully you intend to do much more content like this! I will definitely be linking this video in one of my own on the way, with an automated climate control system vivarium build! I hope you don't mind!
This was an excellent breakdown of the workflow and specifics required to get a state machine working. I've watched a lot of tutorials on this in the past but they always miss something in describing how to think about problems and turn them into FSMs. It finally clicked for me with this video. Thanks man. Liked and sub'd.
Thanks for sticking through such a long video and letting me know Evan! Glad it was helpful for you.
Great video! You made sure that programmers at any level would be able to understand the topics discussed.
Two tips for others interested in creating State Machines:
- Use Enum instead of numbers to define the states. (This is the most usual method, though it made sense to use numbers in the video to make it clearer)
- LucidChart is a marvelous software for creating flowcharts and diagrams!
Thanks Gabriel! I agree about the Enum thing. I'm self taught so I goofed on that. I'll have to check out lucid chart.
Most helpful (and entertaining) Arduino tutorial EVER!!!
Thanks for letting me know! This video is my magnum opus
This is a fantastic video, especially liked the code overlay on the video while you explained it. Subbed for more
Arsenio Dev thanks! I was really excited when I got that code overlay effect working. I had to block all my windows to make the background in my garage dark.
the best effects usually take a lot of time but pay off in spades
This video is a gem!!!
I am keeping it saved and downloading it for future revisions. I don't know how did I end up here, I work on 32-bit ARM cortex-m microcontrollers; for the very first time I am happy with youtube's recommendation.
uint8_t Make_more_of_these_videos=1;
char * state;
If ( Normal Universe && Make_more_of_these_videos )
printf("%s", state = "Happy");
else
printf("Do make me Happy!! ");
//either way please continue your videos coding like this
Hey thanks for the super nice comment! I was burned out on programming for a while after making this vid but back into it now. I'm trying to program an embedded synthesizer. I'll probably run it on Raspberry Pi. Stay tuned for more!
i always used to write delay() but after watching this video i can already see possibilities of multitasking
awesome! you're on the right track
I learned so much from this, I never understood how to use CASE until I watched this video. Thanks!
yeah boye that's like 20 minutes into the video. Thanks for watching!
@@TheNormalUniverseI want to acknowledge that there is much more to your video than an explanation of the CASE statement. You begin by explaining the State Machine concept, then you show how to use Top Down design to create a State Machine diagram and implement it in code with the CASE statement. You made a complete and well organized presentation, which covers much more than the CASE statement. I only focused on your explanation of CASE in my first comment, because I didn't understand the CASE statement until I watched your video. The first time I read about CASE was on the Arduino website. That was many years ago, when the Arduino first went on sale. The only information they had on the Arduino website at that time about the CASE statement was a condensed one-line explanation. I didn't have a programming background and I never took a programming course. I didn't even know anyone who wrote code, so with nothing to go on but that little one-line explanation on the website, I was not able to get the CASE statement to work in my programs. As a result, I gave up on CASE and I've been trying to write Arduino code all these years with IF / ELSE and WHILE statements, without realizing that it would have been much easier to implement some of my code with the CASE statement. While watching the explanation of CASE in your video, I realized for the first time, that I failed to noticed the importance of BREAK in that original one sentence explanation of CASE on the old Arduino web site. It seems to me, that CASE is almost useless without understanding how to use BREAK. There was no intention on my part to minimize the first twenty minutes of your video, it was just that your explanation of CASE, which explained the use of BREAK, was a revelation to me that will change the way I write Arduino code going forward. At times, when writing code, it's the simplest little details that can stump us. For those people who already understood the CASE statement, the important part of your video was learning how to write a program by first organizing one's thoughts, then applying Top Down design philosophy to create a state machine, with the last step being to write the actual code. Your lesson is an important one, because many of us just start coding and try to build a program from the bottom up. That method works for small programs, but it fails miserably when the program begins to get complicated. I know I speak for many people when I say THANK YOU for all the time, thought, and effort you put into making this excellent video.
I'm very familiar with state machines, but not as much in the arduino/C++ ecosystem. This was awesome. It answers a few lingering questions I had. Thanks!
Great! Thanks for letting me know
Thanks A LOT. Awesome video once again and I can't believe I just saw the whole video without a skip and woah. I didn't realize it's 30 mins already until you said it. Thumbs up once again.
Hell yeah! Thanks for letting me know. Feel free to tag me on Instagram or something if you make a project with a state machine, I’d love to see (I’m @lesguichets)
Dude! Seriously your REALLY GOOD at making videos! I've been watching A LOT of UA-cam videos regarding arduino and electronics and programming. You are definitely very good at making me engaged in what you're trying to explain and making it funny - which is always good to help keep it light, and still have my attention.
Looking forward to finding more videos from you!
Thanks for letting me know! Glad the video was helpful for you
This is probably the 2nd video I hav commented on. Thanks for the great tutorial
Thanks Charlton! I'm still amazed that people found my 30 minutes of rambling useful. Thanks for letting me know! I'm learning how to code synthesizers now I'll probably make videos on that in the future
Fantastic video!!! I’ve watched it several times, and find it is jam packed with information.
You made State Machine seem achievable for mere mortals. You obviously put a ton of work into making this video. I really hope you enjoyed making the video, because it is really good.
Subscribed and looking forward to your next installment.
If you decide do a Patreon and more Arduino content, I’m in!
D Mc awesome! Thanks for letting me know you like it! I think this video took over 100 hours so I’m happy that people are finding it and watching it. This is definitely the peak of my arduino knowledge so if I make another arduino video in the future it will be dialed back haha
Very interesting video, telling the viewer you are a very kind person, willing to share what you've learned by doing! Thank you for sharing.
Thanks Fabrizio! Glad you liked it.
9:06 when a coder edits a video. 🤠
I should add that this is excellent content. There is a lot of good stuff on UA-cam for learning the how, but once you have the syntax down learning the why seems hard to find. This really hits the spot. I see you've not posted for a while, I hope you are well and wish you the best.
thanks for the nice comment! This vid is my magnum opus. I've been focusing more on work lately, I might start making videos again in the future
This is a very well put together video! Keep them coming!
A Baby Eskimo thanks for the motivation!
Great vedio bro. I'm surprised watching how much effort you put in to make this one of a kind vedio in UA-cam.
Even after 3 year this stands relevent entertaining and very informative.
Thanks Joyal! I'm working on making my own synthesizer now and I'm actually feeling pretty strong at coding despite being self taught, thanks to the things I learned in this vid. I thought I wouldn't have any more coding videos to do after this one but now I'm getting some ideas. Happy hacking!
@@TheNormalUniverse pretty excited to see that.. all the best
Very good! Never heard of that before and after this video I spent 2 days studying the concept. It makes things a whole lot easier. Thank you very much! Greetings from Brazil!
Awesome! I have a big smile on my face. May your arduino projects be successful. Tchau!
I agree with everyone here! This video was really well thought out. The dialog was concise and spot on. I really hope you keep up with the arduino coding projects and teach us about them. I have worked with case switches but never have thought about it in this way. I learned more than just the state machine stuff. Keep it up! I have sub'ed now!
Thanks for letting me know John! I thought I wasn't going to make a coding video again after this but recently I'm getting really jazzed about making a Synth on Teensy. Just getting started but I'm sure I'll have lots of topics to make videos about in the future. If you haven't heard of Teensy look for Voistar Labs' video on it.
This is soooooooooo high quality, I can't believe I found this amongst very unwatchable videos
great! now I just need to pick up the pacing haha. I have trouble getting the words out
thats a well done piece of work there, amazing
thanks JP!
Awesome! I'm working with some friends to create a system that turns on a LED strip based on an IR proximity sensor input. We are having issues with denounce and I was suggesting we look into state machines based on some research but didn't have enough knowledge to explain. Couldn't have found a more helpful video.
Max Holland yaas. It was tricky to find an example problem that hit the topics I wanted to hit in the correct order. Glad you liked the video.
Great video! It describes very well how state machines can be designed and implemented on Arduino with 2 practical examples. I will refer back everytime I need a refresher...
Thanks! I'm always glad to know this helps people. This video is like my baby. It doesn't appeal to a very large audience but I'm super proud of it.
I loved the video's style and content. Thank you very much!
Thanks for letting me know! I'm most proud of this vid and my vid on mechanical drawing
This video is so amazing! I am doing Arduino Project now and it helps me a lot! Please, please update more videos!
Zhihao Zhang thanks a lot! I’m glad it helped. I probably won’t make an Arduino video for a while, sorry. This one took almost a year to do in between my real job. It’s definitely the video I’m most proud of though.
I took two pages of notes, thank you soooo much for your exceptional video!!!
Awesome! Thanks for sticking through such a long vid!
Underrated video, thanks man this helped me alot.
Thanks sonu! Glad it helped
Man you saved my project. Love ur videos
haha thanks! I'm happy that someone used my tips! how did you find the video?
bowhunters unlimited!!!! this is awesome! love the archery range.
Thanks! I just got into archery at the time and needed some random topic to talk about to use as an example
My lab mates and I had a good laugh about the coincidence of these two areas. Cheers!
Hello Chris,
Just few words to say you made my day (French's way to speak) !
Thanks for sharing great content ! you win my subscride ans consideration...
Merci beaucoup Guillaume! J'ai etudie le francais pour 5 ans, mais j'en ai oublie un peu. Je pense que cette video est mon meilleur. J'aime savoir quand mon video est utilize.
@@TheNormalUniverse 🙂
Crhis, your french is better than my frenglish don't worry !
You make me see an other way to code with yours videos and I'm thankful, you've really open my mind 😃
Have you some project arduino and video to come ?
Amitiés.
great video, very understandable. I've see state machines examples in the past but never completely understood them. This explanation is very clear and now i know how and why to use them. have a grandson that I'm trying to get involved with Arduinos (Programming) and this will be a very good place for him to start understanding State Machines.
Pleas, keep up the good videos.
+AdaBill thanks for the nice comment! We need to get the young ones hooked ASAP!
Wow - that is really neat. Thinking back in it, MS_Basic comes to mind, with the evil GOTO statement. While that could (and often would) degenerate to a pile of spaghetti, it did provide a way to implement a state machine. Seeing this, I think that is what some programs I recall seeing and wondering about at the time were doing, in a loose way. Thanks!
Excellent job! This is exactly what I have been looking for. I have 17 multitasking Arduino game ideas (written descriptions in a notebook) and I have been searching for someone who uses some method of flow charting first, and coding second, to tackle complex scenarios. I believe I have found that after watching your Arduino Nerf Target Alarm Clock and this tutorial. Thank you so much. Also, if you are interested in being commissioned for Arduino coding, please contact me.
Glad I could help! Thanks for letting me know. Sorry no commission work for me. I’d rather work on videos.
This is Absolutely Beautiful!
Thanks Atlas! It was definitely my peak. Most proud of the way I showed the code
Thanks, never saw a better Arduino tutorial :)
Pat Rick thanks Mr. Rick!
Great video! Great editing! Great subject! Great teaching! My two cents: when I debounce a switch, I enter the trigger state AS SOON as I detect a change. My way of debouncing is just by ignoring the switch for the remaining set debounce time after the trigger. Also, I check for the switch to be released to go back to reset. Your method waits for the electromechanical noise to end, then the set debounce time to elapse, then for the switch to be released. Mine is is as fast as can be and then waits for debounce time and button to be released before reseting and searching for a falling edge again.
with great power comes great responsibility
I'm a little embarassed I called my blinking lights "great power" *facepalm emoji*
Awesome! You really have a gift for explaining this stuff. I am new to programming, but I have been on this planet for quite a while. My current project is a Softball scoreboard using Arduino & an RF remote. Now I can use a state machine. Also, don't let the haters suppress your sense of humor! Life is too short not laugh. Where can I get the plans for the Nerf Alarm Clock. Love it!
Thanks for the nice comment! This video is definitely for a select group of nerds so I'm happy people are watching it. No worries I believe in being myself at full speed. I think I've only had 1 or 2 negative comments on this video so it's not a big trend. Sorry I didn't create plans for the clock and don't plan to dive back into that project.
Fantastic and entertaining video!
thanks Toshan!
I just want to say this video was tremendously helpful! I look forward to using it in an upcoming project. Keep up the great work>
thanks for letting me know Cody! editing a teardown video right now
How could I miss this one? Awesome work! Great subject and all the other things the other guys down here already told you :) I'm impressed! Keep it up!
yay I'm glad you liked it! This vid is definitely my mastahpiece so far. Sorry it was so long. I should have found a way to handle state machines and switch bouncing in separate videos.
Kudos to your passion in teaching .... liked the way you taught than what you taught. [ I would prefer to fix that bouncing issue rather in hardware using debounce circuit (schmitt trigger and RC filters)]
Nice video its best video for ardiuno learner's
The State machine to me a Novice hobbyist resembles elements of XOD. A very interesting concept I shall study.
I had problem to understand state machine in long time, how to do. But very clear now after see your clip.Thank you very much
ravin pijitham great! I’m glad it helped
very impressive presentation
thank you!
Super helpful! Please make more of these Arduino tutorials!
Thanks for letting me know! Haha sorry I might not make an arduino vid for a bit. This is totally the peak of my arduino knowledge. Maybe if I do an arduino project I’ll show you my state machine and point back to this video.
Cool video this convinced me to try and mix up different statemachines like you: 1 for the button one for the LED. However I come from an era where memory was an issue. This is also the case for an Arduino. Try using #define for the naming of your cases and pinNumbers. Also for example you don't need an unsigned long for the interval of 5 millis.
Silly me... then they can't be compared so sorry about the remark. Unsigned long is fine... The #defines however can make your program more readable.
Ya I think using #define is definitely the right way to go. Thanks for the nice feedback on my vid!
Awesome video! Enjoyed !
great! thanks for letting me know
@@TheNormalUniverse I love the approach and contents itself is wholesome. My greetings from far Ukraine!
You’re back!
Great video. I use state machines in my projects at work. The next step is state machines using function pointers.
haha this video is totally the peak of my understanding of coding. Will need to learn pointers some day
This is a greatly built video and really useful!!!! Thanks a lot!!! It can show that you have spent time doing this video!!!
My pleasure Nicolas! I’m glad this video is still getting views and a select group of nerds is enjoying it. How did you find the video?
@@TheNormalUniverse really useful!!, I'm just getting started with arduino and the state machine concept!
Subbed and liked, i really like the way you explain things! I hope you do continue making arduino tutorials! Thank you.
Vasilis Karastergios good to hear! I hope my perspective is unique/useful. It’s quite tricky to teach without someone asking you questions in real time.
Hi there && thanks for replying, I will give you a topic for a future video!
How to use an external or the internal eeprom to store values.
Greetings from Greece.
Fantastic video! Very well made and very well explained, really helped me a lot with my project :)
awesome! thanks for letting me know. This video is my baby
I think normally intermediate programmers can't do programming in organized manner as it is supposed be cuz they can't figure out how to make a state machine and what parts of problems corresponds to what states. I think once their vision is clear towards problem they can make this machine and it will be a lot helpful in programming
the Serial.begin(###); sets the baud rate for the bus. 9600 would be 9.6kbps, 115200 is 115.2kbps, etc. There are reasons for selecting different (optimal) baud rates based on the processing speed to reduce messaging errors.
Thank you for the video! You could do more like this one. How do you code without a white or black background of an IDE? What is the tool you use to code? A low background music would not be a bad idea, ok, there was a stubborn noise as you talked.
Thanks for the nice comment!
-For the black background, I googled "Arduino IDE dark theme"
-I used the Arduino IDE in this video
-Sorry about the stubborn noise. I was screen recording on my iMac to capture the code, which cased the iMac to run its fans.
This video should have at least 500k views after 4 years, not 50k :/
It’s ok, this vid is for a highly exclusive group of nerds. Thanks for letting me know you like it though!
great tutorial. all the best for you .
Thank you for letting me know Anwar! I'm going to start making coding videos again soon about synthesizers
Laser teacher is cool
Great video, I've currently completed one project with millis() and the second is under construction. Both work but the code is kinda a mess, not to mention that I was coding without a diagram/flowchart which was a headache. I feel like I have to implement this method to get more reliable on my projects.
Awesome! Glad you like it
great video, Very helpful!
thanks for letting me know!
Excellent video.
Zacson Skaria thanks Zacson! It’s definitely my MAHSTAPIECE!
i learned something new and i loved it
Thanks for letting me know Naveen!
@@TheNormalUniverse The explanation was so subtle and detailed i loved it.
Even for 1 sec i didn't required to rewind to understand the concept.
Thanks alot for this amazing video.
Good to hear. My main concern was people getting lost in such a long vid. Luckily this video has sustained life! I'm glad because it took a lot of effort. Most videos only get views for the first week or so. A select club of nerds continue to find this video from youtube search :)
@@TheNormalUniverse 😇😇😇please continue making these amazing videos.
Thank you . You Work hard for this video . Again Thanks .
I did, but luckily people have continued to watch this vid ever since I uploaded it. It gets about 750 views per month from search traffic. Thanks for the nice comment!
@@TheNormalUniverse i am waiting for to watch informative , nice, unique arduino videos
Brilliant video - many thanks!
Thanks for letting me know Mr. Observer!
Just subscribed to you in hope that there will be new videos soon ^^
Your Video Style is really awesome!! Super clean explanation of how it works and nice editing. I really liked the ways you overlayed to code to the facecam, never seen someone doing coding tutorials in such a clean way !
My friend! Thank you for the nice comment and appreciating the details of my hard work. More videos to come, just trying to find something interesting to make videos on. I'll probably do something on camping for the summer.
Thanks! I was super proud of that. I knew there would be a lot of coding in the video so I wanted a way to make it less dry.
28:03 - oooh, that's a cute little construction! Nice idea! I may have to imitate that. :)
Nice video overall, too. Now, if only we could represent the state machine in a way that built both the code and the diagram.... ;)
Thanks for the nice comment!
@@TheNormalUniverse gladly. :)
I am only just getting started with Arduino, but trying to make a project that operates a different "switch" each time there is an input. I have it working for one input one output, but it now seems a State Machine is a good solution to get it to "trigger" a different function each time it detects an input.
That's a great tutorial. Please make more videos on Arduino programming. One problem though, I still get multiple triggers even after adding the hold state to state machine. What could be the problem ?
Glad you liked it! Hard to say what the root cause of your bug is. As I suggest in the video start by printing out how your state machine is flowing through the states.
@@TheNormalUniverse Figured it out. My Serial.print was in the wrong state. Thanks for the replying :)
God damn it! What a excellent video!
awesome! thanks for letting me know ^^!
that was great, thank you
thanks for letting me know!
This Help ME SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
Much
merci beaucoup
De rien! This comment made my morning when I read it a few days ago.
Congratulations from india👏👏👏
Thanks Kalesh!
Congratulations from Brazil
awesome video - great examples :)
Mickey Mouse great to hear! I’m really glad people still watch this vid even though it’s 30 minutes. It’s my baby.
Great video
Thank you Zabir!