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>WPAD 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><CODE>$REVOLUTION_SDK_ROOT/build/demos/wbcdemo</CODE></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>Move 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 <code>.elf</code> 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 <code>.elf</code> file as an argument.</li> 25<li>Launch <code>$CWFOLDER/bin/IDE.exe</code>, then drag and drop the <code>.elf</code> file.</li> 26<li>If the <code>.elf</code> file is associated with <code>$CWFOLDER/bin/IDE.exe</code>, double-click the <code>.elf</code> file.</li> 27</ul> 28 29</ul> 30 31<H2>Description</H2> 32<TABLE border="1" cellpadding="3" cellspacing="0.1"> 33 <TBODY> 34 35 36 37 38 39 <TR> 40<TD><EM><STRONG><CODE>handling_weight</CODE></STRONG></EM></TD> 41<TD><b>Demo description:</b><br> This demo consists of <CODE>handling.c</CODE> from <CODE>wpadHealthdemo</CODE>, with weight conversion processing added.<br> It converts the values from the four balance sensors on the Wii Balance Board legs to weight (kg) and displays them.<br><br> The weight values shown on the right of the screen have the following meanings:<br><br> 42 <table> 43<tr><td>Wt:</td><td>Average value over two seconds.</td></tr> 44<tr><td>Wt(TGC):</td><td>Average value over two seconds, corrected for temperature and gravitational acceleration.</td></tr> 45 </table> 46<br><br> <b>Operations Described:</b> 47 <table> 48<tr><td>START:</td><td>Sets the zero point. Takes the average of the raw WBC values over a two-second period and uses the <CODE>WBCSetZEROPoint</CODE> function to set it as the zero point.</td></tr> 49<tr><td>+Control Pad Left:</td><td>Gets the average weight value. Takes the average value over two seconds.</td></tr> 50 </table> 51<br><br> <b>Caution:</b><br> 52<li>Because of balance sensor characteristics, you must set the zero point (press START when there is nothing on Wii Balance Board accessory) every time you want to accurately measure weight.</li> 53 54<li>In the demo, temperature is updated immediately before the zero point is set. The temperature update command is executed inside the <CODE>WBCSetZEROPoint</CODE> function.</li> 55 56 </TD> 57 </TR> 58 59 60 <TR> 61<TD><EM><STRONG><CODE>simple_wbc</CODE></STRONG></EM></TD> 62<TD><b>Demo description: </b><br> This demo clearly shows how to control Wii Balance Board accessory. The code is a simplified version of the <I>handling_weight</I> demo.<br>Values for the four balance sensors are converted to weight (kg) and the total is displayed on the Wii console output. (Nothing appears on the TV screen.)<br> 63 64<br><br> <b>Operations Described:</b><br> 65 66 <table> 67<tr><td>A Button:</td><td>Sets the zero point. In this demo, the output values of Wii Balance Board accessory are set unchanged by the <CODE>WBCSetZEROPoint</CODE> function.</td></tr> 68 </table> 69 </TD> 70 </TR> 71 72 <TR> 73<TD><EM><STRONG><CODE>balance</CODE></STRONG></EM></TD> 74<TD><b>Demo description:</b><br> This is the <CODE>simple_wbc</CODE> demo with an added center of gravity display. <br> Values for the four balance sensors are converted to weight (kg) and the total is displayed on the Wii console. (Nothing appears on the TV screen.)<br> 75 76<br><br> <b>Operations Described:</b><br> 77 78 <table> 79<tr><td>A Button:</td><td>Sets the zero point. In this demo, the output values of Wii Balance Board accessory are set unchanged by the <CODE>WBCSetZEROPoint</CODE> function.</td></tr> 80 </table> 81 </TD> 82 </TR> 83 84 85 </TBODY> 86</TABLE> 87 88<H2>See Also</H2> 89<P><A href="./toc_private.html" target="contents"><CODE>WBC Functions</CODE></A></P> 90 91<H2>Revision History</H2> 92<P> 932008/02/26 Added the <CODE>simple_wbc</CODE> and <CODE>balance</CODE> demos.<br>2007/11/15 Initial version.<BR> 94</P> 95 96<hr><p>CONFIDENTIAL</p></body> 97</HTML> 98