1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6 <TITLE>WBC Demos</TITLE> 7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 8</HEAD> 9<BODY> 10 11<H1>WBC Sample Demos</H1> 12 13<H2>Location</H2> 14<P><FONT face="Courier New">$REVOLUTION_SDK_ROOT/build/demos/wbcdemo</FONT></P> 15<H2>Compilation</H2> 16<P>Change directories to <CODE>$REVOLUTION_SDK_ROOT/build/demos/wbcdemo</CODE> and enter <CODE>make</CODE>. An executable file (<code>.elf</code>) will be generated under the path <code>$REVOLUTION_SDK_ROOT/RVL/bin/demos/wbcdemo/</code>.</P> 17 18<H2>Running the Demos</H2> 19<P>Change to the <code>$REVOLUTION_SDK_ROOT/RVL/bin/demos/wbcdemo/</code> directory and perform the following steps:</P> 20<ul> 21 <li>To simply execute a program, run the <code>ndrun</code> script using the ELF file as the argument:</li> 22 <li>To debug using CodeWarrior, do one of the following:</li> 23<ul> 24<li>?Run <code>$CWFOLDER/bin/IDE.exe</code> with the ELF file as an argument.</li> 25<li>?Launch <code>$CWFOLDER/bin/IDE.exe</code>, then drag and drop the ELF file.</li> 26<li>If the ELF file is associated with <code>$CWFOLDER/bin/IDE.exe</code>, double-click the ELF file.</li> 27</ul> 28 29</ul> 30 31<H2>Description</H2> 32<TABLE border="1" class="demo_list"> 33 <TBODY> 34 <TR> 35 <TH>handling_weight</TH> 36 <TD><b>Demo description:</b><br> 37 This demo consists of <CODE>handling.c</CODE> from <CODE>wpadHealthdemo</CODE>, with weight-conversion processing added. 38 It converts the values from the four balance sensors on the Wii Balance Board legs to weight (in kilograms) and displays it.<br><br> 39 The weight values shown on the right of the screen have the following meanings.<br><br> 40 <table> 41 <tr><td>Wt</td><td>: Average value over two seconds</td></tr> 42 <tr><td>Wt(TGC):</td><td>Average value over two seconds, corrected for temperature and gravitational acceleration</td></tr> 43 </table> 44 <br><br> 45 <b>Operations Described:</b> 46 <table> 47 <tr><td>START</td><td>:Sets the zero point. 48 Gets the raw WBC values for two seconds, and that average value is then set for the <CODE>WBCSetZEROPoint</CODE> function.</td></tr> 49 <tr><td>+Control Pad Left Button</td><td>:Gets the average weight value. Takes the average value over two seconds.</td></tr> 50 </table> 51 <br><br> 52 <b>Caution:</b><br> 53 <li>Due to properties of the balance sensors when accurately measuring weight, it is necessary to set the zero point for each measurement (press the START button while nothing is on the WBC). 54 55 </li> 56 57<li>In the demo, temperature is updated immediately before the zero point is set. 58 The temperature update command is executed inside the <CODE>WBCSetZEROPoint</CODE> function.</li> 59 60 </TD> 61 </TR> 62 63 64 <TR> 65 <TH>simple_wbc</TH> 66 <TD><b>Demo description:</b><br> 67 This demo easily shows how to control the Wii Balance Board. 68 The code is a simplified version of the <I>handling_weight</I> demo.<br> 69 The values of the four balance sensors are converted to a weight value (in kilograms), and the total value is output to the console. 70 (Nothing appears on the TV screen.)<br> 71 72 <br><br> 73 <b>Operations Described:</b><br> 74 75 <table> 76 <tr><td>A Button</td><td>:Sets the zero point. In this demo, the output values of the Wii Balance Board are set for the <CODE>WBCSetZEROPoint</CODE> function as is. 77 </td></tr> 78 </table> 79 </TD> 80 </TR> 81 82 <TR> 83 <TH>balance</TH> 84 <TD><b>Demo description:</b><br> 85 This is the <CODE>simple_wbc</CODE> demo with an added center of gravity display.<br> 86 The values of the four balance sensors are converted to a weight value (in kilograms), and the total value is output to the console. 87 (Nothing appears on the TV screen.)<br> 88 89 <br><br> 90 <b>Operations Described:</b><br> 91 92 <table> 93 <tr><td>A Button</td><td>:Sets the zero point. 94 In this demo, the output values of the Wii Balance Board are set for the <CODE>WBCSetZEROPoint</CODE> function as is.</td></tr> 95 </table> 96 </TD> 97 </TR> 98 99 100 </TBODY> 101</TABLE> 102 103<H2>See Also</H2> 104<P class="reference"> 105<A href="./toc_private.html" target="contents"><CODE>WBC Functions</CODE></A> 106</P> 107 108<H2>Revision History</H2> 109<P> 1102008/08/28 Revised terminology.<br>2008/02/26 Added the <CODE>simple_wbc</CODE> and <CODE>balance</CODE> demos.<br>2007/11/15 Initial version.<BR> 111</P> 112 113<hr><p>CONFIDENTIAL</p></body> 114</HTML> 115