Have a problem with some objects I am connecting up.
I have 8 switches connected to analogue input with resisters to divide up the voltage so I get a different reading for each. This works fine. Then as the value arrives in, I divide it by 8, round off to the nearest whole number then output the value. In the image you will see a "3" circled confirming switch 3 selected.
The value is then converted into an integer, passed to a math "==" object where is it compared to a constant being "1". If the switch and constant match, the boolean output is supposed to rise and trigger the toggle object either true or false as its final output. But as you can see by the image, 3 and 1 don't match yet the toggle is still triggered true, in fact it triggers true with the other switches too. The only object I have modified the code in is the analog input, and there do not appear to be any issues there. So I cannot work out why the toggle is triggered when the numbers do not match. Thanks for any help you can offer.
Patch as follows..
analog switch5.axp (6.3 KB)