Page 1 of 1

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is most likely no translated for the post!

Arduino and buttons
Clear all

Arduino and buttons

New Member
Joined: 2 weeks ago
Posts: 1
Topic starter  

Hi to everyone,

I make a device that will count how many vehicles have passed per hour or a specific set time.

The scheme includes: Arduino Uno, differential pressure sensor, LED LCD, memory card module, battery and cables for the connection between the modules.

I want to ask: Is there a way to make the Arduino UNO reprogram by pressing a different button for my different needs? And for help how to connected this buttons with Arduino to work- scheme ? 

For example :

Today from 6 am to 12 I want the device to count only 2 wheeled axis, and then 4 axis vehicles or 6 wheeled axis vehicles. I need advice on the hardware, how to connect them to the Arduino if I have switches.

PS : Without RTC- it's too complicated!

Thank you! 

Noble Member Admin
Joined: 8 years ago
Posts: 1832

Hi Wafray,

I haven't worked with a setup like that, but it sounds like this article may be a good starting point LED Effects All-in-One.

I know this is not what your project will be doing, but the attachInterrupt() function is used to trigger an interrupt when pressing a button.
In the meanwhile a value is stored in the EEPROM to keep track of the function you'd like to be using (or in that project: the selected LED effect).

Start reading at Challenge 2 and keep reading until you've completed reading Challenge 5 in that article.
It may be a solution for your "reprogram" question.
Based on the value in the EEPROM certain code can be selected, as seen in the LED effects example.

I hope this helps you get started 😊 


Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).