Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new sensors samples #54

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/thing/samples/sensor-samples/dht.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dht
===

Overview
--------

The dht example reads ambient temperature and relative humidity measured by a
DHT11 or DHT22 sensor. The purpose of this sample is to show how to use a
sensor that is already covered by Zephyr sensors library.

-------------------------------------------------------------------------------

Requirements
------------

The demo assumes that sensor data pin is connected to the 1.15 pin.
Make sure to use VDD OUT as the positive reference and GND as the negative
reference.
DHT11/22 datasheet recommends the use of a 10k resistor between VCC and data
pin.

-------------------------------------------------------------------------------

.. include:: ../thing-sample-body.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
gy-251-i2c-accelerometer-and-gyroscope
======================================

Overview
--------

The GY-251 example measures acceleration and angular velocity with 3 degrees
of liberty each. The purpose of this sample is to show how to use a sensor
that uses I2C communication protocol.

-------------------------------------------------------------------------------

Requirements
------------

The demo assumes that GY-251 SCL pin is connected to the 0.27 pin and SDA pin
is connected to the 0.26 pin.
Make sure to use VDD OUT (or 5V output if using DK board) as the positive
reference and GND as the negative reference.

-------------------------------------------------------------------------------

.. include:: ../thing-sample-body.rst
26 changes: 26 additions & 0 deletions doc/thing/samples/sensor-samples/pwm.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pwm
===

Overview
--------

The pwm example blinks a led using pwm. The purpose of this is sample is to
show how to use pwm in Zephyr.

-------------------------------------------------------------------------------

Requirements
------------

The demo assumes that the positive terminal of a led is connected to the pin
specified down below:

- 0.13 pin (for KNoT DK and Dongle)

KNoT DK already has an on board led connected to 0.13 pin.
The negative terminal of the led should be connected to a 220 ohms resistor and
the other resistor terminal should be connected to board GND.

-------------------------------------------------------------------------------

.. include:: ../thing-sample-body.rst