cluster.ino|2|error: BlackThornDemon.h: No such file or directory|
cluster.ino|3|error: 'BlackThornDemon' does not name a type|
src\BlackThornDemon.cpp|2|error: BlackThornDemon.h: No such file or directory|
src\BlackThornDemon.cpp|4|error: 'BlackThornDemon' has not been declared|
cluster.ino
code
#include <Arduino.h>
#include <BlackThornDemon.h>
BlackThornDemon obd2(2);
char rxData[20];
byte rxIndex=0;
byte speed=0;
/*
rpm is returned at 1/4 the actual rpm
so the range should be 0-2000
*/
int rpm=0;
float fuel=0.00;
/*
int because byte only goes to 255
noraml operatring temps are ~190-200f
so the possibility of the coolant temp
getting over 255 is evident
and if your car is on fire you prolly
want to know
*/
int coolantTemp=0;
// NOTE: we have to read this from the storage device
int odometer=0;
int trip=0;
void setup()
{
Serial.begin(9600); // so we can talk to obd2
delay(500);
Serial.println("ATZ"); //reset obd2
delay(1000);
Serial.flush(); // purge the serial buffer
}
void loop()
{
Serial.flush();
Serial.println("010D"); // tell obd2 to send us speed
//obd2.GetResponse(); // returns the command we sent ("010D")
//obd2.GetResponse(); // returns the data
}
blackthorndemon.h
c code
#ifndef BlackThornDemon_h
#define BlackThornDemon_h
#include "Arduino.h"
class BlackThornDemon
{
public:
BlackThornDemon(int pin);
void GetResponse();
virtual ~BlackThornDemon();
protected:
private:
};
#endif // BLACKTHORNDEMON_H
blackthorndemon.c
c code
#include "Arduino.h"
#include "BlackThornDemon.h"
BlackThornDemon::BlackThornDemon(int pin)
{
pin = pin + pin;
}
BlackThornDemon::GetResponse()
{
}
BlackThornDemon::~BlackThornDemon()
{
//dtor
}