Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes
Read the name stored in EEPROM. The name is set by userNameWrite(). EEPROM is not erased when the robot is turned off and can be read anytime after being set.
Robot.userNameRead(container)
container: a char array with 8 elements.
none
#include <ArduinoRobot.h>
void
setup
(
)
{
Serial.begin
(
9600
)
;
Robot.begin
(
)
;
}
void
loop
(
)
{
Robot.userNameWrite
(
"Aaa"
)
;
Robot.robotNameWrite
(
"The Robot"
)
;
Robot.cityNameWrite
(
"Malmo"
)
;
Robot.countryNameWrite
(
"Sweden"
)
;
char container[
8
]
;
Robot.userNameRead
(container)
Serial.println
(container)
;
Robot.robotNameRead
(container)
Serial.println
(container)
;
Robot.cityNameRead
(container)
Serial.println
(container)
;
Robot.countryNameRead
(container)
Serial.println
(container)
;
}
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.