Unable to compile the Firmata examples
hi, have arduino duemilanove , arduino 0018 platform running on windows 7. i'm trying firmata examples run, error trying compile simplest sketch using firmata library. it appear kind of classpath issue of sorts, arduino environment isn't able locate firmata code, think in event i'd see different error message. any thoughts on how troubleshoot this?
thanks in advance!
the code below yields error:
in function 'void setup()':
error: 'class firmataclass' has no member named 'setfirmwareversion' in function 'void loop()':
thanks in advance!
the code below yields error:
in function 'void setup()':
error: 'class firmataclass' has no member named 'setfirmwareversion' in function 'void loop()':
code: [select]
#include <firmata.h>
byte analogpin;
void analogwritecallback(byte pin, int value)
{
pinmode(pin,output);
analogwrite(pin, value);
}
void setup()
{
firmata.setfirmwareversion(0, 1);
firmata.begin();
}
void loop()
{
while(firmata.available()) {
firmata.processinput();
}
firmata.sendanalog(4, analogread(4));
firmata.sendanalog(5, analogread(5));
}
you can @ header file firmata class, , confirm there no function named setfirmwareversion.
apparently, it's been renamed.
code: [select]
class firmataclass
{
public:
firmataclass();
/* arduino constructors */
void begin();
void begin(long);
/* querying functions */
void printversion(void);
void blinkversion(void);
void printfirmwareversion(void);
[glow]//[/glow]void [glow]setfirmwareversion[/glow](byte major, byte minor); // see macro below
void [glow]setfirmwarenameandversion[/glow](const char *name, byte major, byte minor);
/* serial receive handling */
int available(void);
void processinput(void);
/* serial send handling */
void sendanalog(byte pin, int value);
void senddigital(byte pin, int value); // todo implement this
void senddigitalport(byte portnumber, int portdata);
void sendstring(const char* string);
void sendstring(byte command, const char* string);
void sendsysex(byte command, byte bytec, byte* bytev);
/* attach & detach callback functions messages */
void attach(byte command, callbackfunction newfunction);
void attach(byte command, systemresetcallbackfunction newfunction);
void attach(byte command, stringcallbackfunction newfunction);
void attach(byte command, sysexcallbackfunction newfunction);
void detach(byte command);
apparently, it's been renamed.
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Unable to compile the Firmata examples
arduino
Comments
Post a Comment