Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
There scaling for volts Mrdeb you don't need any of that for what your doing just a old result = ADC.Read .................................................``I looked at several examples and every one had result = (ADC.Read(0)+1)*500/1024 Saw one example where instead of 500 they used 5000.Why??
There scaling for volts Mrdeb you don't need any of that for what your doing just a old result = ADC.Read .................................................
you want a value 0 to 1024 not a voltage 1 volt 2 volt LOL your just adding more to the clock doing math that's not needed.
.....Just a thought....
You are trying to put a fraction into a word.
Mike.
Well i would write some code to try but I deleted windows by mistake and lost about five years of my life. Going blind does that to you
thought i was formatting a usb drive and phone rang i wasn't watching i guess and clicked On my windows drive hit format gave root password
ask if I was sure and I cried. LOL not really but wanted too.
function ADInAsVolt() as word
result = ADC.Read(0)
end function
Select ADInAsVolt()
Case <25
'no button pressed
Case <100 ' ideal=92
'button 1 pressed
Case <200 ' ideal=185
'button 2 pressed
Case <300 'ideal=278
'button 3 pressed
Case <400 'ideal=371
'button 4 pressed
Case <500 'ideal=464
'button 5 pressed
Case <600 'ideal=557
'button 6 pressed
Case <700 'ideal=650
'button 7 pressed
Case <800 'ideal=743
'button 8 pressed
Case <900 'ideal=836
'button 9 pressed
Case <1000 'ideal=929
'button 10 pressed
else
'something is wrong
End Select
...Am wondering if the code I am using is at fault?? won't be the first time.