Arduino使用C/C++動態配置記憶體Lib會GG的相關實驗紀錄資料
Arduino使用C/C++動態配置記憶體Lib會GG的相關實驗紀錄資料
GITHUB:https://github.com/jash-git/Jash-good-idea-20220101-001/tree/main/Arduino_Base64_C_lib_Project/Arduino%E4%BD%BF%E7%94%A8%E5%8B%95%E6%85%8B%E9%85%8D%E7%BD%AE%E8%A8%98%E6%86%B6%E9%AB%94Lib%E6%9C%83GG%E7%9A%84%E7%9B%B8%E9%97%9C%E5%AF%A6%E9%A9%97%E7%B4%80%E9%8C%84%E8%B3%87%E6%96%99
code:
extern "C"{ #include "Arduino_Base64_C_lib.h" }; void setup() { // put your setup code here, to run once: Serial.begin(115200); } void loop() { // put your main code here, to run repeatedly: char inputbuf []="123456789"; int output_len; output_len = b64_encode (inputbuf, (sizeof(inputbuf)-1)); char outputbuf[output_len]; get_encode(outputbuf); Serial.print("Encoded string is:\t"); Serial.println(outputbuf); delay(5000); }
測試結果: