Skip to content
Permalink
Browse files

doc: samples: cleanup board reference and layout

Cleanup references to boards in some of the example and use the same
boards through the examples. Other minot cleanups and make the text more
generic and not specific to certain boards.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jun 13, 2019
1 parent a6891e0 commit efb47ace39f29d91684de06e31f2ff1b5e8c6a7d
@@ -48,7 +48,7 @@ Building and Running
********************

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

.. zephyr-app-commands::
:zephyr-app: samples/basic/blink_led
@@ -30,7 +30,7 @@ flashed to a board as follows:

.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: arduino_101
:board: reel_board
:goals: build flash
:compact:

@@ -50,7 +50,7 @@ Building and Running
********************

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

.. zephyr-app-commands::
:zephyr-app: samples/basic/fade_led
@@ -8,14 +8,12 @@ Overview

This is a sample app which drives a RGB LED using PWM.

There are three LEDs of single color in a RGB LED. The
three LEDs will be driven by a pwm port each. The pulse
width for each pwm port will change from zero to period.
So, the brightness for each LED will change from dark to
max brightness in 11 steps. The three "for" loops (one
for each LED) will generate 1331 combinations and so,
1331 different colors. The whole process will repeat for
ever.
There are three single-color component LEDs in an RGB LED. Each component LED
is driven by a PWM port where the pulse width is changed from zero to a fusion
flicker threshold (the minimum flicker rate where the LED is perceived as being
steady), causing each component LED to step from dark to max brightness. Three
**for** loops (one for each component LED) generate a gradual range of color
changes from the RGB LED, and the sample repeats forever.

Wiring
******
@@ -28,14 +26,10 @@ connected to the K64 PWM.
Arduino 101
===========

You will need to connect the LED pins to PWM0, PWM1 and PWM2
on Arduino 101 via the shield. Depending on what kind of RGB
LED you are using, please connect the common cathode to the
ground or the common anode to Vcc. You need current limiting
resistor for each of the single color LEDs.

The sample app requires three PWM ports. So, it can not work
on Quark D2000 platform.
You will need to connect the LED pins to PWM0, PWM1 and PWM2 on Arduino 101 via
the shield. Depending on what kind of RGB LED you are using, please connect the
common cathode to the ground or the common anode to Vcc. You need current
limiting resistor for each of the single color LEDs.

Building and Running
********************
@@ -6,43 +6,37 @@ PWM: Servo motor
Overview
********

This is a sample app which drives a servo motor using
PWM.
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.
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.
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
******

BBC micro:bit
=============

You will need to connect the motor's red wire to external 5V, the
black wire to ground and the white wire to pad 0 on the edge
connector.
You will need to connect the motor's red wire to external 5V, the black wire to
ground and the white wire to pad 0 on the edge connector.

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.
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:
for the bbc_microbit board:

.. zephyr-app-commands::
:zephyr-app: samples/basic/servo_motor
@@ -14,7 +14,7 @@ Requirements

To use this sample, the following hardware is required:

* Arduino 101 or Quark D2000 Devboard
* A board with ADC support
* `Grove LCD module`_
* `Grove Base Shield`_ [Optional]

@@ -27,11 +27,6 @@ supports Arduino shields.
On some boards you will need to use 2 pull-up resistors (10k Ohm) between the
SCL/SDA lines and 3.3V.

.. note::

The I2C lines on Quark SE Sensor Subsystem does not have internal pull-up, so
external one is required.

Take note that even though SDA and SCL are connected to a 3.3V power source, the
Grove LCD VDD line needs to be connected to the 5V power line, otherwise
characters will not be displayed on the LCD (3.3V is enough to power just the
@@ -42,12 +37,12 @@ Building and Running
********************

This sample should work on any board that has I2C enabled and has an Arduino
shield interface. For example, it can be run on the Quark D2000 DevBoard as
shield interface. For example, it can be run on the FRDM K64F board as
described below:

.. zephyr-app-commands::
:zephyr-app: samples/grove/lcd
:board: quark_d2000_crb
:board: frdm_k64f
:goals: flash
:compact:

@@ -154,43 +154,3 @@ Use 'dmesg' to find the right USB device.

Once the binary is loaded into the FRDM board, press the RESET button.

Arduino 101
===========

Open a terminal window and type:

.. zephyr-app-commands::
:zephyr-app: samples/net/dns_resolve
:board: arduino_101
:goals: build
:compact:

To load the binary in the development board follow the steps
in :ref:`arduino_101`.

Open a terminal window and type:

.. code-block:: console

$ screen /dev/ttyUSB0 115200


Use 'dmesg' to find the right USB device.

Once the binary is loaded into the Arduino 101 board, press the RESET button.

The ENC28J60 module is an Ethernet device with SPI interface.
The following pins must be connected from the ENC28J60 device to the
Arduino 101 board:

=========== ===================================
Arduino 101 ENC28J60 (pin numbers on the board)
=========== ===================================
D13 SCK (1)
D12 SO (3)
D11 SI (2)
D10 CS (7)
D04 INT (5)
3.3V VCC (10)
GDN GND (9)
=========== ===================================
@@ -13,22 +13,13 @@ sensor in polling mode (without an interrupt trigger).
Building and Running
********************

This sample application uses an APDS9960 sensor connected to an Arduino 101 board
This sample application uses an APDS9960 sensor connected to a board
(for example as shown in this
`Sparkfun APDS9960 tutorial`_).
There are two processor cores (x86 and ARC) on the Arduino 101. You'll need to flash
both this sample's code on the ARC core (using the ``arduino101_sss`` board target),
and stub code on the x86 core (using the ``arduino_101`` board target), as shown below:

.. zephyr-app-commands::
:zephyr-app: samples/sensors/apds9960
:board: arduino_101_sss
:goals: flash
:compact:

.. zephyr-app-commands::
:zephyr-app: tests/booting/stub
:board: arduino_101
:board: reel_board
:goals: flash
:compact:

@@ -14,30 +14,21 @@ interrupt trigger).
Building and Running
********************

This sample application uses an BME280 sensor connected to an Arduino 101 board via I2C.
This sample application uses an BME280 sensor connected to a board via I2C.
Connect the sensor pins according to the connection diagram given in the `bme280 datasheet`_
at page 38.
There are two processor cores (x86 and ARC) on the Arduino 101. You will need to
flash both this sample's code on the ARC core (using the ``arduino101_sss`` board target),
and stub code on the x86 core (using the ``arduino_101`` board target), as shown below.


.. zephyr-app-commands::
:zephyr-app: samples/sensors/bme280
:board: arduino_101_sss
:goals: flash
:compact:

.. zephyr-app-commands::
:zephyr-app: tests/booting/stub
:board: arduino_101
:board: nrf52840_pca10056
:goals: flash
:compact:

Sample Output
=============
To check output of this sample , any serial console program can be used.
This example uses ``picocom`` on the serial port ``/dev/ttyUSB0``:
This example uses ``picocom`` on the serial port ``/dev/ttyACM0``:

.. code-block:: console

@@ -49,4 +40,4 @@ This example uses ``picocom`` on the serial port ``/dev/ttyUSB0``:
temp: 27.940000; press: 100.570269; humidity: 61.012695
temp: 27.950000; press: 100.570695; humidity: 61.002929

.. _bme280 datasheet: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME280-DS002.pdf
.. _bme280 datasheet: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME280-DS002.pdf
@@ -14,36 +14,27 @@ interrupt trigger).
Building and Running
********************

This sample application uses an BMM150 sensor connected to an Arduino 101 board via I2C.
This sample application uses an BMM150 sensor connected to a board via I2C.
Sensor has multiple pins so you need to connect according to connection diagram given in
`bmm150 datasheet`_ at page 41.
There are two processor cores (x86 and ARC) on the Arduino 101. You will need to
flash both this sample's code on the ARC core (using the ``arduino101_ss`` board target),
and stub code on the x86 core (using the ``arduino_101`` board target), as shown below.

.. code-block:: console

.. zephyr-app-commands::
:zephyr-app: samples/sensors/bmm150
:board: arduino_101_sss
:goals: flash
:compact:

.. zephyr-app-commands::
:zephyr-app: tests/booting/stub
:board: arduino_101
:board: nrf52840_pca10056
:goals: flash
:compact:

Sample Output
=============
To check output of this sample , any serial console program can be used.
Here I am using picocom program to open output. Check which tty device it is.
In my case it is ttyUSB0
In my case it is ttyACM0

.. code-block:: console

$ sudo picocom -D /dev/ttyUSB0
$ sudo picocom -D /dev/ttyACM0

.. code-block:: console

@@ -16,11 +16,9 @@ Zephyr project tree.
Requirements
************

This project requires an USB device driver,
which is available for Intel Quark* SE SoC based boards like
:ref:`arduino_101`.
For the Arduino 101 board you need a USB to 3.3V TTL serial cable.
Connect it to UART1 as described in
This project requires an USB device driver, which is available for Intel Quark*
SE SoC based boards like :ref:`arduino_101`. For the Arduino 101 board you need
a USB to 3.3V TTL serial cable. Connect it to UART1 as described in
:ref:`Connecting Serial Output section <arduino_101>`.

Building and Running
@@ -24,8 +24,8 @@ real usecase, implement applications based on the WebUSB API.
Building and flashing
*********************

Refer to :ref:`arduino_101`
for details on building and flashing the image into an Arduino 101.
Refer to :ref:`arduino_101` for details on building and flashing the image into
an Arduino 101.

Testing with latest Google Chrome on host
*****************************************

0 comments on commit efb47ac

Please sign in to comment.
You can’t perform that action at this time.