User Tools

Site Tools


marvin:ecp5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
marvin:ecp5 [2009/01/29 10:09] devamarvin:ecp5 [2009/01/29 10:58] (current) rieper
Line 16: Line 16:
   * Make PC bluetooth application read from keyboard arrows to determine control direction.   * Make PC bluetooth application read from keyboard arrows to determine control direction.
  
-=====The protocol=====+=====Theory==== 
 +====The Protocol====
 {{ :marvin:bluetoothlogo.png |The Bluetooth Logo}} {{ :marvin:bluetoothlogo.png |The Bluetooth Logo}}
  
Line 37: Line 38:
 As it can be seen from the video, Marvin is not exactly reacting real-time to the control changes. This is due to the way the BTControl has been implemented, but also because the tilt reference must be incremented gradually, but still has to reach a certain level before an actual forward or backward motion can be seen. Making this incrementation more rapid (and thereby making the reaction faster) will cause Marvin to nosedive. As it can be seen from the video, Marvin is not exactly reacting real-time to the control changes. This is due to the way the BTControl has been implemented, but also because the tilt reference must be incremented gradually, but still has to reach a certain level before an actual forward or backward motion can be seen. Making this incrementation more rapid (and thereby making the reaction faster) will cause Marvin to nosedive.
  
-=====The BTControl class=====+=====Implementation===== 
 +====The BTControl Class====
 {{ :marvin:bluetooth.png?450 }} {{ :marvin:bluetooth.png?450 }}
 Bluetooth control behaviour. It reads integers from a bluetooth input stream, interpreting them as keycodes. Bluetooth control behaviour. It reads integers from a bluetooth input stream, interpreting them as keycodes.
Line 96: Line 98:
 </code> </code>
  
-On the PC, a window (JFrame) captures keyboard input and redirects their keycode values to the bluetooth stream:+====The PCController Class==== 
 +On the PC, we use a window (JFrame) to capture keyboard input and redirect their keycode values to the bluetooth stream.
 <code java> <code java>
 NXTComm nxtComm = NXTCommFactory.createNXTComm(NXTCommFactory.BLUETOOTH); NXTComm nxtComm = NXTCommFactory.createNXTComm(NXTCommFactory.BLUETOOTH);
marvin/ecp5.1233220145.txt.gz · Last modified: 2009/01/29 10:09 by deva