I am using a picaxe 20m and having an issue, when I am checking if a switch is high or low (if pin7 = 1 then ...), on all of my inputs except pin7, me touching or being near the wire is enough to flash it between 1 and 0. it is finding enough voltage from my hand to trigger, it will do this even on the simplest codes, any help would be well appreciated.
How functional are the output pins? can you set them high/low?
You might have done these things already, but we don’t know that, so some more info about the things you’ve tested already might be helpful in a dianosis?
thanks for the quick responses, this is my circuit, i apologise if my comment about the switch confused people, if I have a switch or not doesn’t mater. if I touch the wire leading to the in port and my code =
Main: if pin6 = 1 high 7 goto main
(note that this will happen in ins 1-6 and all outs work perfectly)
Verify the connection for your serin pin is in fact connected to ground. Do a continuity check on it(use a multimeter). I’ve run into something similar where this was the culprit…
Since we’re trying ANYTHING - ensure that you’re using a normal LED, and not a flashing LED ?
(I’ve fallen into this trap WAY too many times, best to have flashing LEDS in a separate compartment, but they all look so much like the same damn thing!).
Thanks for pointing out the error in my code, BUT even with this code it WILL turn off one I move away from it and wont turn on unless I get near it (eg. if I push it with a pen it wont go). could this be static damage? I am suspicious about this as I am rather lax about grounding my self, and I cant see what else could trigger an electrical device over range.