Day 28: More controller testing - with locos!
A bit more development on the controller concept - PCBs have been ordered, so I'm doing some more work on the software. It's now set up to respond to the throttle using centre-off (so no clicking a reversing switch every few seconds while shunting) and it seems reasonably smooth. I had to incorporate a bit of a dead zone in the centre otherwise it was a bit twitchy - it seems pretty smooth now. I've also wired in a light-dependant resistor, which stops power to the track when it senses dark - fortunately this works, as the little Ruston would fall off the end of the desk otherwise!
Stats:
No. of lines of code needed to make this work: 55 (with extra spaces to make it easier to read)
Correct resistor to use with a 20k to 2M LDR: 1k (this took considerable experimentation to get right)
Cumulative pushup counter: 3325
- 4
1 Comment
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now