Using Google 'Protocol Buffers' in Arduino

戏子无情 提交于 2019-12-03 12:27:32

问题


Is it possible to make Google Protocol Buffers work in Arduino?

I have been trying for about a week and can't make it work, and I would like to know if it's even possible.


回答1:


This should fit on an Arduino: https://github.com/nanopb/nanopb




回答2:


I've managed, after several attempts, to compile google protocol buffers for Arduino (using lite runtime), and still, the resulting code size was way over the 32k limit. So, for now, GPB isn't a viable option for Arduino projects. (maybe on Arduino Mega?)

I suggest you look at MQTT for a suitable replacement (I'll do that).




回答3:


Looking at the link provided it says it has bindings for C++. This is essentially what the arduino is programed in. I see no reason why it wouldn't work. If you were to post some details (the data object your trying to process and the C++ code the system generated) we might be able to help. What exactly isn't working?



来源:https://stackoverflow.com/questions/11008058/using-google-protocol-buffers-in-arduino

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!