Obotech
Hi, I have a problem when compiling the nodeMCU6288 error code "UpdateIO is not declared in this scope" please help with this code problem. Error UpdateIO_1.png 
Quote 0 0
thiagoralves
Are you sure you didn't delete anything on the firmware code by mistake? It is complaining that the UpdateIO() function is not present. I just downloaded the code and it compiled on Arduino 1.6.12 just fine
Quote 2 0
yecao
Arduino 1. 8. 7 compiled through, no problem.
But the AI "mb_input_regs[i] = (analogRead(pinMask_AIN[i]) * 64);" The maximum result here is 65536 is greater than 0-65535, causing an error when the analog input is maximum.
I changed it to "mb_input_regs[i] = (analogRead(pinMask_AIN[i]) * 64*0.999999);" so the maximum value becomes 65535.
Quote 0 0
thiagoralves
This is weird, because the maximum value analogRead() returns should be 1023 and not 1024 (check  https://www.arduino.cc/reference/en/language/functions/analog-io/analogread/ ).
Quote 0 0
yecao
DEBUG.png 
Debug  max=1024
Quote 0 0
thiagoralves
Hmm... this means that they have bad documentation. Good to know! I'll change the official code to reflect this. Thanks!
Quote 1 0
yecao
The arduino standard board has an analog input maximum of 1023.
The maximum value of the ESP8266 analog input in arduino is 1024.
Quote 0 0