The Endian question – binary communication between Nextion and Arduino
Over the last months, we have seen a huge progress in the Nextion Mega IO project. Time for a little break to answer recurring readers' questions. Today, we'll talk about data formats in binary communication. An important point as soon as we leave the default ASCII command communication using the Nextion instruction set. For the Nextion Mega IO project, we introduced a much more compact binary protocol, first to gain on transmission speed, second to showcase the Nextion's protocol reparse mode, and third because it's fun to explore new paths ;-) . Our goal for today is to understand a bit of theory which will allow us to rework somewhat the Nextion Mega IO code in the future to make it simpler, easier maintainable and readable, and still more flexible. Then, adding the control over the up to 32 GPIO pins which we still have to implement, will be very easy. And later, when it comes to high speed communication between Arduino and Nextion for a CAN bus project (spoiler!), we will be thankful for all this preliminary work!