Writing code (Arduino Programming)
The Arduino software IDE is equipped with toolbars, text console, text editor and message area within the console. It readily connects with the physical board, which could be an Arduino or Genuino, and proceeds to make things interesting.
The code or program written with Arduino software is called a Sketch. Saved with file extension .ino, the text editor is equipped with features for saving, searching, replacing text and a message feedback system while using the save function or display error codes.
A sketchbook, similar to a real-life book, is a place where the sketches are stored. This book can be opened from File tab by clicking on the Sketchbook drop down option. For convenience, when a programmer runs the Arduino software, it creates a directory all by itself for the sketchbook.
The menu under Tools in toolbar lets you select the serial port device and ports with respect to the Arduino board you have in hand. Once the port is connected and selected from the software, know that the board is ready to uplink the sketch; you will see Rx or Tx LEDs blinking on your board while the sketch is being uploaded. The Arduino bootloader is a small program that facilitates your program to be loaded onto the board. The bootloader also blinks while it is uploading the most recently uploaded sketch.
As a programmer it is important to know the built-in functions. Libraries come in handy once a programmer decides to use extended abilities. Typical programs require one of the #include statements so that the programs can run with more agility. Though this increases the space consumption, it reduces complexity of the program and makes it easy to connect to a sensor, display modules, etc. Additional libraries can be downloaded from Library Manager while some are included in Arduino itself.
Do you like this article? Read more about Arduino
Shanosh Kumar is working as media consultant at EFY. He is currently pursuing MBA from Christ University, Bengaluru