Open GoogleCodeExporter opened 8 years ago
I succeeded in getting the TrackControllerInfrared to work.
I commented out (deleted) some code in the Railuino.cpp file.
The original code contains:
TrackControllerInfrared::TrackControllerInfrared() {
mPower = true;
for (int i = 0; i < 2; i++) {
for (int j = 1; j <= 4; j++) {
toggleLocoDirection(j);
}
}
setPower(false);
}
When I change this to:
TrackControllerInfrared::TrackControllerInfrared() {
// mPower = true;
//
// for (int i = 0; i < 2; i++) {
// for (int j = 1; j <= 4; j++) {
// toggleLocoDirection(j);
// }
// }
//
// setPower(false);
}
Things work like a charm.
I'm not shure why the loop is there. It only seems to toggle locodirection
twice, so setting the state of all four locs in the same state as they were in
the first place.
Original comment by elektro...@gmail.com
on 1 Mar 2015 at 3:26
Hi,
Having the same issue here with IR, but removing the code as stated in your
post doesn't changed a thing. Do I have to reimport the library or something
like that?
Original comment by soullie....@gmail.com
on 2 Jun 2015 at 7:56
As far as I know, you don't have to re-import the library. I just edited the
Railuino.cpp file with notepad and saved it. Just make sure that the edited
file is in your "/documents/Arduino/libraries/Railuino/" directory.
Original comment by elektro...@gmail.com
on 17 Jun 2015 at 5:04
Original issue reported on code.google.com by
elektro...@gmail.com
on 3 Feb 2015 at 7:24