zephyr/samples/basic/servo_motor
Kumar Gala e547533435 samples: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:53 -05:00
..
src samples: convert to using newly introduced integer sized types 2017-04-21 09:53:53 -05:00
Makefile samples: basic: Move pwm driver samples 2017-01-11 15:15:31 +00:00
README.rst doc: add labels to basic sample docs 2017-04-04 19:51:47 +00:00
prj.conf samples: basic: Move pwm driver samples 2017-01-11 15:15:31 +00:00
testcase.ini samples: basic: Move pwm driver samples 2017-01-11 15:15:31 +00:00

README.rst

.. _servo-motor-sample:

PWM: Servo motor
################

Overview
********

This is a sample app which drives a servo motor using
PWM.

This app is targeted for servo motor ROB-09065. With the
PWM control signal, the servo motor can rotate to any
angle between 0 and 180 degrees. The corresponding PWM
pulse width is between 700 micro seconds and 2300 micro
seconds. The motor is programmed to rotate back and forth
in the 180 degree range.

Since different servo motors may require different PWM
pulse width, you may need to modify the pulse width in
the app if you are using a different servo motor.

Wiring
******

Arduino 101 and Quark D2000 CRB
===============================

You will need to connect the motor's red wire to 5v,
the black wire to ground and the white wire to PWM 0 via
the shield.

Building and Running
********************

This sample can be built for multiple boards, in this example we will build it
for the arduino_101 board:

.. code-block:: console

   $ cd samples/basic/servo_motor
   $ make BOARD=arduino_101
   $ make BOARD=arduino_101 flash