smarmengol / Modbus-Master-Slave-for-Arduino

Modbus Master-Slave library for Arduino
GNU Lesser General Public License v2.1
473 stars 328 forks source link

How can I read 0x 1 bit #64

Closed paxsipornax closed 2 years ago

paxsipornax commented 2 years ago

hi, it can read the 4x1 register. so how can i read bit 0x1 can you help me

include

define TXEN 4

uint16_t au16data[16] = { 3, 1415, 9265, 4, 2, 7182, 28182, 8, 0, 0, 0, 0, 0, 0, 1, -1 };

Modbus slave(1,Serial,TXEN); // this is slave @1 and RS-485

void setup() { Serial.begin( 19200 ); // baud-rate at 19200 slave.start(); }

void loop() { slave.poll( au16data, 16 ); }