Open main menu

Changes

1 byte added ,  00:34, 14 March 2021
no edit summary
## Nanopb protocol buffer
This [_dfrobot_ tutorial](https://wwwProtocol buffers are a data serialization format from Google which are supported in multiple programming languages.dfrobot.com/blogProtocol Buffers messages are encoded in a binary format, which means they are not human-1161readable unless we decode them back to a readable format.html) leads you through installing One of the main advantages of using Protocol Buffers is that the Nanopb library serialization and compiler on your laptopdeserialization process is fast and the generated messages are small. [^protob] _Nanopb_ is a version of the protocol buffer in the programming language C, which works well with 32 bit systems such as the Arduino. You can use [this online proto buffer decoder](https://protogen.marcgravell.com/decode) to decode proto buffer messages that were encoded for sending.
Protocol buffers are a data serialization format from Google which are supported in multiple programming languagesThis [_dfrobot_ tutorial](https://www.dfrobot. Protocol Buffers messages are encoded in a binary format, which means they are not humancom/blog-readable unless we decode them back to a readable format1161. One of html) leads you through installing the main advantages of using Protocol Buffers is that the serialization and deserialization process is fast Nanopb library and the generated messages are smallcompiler on your laptop.You can use [^protobthis online proto buffer decoder] (https://protogen.marcgravell.com/decode) to decode proto buffer messages that were encoded for sending.  The Nanopb library needs a `.proto` file that clarifies the variables that will be serialized. Once, the different types of variables are serialized or encoded, they are unreadable for humans in a binary format. This number is expressed as a hexadecimal that can easily be sent over wireless radio as it requires small amounts of data.
The encoded message needs to be decoded on the side of the receiver. The receiver also needs to know the specific variable types in the message to properly decode the message. The [abovementioned tutorial](https://www.dfrobot.com/blog-1161.html) only walks you through setting up the Nanopb environemnt on your laptio and encoding a message. A [different tutorial by _dfrobot_ shows how to encode and decode messages between an Arduino and ESP32](http://dfrobot.blogspot.com/2019/02/esp32-arduino-tutorial-25-3-protocol.html).
356

edits