In my experience, posting in english usually gives me more answers.
I looked at the comments on my project and indeed there was a comment that said that the SDA (A4) and the SCL (A5) should be plugged into communication 20 and 21 respectively.
Now, there is still the problem of the timer that cannot be restarted when there is less than 1 minute on the clock.
In addition, the project dates from 2021 and the last comment from 2022. I have little hope of being answered, but I'm going to give it a shot anyway.
Why? I2C is a bus handling up to 127 devices.
Maybe OK but only I2C capable pins will do the job. Every digital pin will not work. I have a never used Mega and can't tell If You do the right or wrong thing.
I've understood that from reading the replies to Mega questions here, therefore my reservation. Moving pins I know but to which pins? Maybe the OP did the right thing. Checking a second time never hurts I think.
I'm new to arduino. I did an internet search to find a project that met my needs. I didn't code it (I don't know how to code). If you tell me it's poorly written, you know it better than I do.
That's a common approach that mostly gives mothing useful.
Copying code from unknown people, You never know what You get. You're fortunate to come this far.
The aim for forum is helping members to learn and grow in coding. The aim is not being a fixing shop for free.
Get interested in learning coding and learn. That way this hobby will bring You a lot more fun and satisfaction. Coding for 50 years....
I already have another project that I want to combine with this one. It is a box with 2 buttons and 2 lights (blue and red) and 2 7-segment displays of 4 inch. When the red button is pressed and held, the red light will turn on and the display will begin a 10 seconds countdown. When the button is released, the light and the countdown is reset (vice and verca for blue). I'd like to include a timer for play time. Since I already use an arduino mega, I would found it more elegant to do it with the arduino than just using a kitchen timer.
You want a timer. But you can't bother to learn to code, so you pull up someone else's timer project from a foreign language Web site and expect us to adapt it to your needs. That, and it is not even clear how this timer project is supposed to work: I tried the Arduino Uno version you gave us in post #1, and I couldn't even get the timer to run.
This happens often here. People who can't bother to learn to code give us code that they don't understand, and can't be bothered to try to understand, that they expect us to adapt to their needs, thinking it will be an easy fix, even when the only sensible solution would be to throw everything away and start from scratch. That, and if you expect code to be written for you, for free, you will probably be disappointed.
As far as Arduino projects go, a timer is not a hard one to code. You might, however, find it a bit of a challenge to make this timer run at the same time as your 7-segment display countdown is running. I am sure that that is the next thing you will want: you will want to make both this timer and the 7-segment display countdown run at the same time, and you will find this to be harder than you anticipated.
Combining two projects to run on the same machine, at the same time, requires that you know what you are doing. If you cannot be bothered to take the time to learn, then that is what the Jobs and Paid Consultancy forum category is for. Here is a link to that category: Jobs and Paid Consultancy - Arduino Forum
Sorry, my mistake, I didn't know there was this category. I did not intend to insult anyone or not pay for the work.
What would be the best way to proceed? Do I post explaining my project in jobs and paid consultancy and wait for a response with a price?