I always add comments to my listings, which also helps others follow the code and my "logic" when I have issues and post the code up seeking advice. I find it hard to work through the OP's code, but if you are using A-D I'm presuming that 0volts would equate to 0 and 5v 255, or something like that. I'm thinking that you need to scale the range or something so that, for example 127 digital (2.5v approx in this example) would be 0 degrees, and that any value between 0 and 127 would be treated as a minus value ? Then using the if then statement similar to if value is less than or equal to 126 then place the - symbol in the 1st LED,




Bookmarks