Comparing two ADC readings in Flowcode

Status
Not open for further replies.

jagrolet

New Member
I am trying to compare 2 analog readings in Flowcode but I can figure out how to do it.
I tried to compare them after I convert them to strings and before with no luck.
Having trouble with the loop logic and calling the right variables.
I attached the Flowcode project file, if someone would care to take a look.

I have this working in Mikrobasic, and assembly, but Im trying to port one of my projects over to Flowcode because I think it's pretty neat software.

example

if ADC(1) >= ADC(0)
then PortD pin 6 = hi

ADC(1) is my sensor POT
ADC(0) is my threshold POT

I set my threshold and display it on the LCD, then if my sensor exceeds this value I trigger a relay. Its used in my camera intervalometer for lightning photography.
 

Attachments

  • Intervalometer.zip
    3.4 KB · Views: 301
Hi, Jagrolet

You know what ???

using two separate adc inputs ...

and Once compiled ... it works fine !!!

Alain
 
Last edited:
Actually I got it working now. I was calling the same ADC channel twice.
Both channels were responding but with the same data. So it appeared to be working.
I should pay more attention.
FYI I used WinRar to zip the file.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…