This blog was born as a means of annotating big and small discoveries in my use of Java, Ubuntu/Linux and Android that would be easy to access from anywhere, anytime. It does beat post-it's big time, and it also adds the benefit that others might, eventually, contribute with intelligent insights.
Where CDT really gets confused is around the 'exclusion' of the unit tests for the non-test build configurations: as mentioned in my other post, one needs to add the G-Test's include/ directory to include search path (-I). This blog has now been moved to codetrips.com: read the rest of this post here.
which is fully documented hereand, to have an idea of the geeky-fun that can be had with these gizmos, I suggest you check out this video. I fear that my weekends are likely gone for quite a while now....
Just as an example of what is possible, the following snippet will make the LEDs flash, as well as connect to a terminal on the host PC to use as stdout; this is a very basic adaption of the HelloWorld.cpp app, and some tutorials from mbed.org: the point being that it took me less than 30min to get going!
// AlertAvert.com (c) 2011. All rights reserved
//
// The code below has been adapted from tutorials on
// mbed.org - credits should go to ARM Ltd.
//
// Author: M. Massenzio (m.massenzio@gmail.com)
#include "mbed.h"
// USB out to the host PC - from a terminal window access
// using: screen /dev/ttyACM0
Serial pc(USBTX, USBRX); // tx, rx
// Board LEDs
DigitalOut myled(LED1);
DigitalOut yourled(LED2);
bool on = true;
void quit() {
on = false;
}
void toggle(DigitalOut d1, DigitalOut d2) {
d1 = !d1;
d2 = !d2;
}
int main() {
pc.printf("Starting LED flashing...\r\n");
Timeout to;
myled = !(yourled = 1);
to.attach(&quit, 5);
while(on) {
toggle(myled, yourled);
wait(0.2);
}
myled = yourled = 0;
pc.printf("Exiting now\r\n");
}