Too many zeroes sent

I'm having a following problem:

#include <MKRWAN.h>

modem.write(0x01);
modem.write(0x02);
modem.write(0x03);
modem.write(0x04);

Will result the "payload_hex": "01000000020000000300000004000000" on receiving end. For some reason plenty of zeroes are added to sending just simple numbers and thus efficiency is lost. Is there any way to get rid of those zeroes before they are sent over the air?

Probably some other overloaded method/function was picked by compiler. Try this:

modem.write((uint8_t)0x01);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.