Tamas Rudnai schreef op 04-Mar-14 12:25 AM: > Interesting approach. Do you have to inherit your main class from a devic= e > abstract like: > > class myMainClass : mc1234 { > ... > } > > Tamas > > > Yuk, that smells like Java! (I don't like Java, and I happen to be a=20 tea-drinker, drank one cup of coffee in my life and did not like it). A main could be (for hello world): #include "targets/lpc1114fn28.hpp" typedef hwcpp::lpc1114fn28< 48 * hwcpp::MHz > target; int main(){ std::cout.connect< target::uart<> >(); std::cout << "Hello world"; } or, for the DHT11 sensor: int main(){ std::cout.connect< target::uart<> >(); std::cout << "Read a DHT11 temperature & humidity sensor\n"; timing::init(); dht11::init(); for(;;){ timing::s< 2, 1 >::wait(); hwcpp::units::temperature_in_celcius< int > t; std::cout << "temperature =3D "; if( dht11::get( t )){ std::cout << t.raw() << " " << t.symbol << "\n"; } else { std::cout << "failed\n"; } timing::s< 2, 1 >::wait(); hwcpp::units::amount_in_percentage< int > h; std::cout << "dumidity =3D "; if( dht11::get( h )){ std::cout << h.raw() << " " << h.symbol << "\n"; } else { std::cout << "failed\n"; } } } --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .