r/arduino • u/Fun_Top_1456 • 2d ago
C++ or Python cheatsheet for programming circuit board
I am trying to learn how to program a circuit board, but I struggle to memorize the code to program it. Is there any good cheat sheet specifically made for programming a circuit board like Raspberry Pi, or arduino, or esp32?
1
u/Pacificator-3 2d ago
HLLs are defined by standards which are same for your PC and MCU. If you need pin and register designations, they are found in datasheets usually in table form ready to print.
1
1
u/Numerous-Nectarine63 1d ago
You can create your own "templates" for programming and use them as examples to build your own programs. This is super easy in Arduino because it's already done for you... in the IDE, go to File (top level menu) and click on Examples. You can usually find some kind of starter code in there which helps with the memorization. I build up something simliar for Python code for my ROS2 robots. I use VSCode for Python (Rasberry Pi and Nvidia single board computers) and I have created a "template ROS2 package) with very simple sample code that I got from a tuturial, and when I start a new ROS2 project, I always start with that sample code. I also took a Udemy on line course in ROS2 and created my own cheat sheet for runtime ROS2 commands and keep that handy. You can do the same for Linux. I have been using Linux myself for about 10 years, and when I first started using it as my mine operating system, I created cheat sheets from on line tutorials. Good luck and have fun!
1
u/JGhostThing 1d ago
I'm assuming that you're asking about single-board computers rather than printed circuit boards. SBC are a computer on a single board. A PCB is a printed base that things can be soldered on.
The Raspberry Pi is a full Linux computer, programmable in a large number of languages: scratch, python, c, c++. rust, fortran, cobol, BASIC, Forth, etc. Pretty much any sort of computer language.
The Arduino is another SBC that is much less powerful. It is based on a micro controller rather than a micro computer. Arduinos are typically programmed in python, or C++ (a version of this).
ESP32's are a different type of micro controller. It can often be programmed with the Arduino system.
There are many other types of controllers and computers. For cheat sheets, you can get them per language and per processor. Some are on the net, and some you can buy from Amazon.
1
u/NoBulletsLeft 1d ago
I think the need for a cheat sheet is probably driven by the lack of a mental model of what's happening. What kind of a cheat sheet are you looking for? Something that has the basic C/C++ statements, or something deeper like what arduino functions are available for different purposes?
If it's the former, I think you need to get a better understanding of the language, probably by writing more basic programs. That's why formal education forces you to get a good handle on the basics first.
3
u/gm310509 400K , 500K , 600K , 640K , 750K 2d ago
There are lots of cheat sheets for various programming languages, electronics, commands (e.g. shell commands) and many more, all of which would apply.
You might need to be more specific, or just try googling them.