Hi, all,
perceived problems with the compiler of the IDE in using hardware timer to control a software serial (bitbanging) serial communication.
(Maybe I'm not C/C++-freak enough to solve it?)
Win XP 32bit, SP2. Maple rev 5, Maple IDE 0.0.12
The C++ library (SoftSerial.h. SoftSerial.cpp) was put into a folder under %mapleIDE%/libraries. Tried to add a timer interrupt to that.
Declared
HardwareTimer timer(2);
in the MapleIDE sketch after || before
#include "SoftSerial.h"
I was not able to
a) have the compiler recognize a public field of type HardwareTimer in the SoftSerial class defined in the header of the library (Compiler error: Type unknown)
b) have the compiler recognize a global instance of type HardwareTimer in the SoftSerial library
c) tried out all possible includes in the library, from FreeRTOS.h to timers.h
Workaround:
had to move all the functions in the former library class to a sketch *.pde file,
rename all LCD.%functions% to LCDfunction in the main sketch - dropping object oriented concepts in order to make things working.
Noticed, that a class constructor function having parameters is not accepted by the compiler, when it is not stuck in a library, but in the main sketch.
The library however cannot access to the class type declaration of HardwareTimer.
Any ideas what went wrong? (Code too large to be posted here...)