Hello, I'm getting arduino programming errors using sample code from a purchased miniQ robot. Forgive my ignorance as I'm not a programmer. But I am trying to learn to be!
Attached is the code supplied with the robot, and below is the errors I am getting. Oh, and I'm using version 1.0.5
Thanks
LineFollower_SlowOne:3: error: no matching function for call to 'Metro::Metro(int, int)'
C:\arduino-1.0.5\libraries\Metro/Metro.h:37: note: candidates are: Metro::Metro(long unsigned int)
C:\arduino-1.0.5\libraries\Metro/Metro.h:36: note: Metro::Metro()
C:\arduino-1.0.5\libraries\Metro/Metro.h:33: note: Metro::Metro(const Metro&)
LineFollower_SlowOne:4: error: no matching function for call to 'Metro::Metro(int, int)'
C:\arduino-1.0.5\libraries\Metro/Metro.h:37: note: candidates are: Metro::Metro(long unsigned int)
C:\arduino-1.0.5\libraries\Metro/Metro.h:36: note: Metro::Metro()
C:\arduino-1.0.5\libraries\Metro/Metro.h:33: note: Metro::Metro(const Metro&)
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * * * *
Main code by Thomas O Fredericks (tof@t-o-f.info)
Contributions by Paul Bouchier and Benjamin.soelberg
* * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef Metro_h
#define Metro_h
#include <inttypes.h>
class Metro
{
public:
Metro();
Metro(unsigned long interval_millis);
void interval(unsigned long interval_millis);
uint8_t check();
void reset();
private:
unsigned long previous_millis, interval_millis;
};
#endif
error: no matching function for call to 'Metro::Metro(int, int)'
float data[8]={
0X00,0X00,0X00,0X00,0x00,0xff,0x00,0x00};//save the analog value
Um.....I don't understand what the "metro" file is suppose to do in this case. I understand library's like "servo.h" and what they are about. But in this case I do not understand what its suppose to do......?
Try removing the true parameter from the getSensor and logicManager lines. At least the number of parameters used will match what the library expects, but I cannot guarantee that the code will work as expected. It is probable that there is another version of the library that expects 2 parameters.
UKHeliBob:
Try removing the true parameter from the getSensor and logicManager lines. At least the number of parameters used will match what the library expects, but I cannot guarantee that the code will work as expected. It is probable that there is another version of the library that expects 2 parameters.
AWESOME!! it works, thanks for the help! Now I've got to do some reading to figure out this library file....