Tuesday, 2 February 2010

Working solenoids with time and dial

When i began running my code that activates my solenoid, i realised that the spring had made the piston stay too far out to be magnatised, sucked in. So i removed three rings from the spring and it seems to work fine.

Below shows how far the piston was originally out:

The hardware is proving to be difficult to wire up to ensure each component has the correct voltage. Below shows my circuit mess...I have all components working, even though my potentiometer will only work straight from the arduino board and not the breadboard for some reason?!

I have been listening to Lesser Spotted Woodpecker noises to try and imitate with my solenoid. I have written a code for this.

I want to however be able to control this into short bursts, which i think can be done by coding another loop that counts how many times it loops before acting on it. Ha very elaborate i know! e.g. I want to to beat 20 times then rest then repeat. No luck with this code so far. Very little appears to be available on constructing a for...next loop in my code!! eek! Back to studying for me again!

No comments:

Post a Comment