1 | /*#include <ArduinoRobot.h>
|
---|
2 | //0 - 319: pic array,
|
---|
3 |
|
---|
4 | //320 - 337 username,
|
---|
5 | #define ADDRESS_USERNAME 320
|
---|
6 | //338 - 355 robotname,
|
---|
7 | #define ADDRESS_ROBOTNAME 338
|
---|
8 | //356 - 373 cityname,
|
---|
9 | #define ADDRESS_CITYNAME 356
|
---|
10 | //374- 391 countryname,
|
---|
11 | #define ADDRESS_COUNTRYNAME 374
|
---|
12 | //508-511 robot info
|
---|
13 | #define ADDRESS_ROBOTINFO 508
|
---|
14 |
|
---|
15 |
|
---|
16 | void RobotControl::getMyName(char* container){
|
---|
17 | EEPROM_I2C::readBuffer(ADDRESS_USERNAME,(uint8_t*)container,18);
|
---|
18 | }
|
---|
19 | void RobotControl::getRobotName(char* container){
|
---|
20 | EEPROM_I2C::readBuffer(ADDRESS_ROBOTNAME,(uint8_t*)container,18);
|
---|
21 | }
|
---|
22 | void RobotControl::getMyCity(char* container){
|
---|
23 | EEPROM_I2C::readBuffer(ADDRESS_CITYNAME,(uint8_t*)container,18);
|
---|
24 | }
|
---|
25 | void RobotControl::getMyCountry(char* container){
|
---|
26 | EEPROM_I2C::readBuffer(ADDRESS_COUNTRYNAME,(uint8_t*)container,18);
|
---|
27 | }
|
---|
28 |
|
---|
29 | void RobotControl::setMyName(char* text){
|
---|
30 | EEPROM_I2C::writePage(ADDRESS_USERNAME,(uint8_t*)text,18);
|
---|
31 | }
|
---|
32 | void RobotControl::setRobotName(char* text){
|
---|
33 | EEPROM_I2C::writePage(ADDRESS_ROBOTNAME,(uint8_t*)text,18);
|
---|
34 | }
|
---|
35 | void RobotControl::setMyCity(char* text){
|
---|
36 | EEPROM_I2C::writePage(ADDRESS_CITYNAME,(uint8_t*)text,18);
|
---|
37 | }
|
---|
38 | void RobotControl::setMyCountry(char* text){
|
---|
39 | EEPROM_I2C::writePage(ADDRESS_COUNTRYNAME,(uint8_t*)text,18);
|
---|
40 | }
|
---|
41 | */
|
---|