Hi guys,
I am writing some code for a robot and figured it would be a lot cleaner for those in the future if I wrote it as a library. I currently am setting up a serial communication between the computer (Processing sketch) and the arduino. The issue I'm having is I'll get an error, make an update, but then still get the same error. It seems as though the file is not actually updating the library that the arduino sketch is linked to. How can I have it always update the library while I compile my sketch?
Thanks for your help.
This is the start of my code, I was getting an error due to a semicolon, which I found the error and fixed. Shouldn't be an error anymore but there is:
/*
SerialComm.h
*/
#ifndef SerialComm_h
#define SerialComm_h
#include "Arduino.h"
#include "Serial.h"
class SerialComm {
public:
SerialComm(int rate);
void read();
void write(int val);
};
#endif
#include "SerialComm.h"
#include "Arduino.h"
#include "Serial.h"
SerialComm::SerialComm(int rate) {
Serial.begin(rate);
}
int SerialComm::read() {
if (Serial.available() > 0) {
int val = Serial.read();
return(val);
}
}
void SerialComm:write(int val) {
println(val);
}