I have re uploaded the firmware numerous times including using modeMCU custom build by frightanic.com and still get the same results I've tried a different batch of chips in case the ones I have are bum. I'm at ripping my hair out point! I have tried the following code.
-- in you init.lua:
if adc.force_init_mode(adc.INIT_ADC)
then
node.restart()
return -- don't bother continuing, the restart is scheduled
end
print("System voltage (mV):", adc.read(0))
print("System voltage (mV):", adc.read(0))
print("System voltage (mV):", adc.read(0))
print("System voltage (mV):", adc.read(0))
print("System voltage (mV):", adc.read(0))
print("System voltage (mV):", adc.read(0))
print("System voltage (mV):", adc.read(0))
Answer:
System voltage (mV): 36
System voltage (mV): 36
System voltage (mV): 36
System voltage (mV): 36
System voltage (mV): 36
If I change to
-- in you init.lua:
if adc.force_init_mode(adc.INIT_vdd33)
then
node.restart()
return -- don't bother continuing, the restart is scheduled
end
print("System voltage (mV):", adc.readvdd33(0))
print("System voltage (mV):", adc.readvdd33(0))
print("System voltage (mV):", adc.readvdd33(0))
Answer:
System voltage (mV): 3423
System voltage (mV): 3420
System voltage (mV): 3418
I've tried;
Rebooting then trying a read adc
new chips
adding a 2 amp 3.3 volt psu
all joints are soldered so no bread board faults
Has anyone had this before?
Any help much appreciated