Chris Styles
/
DemoBoard_Acc_RGB
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "DemoBoard.h" 00002 00003 /* 00004 * This project uses the triple axis accelerometer and the RGB LED 00005 * The x,y,z axes are assigned to the r,g,b components respectively 00006 * The acceleration in a given axis will modulate it's associated colour 00007 */ 00008 00009 int main() { 00010 00011 while(1) { 00012 rgb.red(abs(acc.x())); 00013 rgb.green(abs(acc.y())); 00014 rgb.blue(abs(acc.z())); 00015 wait (0.01); 00016 } 00017 00018 } 00019 00020
Generated on Tue Aug 2 2022 10:56:26 by 1.7.2