TimerOne error. Wrong code or wrong arduino? Help!!

HI im new at Arduino but im trying my best.

so here was the problem.
im using HCRS-04 Distance Sonar(?), LearningShield/MultiFunctional Shield, Arduino Mega328(?) for a certain self project. im trying to use distance sonar to gather some distance from a certain wall/object, then the distance will be display at Learning Shield/MultiFunctional Shield.

i am following different guides and pdf files. for example, i followed this guide. i also watch the video. https://www.mpja.com/download/hackatronics-arduino-multi-function-shield.pdf page 10(here is the video - YouTube). in the video, his arduino IS working but when i tried to use it on my own arduino, it is not showing. it just show some random 7 segment light working but it doesnt change no matter what i do to sonar.

it always show," no matching function for call to ‘MultiFuncShield::initialize(TimerOne*)’"
i also tried to use different guide that does not use TimerOne but it is still not working. the led does not display the number when it comes to distance sensor.

I assume 3 problem. one is wrong code–but more likely not, because the guides show working perfectly but not in my case. two is wrong arduino–in the guide they are using Arduino Compatible Uno R3. but im using Mega328. last is maybe wrong shield? i bought one here.


if possible, can anyone provide me the code for distance sensor without using TimerOne if possible that this is really impossible for me. specially for and if im using MEga328 since i will consider buying Mega Uno R3 but maybe few more weeks :frowning: .

Have you installed the TimerOne library?

Riva: Have you installed the TimerOne library?

i did. i use the manag library one. the one where you can add several files.

I do not have the shield your referring to but I downloaded and installed the MultiFuncShield-Library from the PDF you linked in your request. I also downloaded the code used (also linked in the PDF) and loaded the Sonar_Module sketch your also referring to and it compiled without errors for UNO in the 1.8.11 IDE.

in the guide they are using Arduino Compatible Uno R3. but im using Mega328

Supply a link to the Mega328 your referring to.

https://www.e-gizmo.net/oc/index.php?route=product/product&product_id=1421&search=mega&description=true

this is where i bought my arduino. i wonder if i should use compaible r3 instead of this?

That looks like a real Uno, or if not, a pretty faithful clone (personally, I intentionally use the clones, as they are harder to damage, and dirt cheap to replace if I managed to trash them anyway)

But, the error you post is a compile error - you will get that attempting to even verify, without the board even being connected!

Post the full error output, as text, not an image (never post pictures of text unless you absolutely have to!). Click the button to copy the error message, and paste it in here. Use the </> button on the forum to enclose the error message in code tags so it is easier for us to read.

I suspect that the cause of it is related to the fact that you have multiple versions of TimerOne installed, but I can’t really tell, because the key parts of the error message can’t be seen in the picture.