Arduino’s Commands and Variables

  1. What is the command for setting up the Arduino pins as inputs or outputs? Answer: pinMode()
  2. What is the command for writing a value to a digital pin on the Arduino? Answer: digitalWrite()
  3. What is the command for reading the value of a digital pin on the Arduino? Answer: digitalRead()
  4. What is the command for setting up the baud rate for serial communication on the Arduino? Answer: Serial.begin()
  5. What is the command for sending data over the serial port on the Arduino? Answer: Serial.write()
  6. What is the command for receiving data over the serial port on the Arduino? Answer: Serial.read()
  7. What is the command for setting the PWM duty cycle on an Arduino pin? Answer: analogWrite()
  8. What is the command for reading the value of an analog pin on the Arduino? Answer: analogRead()
  9. What is the command for delaying the execution of the program on the Arduino? Answer: delay()
  10. What is the command for mapping a value from one range to another on the Arduino? Answer: map()
  11. What is the command for obtaining the time in milliseconds since the Arduino board was last reset? Answer: millis()
  12. What is the command for obtaining the time in microseconds since the Arduino board was last reset? Answer: micros()
  13. What is the command for setting the internal pull-up resistor on a digital pin on the Arduino? Answer: digitalWrite(pin, HIGH)
  14. What is the command for clearing the contents of the serial receive buffer on the Arduino? Answer: Serial.flush()
  15. What is the command for setting the analog reference voltage on the Arduino? Answer: analogReference()
  16. What is the command for generating a software interrupt on the Arduino? Answer: softwareInterrupt()
  17. What is the command for setting the interrupt mode on a pin on the Arduino? Answer: attachInterrupt()
  18. What is the command for detaching an interrupt from a pin on the Arduino? Answer: detachInterrupt()
  19. What is the command for setting the tone frequency on a piezo speaker on the Arduino? Answer: tone()
  20. What is the command for stopping the output of a tone on a piezo speaker on the Arduino? Answer: noTone()
  21. What is the command for setting the PWM frequency on an Arduino pin? Answer: analogWriteFrequency()
  22. What is the command for setting the PWM resolution on an Arduino pin? Answer: analogWriteResolution()
  23. What is the command for generating a pulse of a specific duration on an Arduino pin? Answer: pulseIn()
  24. What is the command for setting the number of bits used for analog-to-digital conversion on the Arduino? Answer: analogReadResolution()
  25. What is the command for setting the number of bits used for digital-to-analog conversion on the Arduino? Answer: analogWriteResolution()
  26. What is the command for setting the serial port data transmission format on the Arduino? Answer: Serial.begin(speed, format)
  27. What is the command for obtaining the version number of the Arduino software? Answer: Serial.println(F(“Arduino version “));
  28. What is the command for setting the I2C address on an Arduino board? Answer: Wire.begin(address)
  29. What is the command for sending data over the I2C bus on an Arduino board? Answer: Wire.write()
  30. What is the command for receiving data over the I2C bus on an Arduino board? Answer: Wire.read()
  31. What is the command for requesting data over the I2C bus on an Arduino board? Answer: Wire.requestFrom(address, length)
ReplyForward