【发布时间】:2021-12-22 22:22:22
【问题描述】:
我需要将浮点数或字符串值写入 SDFAT 库中的 SDVolume Cache,我正在使用 ESP32 和 SdCard 模块。
uint8_t* pCache = (uint8_t*)sd.vol()->cacheClear();
memset(pCache, ' ', 512);
for (uint16_t i = 0; i < 512; i += 4) {
pCache[i + 0] = 'r'; // I Need to write a Float value or String into this cell
pCache[i + 1] = ',';
pCache[i + 2] = '0';
pCache[i + 3] = '\n';
}
【问题讨论】:
-
这是 C 还是 C++?不能两者兼而有之。这是否使用 Arduino 平台?无法从您的代码中分辨出来,但它看起来不像。 请不要使用“随机”标签”;不相关的标签只会导致专家无视您的问题。
-
它是 Arduino,但通常该库是用 C++ 编写的。所以我们谈论的是 C++ 和 Arduino 平台。标签已更新,谢谢。