Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "mbed.h" 00002 00003 #include "WiiMP.h" 00004 00005 WiiMP WiiMPlus(p9, p10); 00006 Serial pc(USBTX, USBRX); 00007 00008 int main() { 00009 00010 00011 pc.baud(115200); 00012 pc.printf("wii test begin \r\n"); 00013 00014 int Yaw = 0; int Roll = 0; 00015 int Pitch = 0; 00016 00017 00018 while(1) { 00019 bool read = WiiMPlus.Read(&Yaw,&Roll,&Pitch); 00020 if(read) 00021 { 00022 pc.printf("Y:%d R:%d P:%d \r", Yaw, Roll, Pitch); 00023 } 00024 else 00025 { 00026 pc.printf("Error\n"); 00027 } 00028 wait(0.001); 00029 } 00030 }
Generated on Tue Jul 19 2022 20:14:13 by
1.7.2