Use PropWare's PropWare::Printer interface for easy formatting of text, but use Simple's serial driver. This combination allows for easy object-oriented programming while still using the Parallax-authored serial driver.
cmake_minimum_required(VERSION 3.3)
project(Hybrid_Demo)
create_simple_executable(${PROJECT_NAME} Hybrid_Demo.cpp)
#include <simpletext.h>
public:
::putChar(c);
}
virtual void puts (
char const string[]) {
::putStr(string);
}
};
putStr("Hello from the Simple function!\n");
myPrinter.
puts(
"Hello from PropWare's Printer!\n");
myPrinter.
print(
"Hello from yet another Printer function!\n");
myPrinter.
printf(
"All methods have their own merits. Choose one that works well for you.\n");
myPrinter.
println(
"Printer::println() can be handy if you just want to print a single string");
myPrinter << "For lovers of C++ streams, you can even use the << operator!\n";
return 0;
}