I've been working in Python a lot lately. One thing that I learned is to run through your algorithm as comments and then start coding. Makes things a lot easier. I listened to one lecture that said that comments aren't there to tell someone what the code is supposed to do, code is there to tell the computer what the comments are meant to do. Comments, comments, comments! Love Programming Electronics Academy!
@programmingelectronics2 жыл бұрын
Thanks for sharing Jim!
@Justaperson5640 Жыл бұрын
@@programmingelectronicshow do u know his name
@fernmiranda Жыл бұрын
They way you talk and teach meshes extremely well with my brain. Don’t know if that’s a compliment but thank you so much for putting these vids out. I jumped into all this electronics and coding stuff, feet first and it’s pretty crazy.
@bibel2k2 жыл бұрын
I teach in High Schools electronics and Robotics. Most of the senior year make projects with Arduino and by far your channel is one of my favorites. Besides that good explanation the visualization is astonishing. Thank you
@programmingelectronics2 жыл бұрын
Thanks so much for that Amos!!
@ChadKapper2 жыл бұрын
By far the best Arduino videos on all of the internet!!
@programmingelectronics2 жыл бұрын
Thanks Chad - LOL! Much appreciated!
@ianbertenshaw43502 жыл бұрын
Fantastic video ! I heard somewhere that Arduino IDE doesn’t care where the functions are located - a lot of people put them after the loop and if you do this on something like platform io you get error messages as it wants them up before the set up. It makes for neater code and you don’t have to keep going right to the bottom to check something in a function .
@programmingelectronics2 жыл бұрын
Thanks for sharing this Ian!
@Henry-sv3wv2 жыл бұрын
you have to forward declare a c/c++ function if not defined before use. because arduino is also for noobs the ide does some auto generation of prototypes mixing them above your code and sending that to the gcc compiler
@electronron12 жыл бұрын
I've had programs not work because the functions were after the Setup and Loop and work fine after moving them before the Setup and Loop functions.
@electronron12 жыл бұрын
I would add: On larger programs use Tabs for functions and group related functions into a single tab. Example: A tab for a read humidity sensors function and grouped with it could be CtoF and FtoC functions. I keep my tabs in the preferred order by prefixing each tab with a letter of the alphabet as in a_Humidity, b_Control, y_Setup, z_Loop. Setup and Loop are always y_ and z_ in my Sketches. The tab that I use to load libraries and define global variables is always the first tab I create, has no prefix and is the name of the sketch. This tab has always shown up as the first tab of my sketch despite not being prefixed. Oh and as was stated in the video, verify, verify, verify.
@MichaelJamesAdventure2 жыл бұрын
Thanks for sharing!
@robertrobert55832 жыл бұрын
Great tips from the best teacher. I did the PEA course a few years ago really recommend it.
@programmingelectronics2 жыл бұрын
Thanks Robert!
@tb303wpf1 Жыл бұрын
Another superb video with invaluable information! It's so rewarding to have code that you edited come to life in a project. I am a baby when it comes to C++. But watching your videos has allowed me to figure out alot of what I needed to know in order to get my project off the ground. Thank you again for helping me along my microcontroller journey! I'm so excited at how many amazing new doors have opened up for me by using microcontrollers. I'm going to be very busy! Lol
@programmingelectronics Жыл бұрын
Thanks so much for the kind note!
@mr.goldenrod2912 жыл бұрын
Tip #1 is called writing pseudocode. I’ve been using PuTTY to capture and save to a text file serial output from an Arduino connected to my PC when the Arduino IDE is not running. I’ve been able to find logic errors that “randomly” occur.
@robertrobert55832 жыл бұрын
My tip would be, "=" means "is". "==" means "is equal to". If my sketch compiles but doesn't work, I check for a rogue "=".
@MichaelJamesAdventure2 жыл бұрын
Nice! Thanks for sharing - that one definitely gets me from time to time!
@sorryboss8550 Жыл бұрын
I have programmed before so that’s not really a problem, the camel case gets to me though
@Volker-Dirr9 ай бұрын
True. I think your Tip 4 "Incremental Design" ist in fact more then you told. In my opinion it is also learn coding first and electronics second. So in my opinion learn like the first chapters of an c or c++ tutorial first (so about variables, loops, functions, ...) and then start learning how to connect sensors and buttons with the Arduino. You will be much quicker if you learn that separately. Sadly all Arduino tutorial always don't follow your Tip 4 and tries to teach coding and build the electronic at the same time; and I think that is a reason why so many guys fail with Arduino. They should teach coding first only. As a workaround I think it is useful to learn the first chapters of c or c++ tutorials, even it sounds stupid to learn an other language first, but is in fact the same.
@epartsacc2 жыл бұрын
Invaluable content. Thank you
@programmingelectronics2 жыл бұрын
Thanks so much for watching!
@tarsamsingh12992 жыл бұрын
Thanks for sharing your knowledge I thank you for all efforts
@programmingelectronics2 жыл бұрын
Thanks so much for watching!
@anders5783 Жыл бұрын
Great video. But the best way to verify code is to debug it. Is there any debugger in the IDE or?
@programmingelectronics Жыл бұрын
In Arduino IDE 2.0 there is a debugger, but it does not support all the boards.
@uploadideaswithitamar2 жыл бұрын
Great video. Thank you
@programmingelectronics2 жыл бұрын
Thanks for watching!
@GoGoGeorg.W Жыл бұрын
Write sketch/algorithm... first on paper is the most important thing in many areas, like programming(what I'm trying to learn), constructing something in CAD software and, making new videos... For me making code algorithms is easy but writing it to code is the hardest thing ever. Most of my projects aren't finished because I don't know anything about code writing. I'm not a programmer but I have written a code sketch for my friend and it worked. How?
@Hei65 Жыл бұрын
Great!
@programmingelectronics Жыл бұрын
Thanks!
@joshuapitong8992 жыл бұрын
Thank you so much.🙌❤
@programmingelectronics2 жыл бұрын
Great! I hope it helped!
@bobmirror7164 Жыл бұрын
So what is wrong with copy past code into notepad file. Then add a date and a description and the url. Then you can use crtl + F to search key words in the file.
@robertofkennedy Жыл бұрын
Can I use an ISR to exit a for Loop?
@programmingelectronics Жыл бұрын
Great question! An ISR can interrupt a for loop, but once the ISR returns (ie finishes), you'll be back in the for loop.
@robertofkennedy Жыл бұрын
@@programmingelectronics how do I exit out of a for Loop if needed. I'm new at programming. Esp32 motor control for a gate system. 1 month later it works mostly.