Page 214 - Hacking Roomba
P. 214

Chapter 10 — Using Roomba as an Input Device                  195



                             tilting Roomba left and right you can get a few bits of resolution by combining the cliff sensors
                             with the wheeldrop sensors. Figure 10-5 shows how Roomba can be used to detect variations
                             in tilt. The scale of the tilt is a bit exaggerated in the diagram to demonstrate the effect. Since
                             the theremin glides from one pitch to the next, having relative pitch adjustments via tilting
                             actually works pretty well.















                             FIGURE 10-4: Leon Theremin
                             and his musical instrument




                                                         No sensors triggered
                                                         Pitch change = 0





                                                         Left cliff sensor triggered
                                                         Pitch change = +1







                                                         Left cliff & front left cliff sensors triggered
                                                         Pitch change = +2







                                                         Left cliff & front left cliff & left wheeldrop triggered
                                                         Pitch change = +3





                             FIGURE 10-5: Tilting Roomba for pitch control
   209   210   211   212   213   214   215   216   217   218   219