Rotary: Added C source

Added C source for rotary angle sensor

    * Renamed all files from groverrotary to rotary
    * Replaced all instances of groverrotary with rotary
    * Added C source for rotary angle sensor
    * Updated all CMake files

Signed-off-by: Sisinty Sasmita Patra <sisinty.s.patra@intel.com>
This commit is contained in:
Sisinty Sasmita Patra
2016-09-12 10:19:10 -07:00
committed by Noel Eck
parent b266f87450
commit bded0a07d9
21 changed files with 350 additions and 43 deletions

View File

@ -47,7 +47,7 @@ add_example(GroveMQ9 gas)
add_example(O2Example o2)
add_example(GroveQTouch at42qt1070)
add_example(RelaySample grove)
add_example(GroveRotarySample grove)
add_example(RotarySample grove)
add_example(GROVESCAMSample grovescam)
add_example(SlideSample slide)
add_example(GroveSpeakerSample grovespeaker)

View File

@ -22,11 +22,11 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
public class GroveRotarySample {
public class RotarySample {
public static void main(String[] args) throws InterruptedException {
// ! [Interesting]
upm_grove.GroveRotary knob = new upm_grove.GroveRotary(0);
upm_grove.Rotary knob = new upm_grove.Rotary(0);
while (true) {
float abs_value = knob.abs_value(); // Absolute raw value