【发布时间】:2016-11-19 21:56:32
【问题描述】:
我正在一个项目中使用 ATmega328p 和 Arduino 系统,我试图在 eeprom 内存的 2 个空间中获取保存的数据并将其连接起来。我总是要求谷歌并检查示例,但这次我放弃了。
byte dataEE = readEEPROM(disk1,space);
我通常使用strcat,但是在这种情况下我可以找到将Byte类型转换为char*的方法
char * strcat ( char * destination, const char * source );
我的系统现在正在使用 String 来解决这个问题。但是我想知道一种更有效的方法,我总是读到我们必须避免使用字符串。
String TimeData = String(readEEPROM(disk1,space1)) + String(readEEPROM(disk1,space2));
【问题讨论】:
标签: c++ c string arduino-ide