[color=Green]My main question is just this if you don't want to read the rest of my erroneous endeavour, [/color][color=Green]I can use the input status port OK, am using a 3.2 Volt battery source, but not if I am using the data port . The data port must have all pins 'low' or the status port remains stuck on whatever value was there last when the data port is activated. This may not be exactly accurate but its similar, there are variations[/color].
My coding looks ok. its very simple. I really butchered up an old unused cable cable and I thought perhaps this could be problematic so I replaced it and made everything neater Same result though. I do seem to have an inverted port[color=Blue]the decimal value of the status port is 135 when not in use)like the opposite of 120 in binary[/color] and a status port that wont read input when all data pins are high!!! Anyway that's not a major problem and Ill check the code and see if my head is on the right way round....
I dont know much about electronics but as I get 3.3V out of my port. So I used a pnp transistor to operate a 9V battery and relay to close the circuit on a 12 Volt battery with a 200W motor.
I want to know if the motor has moved a lever 1cm or 1 meter. So I still have to work on a method or other for this. might be have to employ a potentiometer or an encoder (I did some web searching and apparently an encoder can send up to 10,000 pulses per revolution, that would be pretty accurate,
I dont think a 5 bit status port would know what to do with 10,000 pulses. So obviously I need an inbetween device.
Limit switches would maybe not be enough, as I actually want to know EXACTLY how far , say, some kind of actuator as moved.
Ive used the timer control so that the ports are being read constantly,well ten times a second anyway for now.
I did a program that speaks to me and tells me what What is going with the ports so I can muck about with wires and not look at the screen wasting time, just for the sake of it
I will probably fry the thing before I am through.
Thanks for any replies?
[color=Green]ok, it's frustrating. I have the computer saying to me "Status 4, turning Red Light ON", but turning the data port on, even one pin starts making the status port misbehave.................[/color]