I have no background and basics in programming but now I'm taking a course which involves engineering programming (C language basics and Arduino). I'm scared that I can't catch up. Can some of you share some experience/tips to learn programming faster? What resources is the best for students to refer? What's the best studying method that worked out for you? Thanks in advance.
Read and practice.
- You need to do a lot of homework, here is this weeks . . .
If you learn by examples, here's a bunch of working examples of Arduino code (with simulated hardware) you can play with:
These are great for beginners:
Don't sweat the syntax. The hard part is doing the "wax on wax off" bit. IE get your logic sorted out. Write the manual, in HUMAN first! Then write your program out in HUMAN. Name things to store numbers, name things that would do functions for you. The last thing to do is actually convert this human code to computer code.
Oh, and avoid delay() like the plague!
Then there's using AI.. This is like going to the local bar, handing somone a pen and paper, and asking them to write your code for you. Odds are it will end up being mostly gibberish that, even if it does kinda' work.. How are you going to make it any better? You've only been pushed further into the pit of confusion.
Remember : Don't learn to code. Teach the computer HUMAN!
Good luck!
-jim lee
I used to tell students you learn to program by writing programs
lectures and books can only take you so far
I HAD a teacher that taught us to program by writing programs. Not in code, but a simple sudo-code he gave us. It was the TOTAL "Wax on Wax off" of programming class! The best foundation ever for learning to code.
-jim lee
Here is a introductional tutorial that will take you maybe 3 to 5 hours to work through.
It is easy to understand and has a good mixture between explaining important concepts and example-codes to get you going. So give it a try and report your opinion about this tutorial.
writing programs that need to be tested on hardware takes additional time to download, run and possibly press buttons. Better to just write/test code on your laptop.
IDEs like Visual Studio, Eclipse will run on your laptop
if you need to write Arduino programs, the wokwi.com is an online simulator that will avoid download times and the grief of wiring
To me it makes no sense to add a learning curve for a complex IDE on top of learning the programming language itself
Just watch out for total nonsense you will find in the course linked in #10 above, like
It is important to have the loop() function in the sketch, even if it is empty, because without it the microcontroller on the Arduino board will try to execute whatever it finds next in memory after the statements in the setup() function have been executed. The microcontroller will try to execute whatever it finds in memory as an instruction, but the loop() function prevents it from doing this by keeping program execution in the loop
Lotsa words to say something laughably incorrect.
I stopped there. You really don't need to have stuff like that in your brain.
a7
how are they more complex than the Arduino IDE? they provide an editor and the tools to compile and run the code
or are you suggesting using an editor like notepad and somehow using the command line to compile the code and execute the code
IDEs like Eclipse are far more complex than the Arduino IDE for the simple reason they are far more capable. That’s assuming you get it installed properly in the first place. I’ve always found that to be a pain in the neck. You try to install the main package. But, then you need to go hunt down a Python compiler or ensure your PC has the correct JRE installed or some such nonsense. Then you need figure out how to install the tool chain for your target processor. Then you need an Arduino environment and libraries. Then you need to configure the IDE to pull all that crap together. Yadda, Yadda, Yadda.
For all its lack of features, the Arduino IDE is one-click install. BTW, so is the Eclipse / Sloeber IDE that I use for any serious / complex Arduino coding. It's highly capable.
when we did this a while back in robotics, you install the IDE for a specific language all in one shot. when ready, just hit the play button to compile and run the program. it dumps the errors in a new window
one advantage of these IDE is [code completion] (Code completion - Wikipedia) that puts up a small menu of available class methods (e.g. Serial.read()) and arguments.
That's fine, but is it relevant to the Arduino environment and all boards (Board Manager) / libraries (Library Manager) in the Arduino ecosystem?
I am well aware.
Well just start from basics on youtube tutorials and start making some projects....youll soon start understanding things..
it's good for learning C++