I am new to Arduino and Programing. I teach school and run a club for the kids where we build Go-Karts and Boats. I am interested in adding Arduino and its possibilities to the things my students do, thus opening many more doors for them and their projects.
First I have to learn some thnigs, then I will learn more by teaching the kids.
Question: What is the best way to build an understanding of code. I have worked through the "Basics" projects on this site and then went back over them to see what I could do from memory by recreating them. I found myself asking "How do I know that is start with?" I could see what I was suppose to type but could not understrand how I was to know thats what was needed.
Example: When setting an "int" at the begining of a sketch like in the "Fade" example in "Basics", what is the thought process or metric for knowing that is how you start? Is their a way to look at the pieces (code) and the objective at hand and figure out what to do?
KeepingUpwiththeTimes:
Example: When setting an "int" at the begining of a sketch like in the "Fade" example in "Basics", what is the thought process or metric for knowing that is how you start? Is their a way to look at the pieces (code) and the objective at hand and figure out what to do?
In C and C++ programming you must define the type of a variable before you use it. int tells the compiler that you want to use a 2 byte variable that can hold values between - 32768 and + 32767. There are 16 bits in 2 bytes. The highest bit is reserved for the sign which leaves 15 bits for the number and 215 - 1 = 32767. The -1 is there because computers treat 0 as the first number whereas humans usually treat 1 as the first number.