Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Error visualmicro and timerone (Read 4634 times)
biersepp
Newbies
*
Offline


Posts: 3
Joined: Oct 2nd, 2014
Error visualmicro and timerone
Oct 2nd, 2014 at 1:40pm
Print Post  
Hello,

i have installed visual studio and i am using an arduino mega.

To get a good timing for switching pins, i want to use timerone and timerthree.

i included the libraries, but an error occures if i want to use a timer function.

I attached an picture with the error, the loop is empty.

 

I hope you can help me  Smiley
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error visualmicro and timerone
Reply #1 - Oct 2nd, 2014 at 5:20pm
Print Post  
Hi,

You should include the library using the menu item "project>add/import sketch lib". The #include syntax you have used is for experienced users.

I think the error message could be better. I suggest opening the sketch in the arduino ide to compare the error message. It might shed more light on your mistake.

Thanks
  
Back to top
IP Logged
 
biersepp
Newbies
*
Offline


Posts: 3
Joined: Oct 2nd, 2014
Re: Error visualmicro and timerone
Reply #2 - Oct 2nd, 2014 at 5:35pm
Print Post  
Hi,
thanks for your response.
I can see the libs in project-> add/import scetch lib->user: TimerOne, TimerThree. This should be ok, i think.

I teste the code in the arduino software, here is the result.

Thanks so far.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Gilles Plante
Full Member
***
Offline


Posts: 156
Location: Québec, Canada
Joined: Oct 31st, 2013
Re: Error visualmicro and timerone
Reply #3 - Oct 2nd, 2014 at 7:32pm
Print Post  
Hi,

I add a look this morning in the header file. Strangely I can't fin my post  Huh.

I thought there was an error in your code, because you don't instantiate an object of class Timer1, but saw that an instance is created automatically in the header (?).

The error message indicates that either Timer1 was not declared as an instance (object) of the Timer1 class. STarnge.
« Last Edit: Oct 2nd, 2014 at 7:33pm by Gilles Plante »  
Back to top
 
IP Logged
 
biersepp
Newbies
*
Offline


Posts: 3
Joined: Oct 2nd, 2014
Re: Error visualmicro and timerone
Reply #4 - Oct 4th, 2014 at 1:16pm
Print Post  
It works.
I downloaded the libs directly form the arduino page. 
Thanks to all.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint