Testing the arduino board working or not | Basics of IdE program :- uploading the program to arduino
The programming in arduino IDE mainly requires some basics of c programming skills.
The arduino program classified into two parts
1. Void setup
2. Void loop
The void setup runs the code only once while void setup run repeatedly until arduino board is switched off. The led blink is the first program to run to test whether the arduino board is working or not. The arduino is tested working or not simply by uploading the LED sketch.
In void setup loop the pin is configured once as output or low using pinMode keyword and digitalWrite and digitalRead keyword while write is used to switch high or low the pin and read is used to read the information from the sensors associated with the pin.
In above picture has the LED sketch the marked are the instruction. The pinMode is used to configure the LED_BUILTIN that in turns pin 13 as OUTPUT. The digitalWrite makes the LED_BUILTIN as HIGH(on) by making DELAY keyword for 1000 m second and LOW(off) by making DELAY for 1000m second run continuously.
The information preceding with // is also an comment which tells the what the single instruction line is about.
The compiler do not read the comments during the execution of program only the main instruction (marked in 1st picture) are executed in line by line .
NOTE: 1. The arduino program is case sensitive.
EX: The pinMode keyword , here "M " must be capital if small m is used the error is showed in blank screen.
don't forget to view the video about more information about arduino programming:
FOLLOW THE PAGE FOR MORE UPDATES.
No comments:
Post a Comment