rzkprwr
Member
hello.
I have a problem with my program, i use a handmade analog colour sensor who get data from the reaction of a LDR depend on what colour has reflected to it, and i am looking for how to calibrate my sensor condition with a work range.
for example, if my colour sensor reflected a red colour to it's LDR the data is 2 volt (example), add if my colour sensor reflected a blue colour to it's LDR the data is 3 volt (example), and if it not passed by any object the data is 4 volt.
My question is, how i can use the IO analog device into 3 condition ?
if the red colour scanned on the 120s, it reads in D4980 = 2000 - 2200 (example)
if the blue colour scanned on the 120s, it reads in D4980 = 2500 - 2800 (example)
if no objects was detected on the 120s, it reads in D4980 = 3400 - 3800 (example)
how to program it, if i want each 1 coil work in every condition in red, blue and no object ?
because i just know ( AND> ) and ( AND<) , so it just can read 2 condition, not 3.
Sorry for my bad english, hahha. Thank you so much
I have a problem with my program, i use a handmade analog colour sensor who get data from the reaction of a LDR depend on what colour has reflected to it, and i am looking for how to calibrate my sensor condition with a work range.
for example, if my colour sensor reflected a red colour to it's LDR the data is 2 volt (example), add if my colour sensor reflected a blue colour to it's LDR the data is 3 volt (example), and if it not passed by any object the data is 4 volt.
My question is, how i can use the IO analog device into 3 condition ?
if the red colour scanned on the 120s, it reads in D4980 = 2000 - 2200 (example)
if the blue colour scanned on the 120s, it reads in D4980 = 2500 - 2800 (example)
if no objects was detected on the 120s, it reads in D4980 = 3400 - 3800 (example)
how to program it, if i want each 1 coil work in every condition in red, blue and no object ?
because i just know ( AND> ) and ( AND<) , so it just can read 2 condition, not 3.
Sorry for my bad english, hahha. Thank you so much