Entering numbers using a button

I have a question for you programmers .

How to get a numeral value (this represents the height position of a weather station) to be processed in a zambretti formula. So I do not have to connect arduino to my PC every time I change the site .

The ideal situation.

three buttons .

a) incrementing say by 50. ( every time the button is pushed)
b) decrementing by 50 "" "" "" ""
c) entering value

Can somebody give me any clue for the syntax to be used in the program ?

Look up the state change detection example. It shows how to count button presses. Instead of incrementing, add or subtract 50 from the count.

You are going to need some kind of display if you don't connect to PC, otherwise how will you know what value you are entering?

One way to to enter numbers is explained in #9 of this post but it's specifically for the DF0009 style of lcd / button shield for a Uno, which may not suit you. But even if it doesn't, it may give you some ideas.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.