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

hello i can write data but i can't read how can i read data can you help me #165

Open
paxsipornax opened this issue Dec 6, 2021 · 1 comment

Comments

@paxsipornax
Copy link

paxsipornax commented Dec 6, 2021

For example, how can I read the data in the 40001 register, I wrote a code but it didn't work, how can I read the data?

void loop()
{
static uint32_t i;
uint8_t j, result;
uint16_t data[6];

result = node.readHoldingRegisters(0x40000, 6);

if (result == node.ku8MBSuccess)
{
for (j = 0; j < 6; j++)
{
data[j] = node.getResponseBuffer(j);
}
}

delay(100);
node.writeSingleRegister(0x40000, 1506);
delay(100);
node.writeSingleRegister(0x40001, 100);
delay(100);
node.writeSingleRegister(0x40002, data);
delay(100);
}

@TheYigidOS
Copy link

i have same issue did u solve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants