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> 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>
37          <table>
38<tr><td>Wt</td><td>Average value over two seconds</td></tr>
39<tr><td>Wt(TGC)</td><td>Average value over two seconds, corrected for temperature and gravitational acceleration</td></tr>
40          </table>
41<br><br> <b>Operations Described:</b>
42          <table>
43<tr><td>START</td><td>Sets the zero point. Gets the raw WBC values over a duration of two seconds and sets the average value to the <CODE>WBCSetZEROPoint</CODE> function.</td></tr>
44<tr><td>+Control Pad Left Button</td><td>Gets the average weight value. Takes the average value over two seconds.</td></tr>
45          </table>
46<br><br> <b>Caution:</b><br>
47<li>To take accurate weight measurements based on the characteristics of the balance sensors, you need to set the zero point every time you take a measurement (by pressing START with no weight placed on the WBC).</li>
48
49<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>
50
51      </TD>
52    </TR>
53
54
55    <TR>
56<TH>simple_wbc</TH>
57<TD><b>Demo description: </b><br> This demo clearly shows how to control the Wii Balance Board. 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>
58
59<br><br> <b>Operations Described:</b><br>
60
61         <table>
62<tr><td>A Button</td><td>Sets the zero point. In this demo, the output values from the Wii Balance Board are sent to the <CODE>WBCSetZEROPoint</CODE> function without any modification.</td></tr>
63          </table>
64      </TD>
65  </TR>
66
67    <TR>
68<TH>balance</TH>
69<TD><b>Demo description:</b><br> 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>
70
71<br><br> <b>Operations Described:</b><br>
72
73         <table>
74<tr><td>A Button</td><td>Sets the zero point. In this demo, the output values from the Wii Balance Board are sent to the <CODE>WBCSetZEROPoint</CODE> function without any modification.</td></tr>
75          </table>
76      </TD>
77  </TR>
78
79
80  </TBODY>
81</TABLE>
82
83<H2>See Also</H2>
84<P>
85<A href="./toc_private.html" target="contents">WBC Functions</A>
86</P>
87
88<H2>Revision History</H2>
89<P>
902008/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.
91</P>
92
93<hr><p>CONFIDENTIAL</p></body>
94</HTML>
95