I get the following error message from nodeMCU on esp8266 : attempt to call field "adc.force_init_mode" (a nil value). Can somebody point out the mistake please?
if adc.force_init_mode(adc.INIT_ADC)
then
node.restart()
return
end
val = adc.read(0)
print("Input number:", val )
val2 = 5000000 - (val*5000000/1023)
print("R (ohm):", val2 )