10.04.2024, 07:15
You have two connect calls, remove one of them. Then log the error returned by the write call:
Same for all other registers.
Code:
r0, err = mb:writeregisters(40236, 0)
log(r0, err)
Same for all other registers.