Adding information on Arduino sketch or Coding

Adding information on Arduino sketch or Coding - In making the program code, we sometimes need to insert additional information on the functionality of the code. For example, description of the function, pin description, or other information. In Arduino, comments can be inserted in two ways:
Adding information on Arduino sketch or Coding
Sketch


  • Using a double slash "//", this method can only be used per line. So if many rows we want to make a comment, you can use the second way. Example:

// This comment
// This comment again
// This comment



  • Using opener "/ *" and a cover of "* /"

/ * This comment
   This still relies comment
   This is also a comment * /

  / * This comment * /




  • So, if the sketch led blink before we add the information for each line of code, then at least it would be like this.

// www.ioisalman.com
// Coder ioisalman

 / *
Program to make the LED blink
½ sec ½ sec flame dies
* /

 // Initialization pin to control the LED, ie pin 8
   const int pinLED = 8;

  / *
 This section will be executed once when the Arduino first
 Turned on or when the Arduino reset
 * /
  void setup () {
    // Pin 8 set as OUTPUT
      pinMode (pinLED, OUTPUT);
  }

  / *
   This section will be executed for electricity connected


Thus for a brief introduction about the Arduino, assemble components with peoject board, and make a simple LED blinking program. Please do improv circuit so that it is more familiar and more comfortable to use project board. Next, we will go deeper into some of the basic commands and logic functions to make the program the Arduino.

Subscribe to receive free email updates:

0 Response to "Adding information on Arduino sketch or Coding"

Post a Comment