This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Arduino data manipulation and concatenation with structures and unions | |
* | |
* This simple (ish) sketch shows you how to organize your data into a struct | |
* and then access the whole thing as a byte array. | |
* | |
* Useful if you want to concatenate several variables into a single byte array | |
* to send over bluetooth, i2c, lora or any other protocol that works with arrays. | |
* In other words you have a fixed byte array, and we squeeze in variables of different | |
* data types and lengths into it, while still using it as a byte array afterwards. | |
* |