Basic Library
Digital I/O
Analog I/O
Advanced I/O
Time
Math
Trigonometry
Random Numbers
Bits and Bytes
Interrupts
Serial Comm.
Standard Library
Servo Motor
Stepping Motor
Character LCD
EEPROM
SPI
I2C (Wire)
SD Card
SD (File Operations)
Ethernet
Ethernet (Server)
Ethernet (Client)
Firmata
Periodic Operation
Power Save
Clock (RTC)
SoftwareSerial
Utility
Utility
The components of the Utility library can be found below.
softwareReset
Description
Generate reset.
Syntax
void softwareReset()
Parameters
None
Returns
None
getResetFlag
Description
Gets the matter of reset.
Syntax
uint8_t getResetFlag()
Parameters
None
Returns
0x00: External reset or Power on reset
0x01: Low voltage detection
0x02: Illegal memory access
0x04: RAM parity error (read from no initialized area)
0x10: Watch dog timer
0x80: Illegal instruction
getTemperature
Description
Get temperature
Syntax
int getTemperature(uint8_t mode)
Parameters
mode: Specify TEMP_MODE_CELSIUS in the case of Celsius, specify TEMP_MODE_FAHRENHEIT in case of Fahrenheit
Returns
Temperature(int)
Comment
This has a margin of error of 1 degree one way or the other.
Example
This example shows the temperature every 1 second.
#include <Arduino.h>
void setup() {
Serial.begin(9600);
}
void loop()
{
Serial.print("Temperature: ");
Serial.println(getTemperature(TEMP_MODE_CELSIUS));
delay(1000);
}