Various

  • Servo write:
    Set the angle of the servo in degrees, 0 to 180 on a specific pin. And will make a delay later.
    Example: How to use the servo with the ESP826

 

 

 

 

 

  • Servo read degree:
    return that value set with the last write().

 

 

  • Servo attached:
    return 1 if the servo is currently attached to a specific pin.

 

  • Servo detach:
    Release a pin from servo driving.

 

  • Delay:
    Pauses the program for the amount of time (in milliseconds) specified as parameter.
    Example: Blinking the internal LED with a delay – Video.

 

  • DHT temperature sensor:
    Return the temperature of the sensor (DHT). First, you have to set the type of sensor: DHT11, DHT21 or DHT22. and the pin where the sensor is connected. You have to chose also the unit of measure.
    Return type: Number
    Example: Showing the serial monitor the temperature – Video.

 

  • DHT humidity sensor:
    Return the humidity of the sensor (DHT). First, you have to set the type of sensor: DHT11, DHT21 or DHT22. and the pin where the sensor is connected. You have to chose also the unit of measure.
    Return type: Number
    Example: Showing the serial monitor the temperature – Video.

 

  • Temperature sensor:
    Return the temperature of the analog sensor. More info.
    Return type: Number

 

  • Ultrasonic ranger:
    Return the distance to an obstacle.
    Return type: Number

 

  • Program started since:
    Return the time in the selected unit (Milliseconds or seconds or minutes) since the program started or uploaded. If you push the reset button, the program will restarted again.
    Return type: Number

 

  • Tone:
    Generates a square wave of the specified frequency (and 50% duty cycle) on a pin.

 

  • Tone with duration:
    Generates a square wave of the specified frequency (and 50% duty cycle) on a pin for a certain duration.

 

  • No Tone:
    Stops the generation of a square wave triggered by tone(). Has no effect if no tone is being generated.