Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update send.ino #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/esp8266 to ardu (softserial)/send/send.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ GBUS bus(&mySerial, 5, 20);
// РАСПОЛАГАЙ БАЙТЫ В КОНЦЕ СТРУКТУРЫ!
// int тут занимает 4 байта, так что на Arduino его нужно принимать как long!!!
// структура структур должна быть одинаковая
#pragma pack(push, 1) // Для правильной упаковки структуры компилятором - выравнивание в 1 байт, тогда структура будет "как написано"
struct myStruct {
float val_f;
float val_f2;
int val_i;
long val_l;
byte val_b;
};
#pragma pack(pop)

void setup() {
// родной сериал открываю для наблюдения за процессом
Expand Down