I'm looking for a code efficient method to build a small table during runtime.
Although I’ve looked at mel PIC BASIC Pro, FAQ, Code Examples and PBP Extensions I haven’t found an answer; albeit, I may have overlooked an answer.
Here is the code example I’ve started even though it doesn’t compile.
‘--------------------------------------------------------------------------------------------------
highpres1 var byte
highpres2 var byte
highpres3 var byte
…
highpresn var byte
‘------------------------------------------------------------------------------------------------------
if pres > 1700 then ‘voltage from pressure transducer
high hiled ‘led on to verify that pressure > 1700
for i = 1 to n step 1
adcin 4, highpresi ‘the ‘i’ at the end of highpres (i) is intended to
‘identify ‘successive variables
next i
else
endif
‘-------------------------------------------------------------------------------------------------------
Question: How can ‘i’ be used to identify successive variables without extensive code?
Thanks,
Bob
Bookmarks