Using Google 'Protocol Buffers' in Arduino

前端 未结 3 1374
生来不讨喜
生来不讨喜 2021-02-05 13:28

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 possi

相关标签:
3条回答
  • 2021-02-05 13:59

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

    0 讨论(0)
  • 2021-02-05 13:59

    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?

    0 讨论(0)
  • 2021-02-05 14:10

    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).

    0 讨论(0)
提交回复
热议问题