DreamForce 2013 Mini-Hack Challenge Project

Dependencies:   ADXL345 USBDevice filter mbed

Fork of df-minihack-slingshot by Doug Anson

README.txt

Committer:
ansond
Date:
2013-11-19
Revision:
9:3af90289b117
Parent:
7:991749350315

File content as of revision 9:3af90289b117:

Instructions:

VERY IMPORTANT NOTE: 

Please be VERY CAREFUL with the slingshot "bands" - they are easily subject to breaking.
There is a tunable in the source code called "mouse_scale" that can be used to scale
the band resistance variation to more easily enable a full "deflection" of the slingshot
in the game. The band itself will "feel" that it is pretty much fully stretched - please
DO NOT over stretch the band beyond this limit!  Thanks and have fun!!

1). Complete the “hands-on” exercises first
    - Required to get setup with an mbed account and the compiler environment

2). Import the “df-2013-minihack-slingshot” project into your mbed project workspace
    - Be sure to add and make current the “mbed LPC11U24” board as the current board 
      to compile to. 

3). Examine main.cpp in your project
    - In the top of the file, examine the “Mini-hack challenge” statement 
    - You will need to update potentiometer_value_to_degrees() per the instructions. 
      The function starts at or about line 129. 

A successful implementation will:
    - Calculate a reasonable approximation of the sling angle to the sling body
    - Utilize the sling angle to the overall angle that is used for the firing trajectory.

Additional Details/Hints:
    - If  slingshot band is exactly 90° (   = 0°)   to the slingshot body then the original 
      slingshot mouse location method may be used
      
    - If the slingshot band is not 90° to the slingshot body, then further refinement of the 
      mouse position should be made through calculating the relative angle between the 
      slingshot body and the slingshot band using the potentiometer
      
    - The relative angle is estimated by mapping ranges of values of the potentiometer to a 
      degree range. A median potentiometer value denotes that the sling band is 90 degrees 
      to the sling body.

References:
    - Original MBED slingshot cookbook:  http://mbed.org/cookbook/Slingshot
    - Project Source:  http://mbed.org/teams/MBED_DEMOS/code/df-2013-minihack-slingshot/ 
    - Completed Code: http://mbed.org/teams/MBED_DEMOS/code/df-2013-minihack-slingshot-complete/