#include <conio.h> // lcd func is included #include <unistd.h> int main(int argc, char **argv) { sleep(1); cputs("hello"); // outputs to lcd sleep(1); cputs("world"); // outputs to lcd sleep(1); cls(); // clear lcd return 0; } |
#include <dsensor.h> #include <conio.h> #include <unistd.h> #define LIGHTSENS SENSOR_2 int main(int argc, char *argv[]) { ds_active(&LIGHTSENS); while(1){ cputw(LIGHT(LIGHTSENS)); sleep(1); } return 0; } |
#include <conio.h> // lcd func is included #include <unistd.h> int main(int argc, char **argv) { lcd_power_on(); // lcd power on lcd_int(-12); // show number -12 sleep(1); lcd_digit(9); // show number 9 sleep(1); lcd_show(battery_x); // show battrey sleep(1); lcd_hide(man_run); // hide man sleep(1); lcd_power_off(); // lcd power off return 0; } |