As @allObjects says, it's not possible to send just 4 bits via I2C on any platform, it's just the way I2C works - you have to send a byte at a time.
Your best bet is to send a whole byte and only use the bottom 4 bits - so sending 0b0000 like you're doing with Espruino is fine.
0b0000
but reading the empty byte and printing it out seems to take a lot of effort in C++
Welcome to embedded software! :)
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
As @allObjects says, it's not possible to send just 4 bits via I2C on any platform, it's just the way I2C works - you have to send a byte at a time.
Your best bet is to send a whole byte and only use the bottom 4 bits - so sending
0b0000
like you're doing with Espruino is fine.Welcome to embedded software! :)