Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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.

Latest threads

Back
Top