i just got my first arduino last week - totally love it
i have done all the beginner tuts i could find and feel i am getting to understand it all and its beginning to click
for my first proper project i would like to make a digital protractor - doesn’t need to be accurate and i think i have this part covered
it will output to a LCD screen
but the second part i am struggling with - i would like to add some buttons to the cercuit and make it so you can edit the reading on the move rather than hook it up to a computer again - for example i measure a 90 degree bend with it but the arduino only reads 85 degree, i want to be able to press some buttons, adjust it and save it again so it will not change back when i turn it on and off
is this possible? i havn’t seen anything on it so i thought i would ask
Welcome to the Arduino world.
What you asked about should be very possible. First would need a little information. What is reading the angle, a pot generating a analog voltage read by an analog input pin? Is so you could write your sketch and create a int variable called cal that would be initilized to zero at the start. If at any time you needed to ‘adjust’ your reading you could have two push buttons, one called up and one called down that could increment the cal variable each time you press it. This cal value would be added to the analog input reading, there by adjusting the reading.
There are probably many ways to do it but we would need drawing of your circuit and your attempted code to go further. You could also have a pot that would generate a value as you turned it that could be added or subtracted from the angle value variable.