问题
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