Skip to content

Commit

Permalink
rtd+
Browse files Browse the repository at this point in the history
  • Loading branch information
cqusers committed Aug 13, 2021
1 parent 3366937 commit eae52ea
Show file tree
Hide file tree
Showing 40 changed files with 1,151 additions and 11 deletions.
21 changes: 19 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
extensions = ['sphinx.ext.autosectionlabel']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -56,7 +55,25 @@

html_js_files = [
'https://ezblock.cc/readDocFile/topHead.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/ace.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/ext-language_tools.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/theme-chrome.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/mode-python.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/mode-sh.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/monokai.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/xterm.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/FitAddon.js',
'https://ezblock.cc/readDocFile/readTheDoc/src/js/readTheDocIndex.js',
]
html_css_files = [
'https://ezblock.cc/readDocFile/topHead.css',
'https://ezblock.cc/readDocFile/readTheDoc/src/css/index.css',
'https://ezblock.cc/readDocFile/readTheDoc/src/css/xterm.css',
]

html_static_path = ['_static']

language = 'en'
locale_dirs = ['locale/']

gettext_compact = False
11 changes: 10 additions & 1 deletion docs/source/download_the_code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Download the Code

Change directory to */home/pi*

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/
Expand All @@ -14,7 +18,12 @@ Change directory to */home/pi*

Clone the repository from github (C code and python code)

.. note::
.. raw:: html

<run></run>

.. code-block::
git clone https://github.com/sunfounder/SunFounder_SensorKit_for_RPi2
The advantage of this method is that, you can download the latest code
Expand Down
11 changes: 11 additions & 0 deletions docs/source/faq.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FAQ
============

C code is not working?
----------------------------------


* Check your wiring for problems.
* Check if the code is reporting errors.
* Has the code been compiled before running.
* If all the above 3 conditions are OK, it may be that your wiringPi version (2.50) is not compatible with your Raspberry Pi 4B and above, refer to :ref:`WiringPi` to manually upgrade it to version 2.52.
8 changes: 8 additions & 0 deletions docs/source/have_no_screen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ disabled. You need to enable it in config.

Input the following command:

.. raw:: html

<run></run>

.. code-block::
sudo raspi-config
Expand Down Expand Up @@ -428,6 +432,10 @@ Login to Raspberry Pi by using SSH.

Input the following instructions to install XRDP.

.. raw:: html

<run></run>

.. code-block::
sudo apt-get update
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ For NON-TECH questions like order and shipment issues, please send an email to s
**Content**

.. toctree::
:maxdepth: 3
:maxdepth: 2

components
what_we_need
Expand Down Expand Up @@ -61,6 +61,7 @@ For NON-TECH questions like order and shipment issues, please send an email to s
lesson_34
lesson_35
appendix
faq

Copyright Notice
--------------------------
Expand Down
29 changes: 29 additions & 0 deletions docs/source/lesson_1.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Lesson 1 Dual-Color LED
=======================


**Introduction**

A dual-color light emitting diode (LED) is capable of emitting two
Expand Down Expand Up @@ -66,22 +67,38 @@ The schematic diagram of the module is as shown below:

**Step 2:** Change directory.

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/SunFounder_SensorKit_for_RPi2/C/01_dule_color_led/
**Step 3:** Compile.

.. raw:: html

<run></run>

.. code-block::
gcc dule_color_led.c -lwiringPi -lpthread
**Step 4:** Run.

.. raw:: html

<run></run>

.. code-block::
sudo ./a.out
.. note::

If it does not work after running, please refer to :ref:`C code is not working?`

**Code**

.. code-block:: c
Expand Down Expand Up @@ -139,18 +156,30 @@ The schematic diagram of the module is as shown below:

**Step 2:** Change directory.

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/SunFounder_SensorKit_for_RPi2/Python/
**Step 3:** Run.

.. raw:: html

<run></run>

.. code-block::
sudo python3 01_dule_color_led.py
**Code**

.. raw:: html

<run></run>

.. code-block:: python
#!/usr/bin/env python3
Expand Down
28 changes: 28 additions & 0 deletions docs/source/lesson_10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,38 @@ The schematic diagram of the module is as shown below:

**Step 2:** Change directory.

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/SunFounder_SensorKit_for_RPi2/C/10_active_buzzer/
**Step 3:** Compile.

.. raw:: html

<run></run>

.. code-block::
gcc active_buzzer.c -lwiringPi
**Step 4:** Run.

.. raw:: html

<run></run>

.. code-block::
sudo ./a.out
.. note::

If it does not work after running, please refer to :ref:`C code is not working?`

**Code**

.. code-block:: c
Expand Down Expand Up @@ -115,18 +131,30 @@ The schematic diagram of the module is as shown below:

**Step 2:** Change directory.

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/SunFounder_SensorKit_for_RPi2/Python/
**Step 3:** Run.

.. raw:: html

<run></run>

.. code-block::
sudo python3 10_active_buzzer.py
**Code**

.. raw:: html

<run></run>

.. code-block:: python
#!/usr/bin/env python3
Expand Down
28 changes: 28 additions & 0 deletions docs/source/lesson_11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,38 @@ The schematic diagram of the module is as shown below:

**Step 2:** Change directory.

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/SunFounder_SensorKit_for_RPi2/C/11_reed_switch/
**Step 3:** Compile.

.. raw:: html

<run></run>

.. code-block::
gcc reed_switch.c -lwiringPi
**Step 4:** Run.

.. raw:: html

<run></run>

.. code-block::
sudo ./a.out
.. note::

If it does not work after running, please refer to :ref:`C code is not working?`

**Code**

.. code-block:: c
Expand Down Expand Up @@ -165,18 +181,30 @@ The schematic diagram of the module is as shown below:

**Step 2:** Change directory.

.. raw:: html

<run></run>

.. code-block::
cd /home/pi/SunFounder_SensorKit_for_RPi2/Python/
**Step 3:** Run.

.. raw:: html

<run></run>

.. code-block::
sudo python3 11_reed_switch.py
**Code**

.. raw:: html

<run></run>

.. code-block:: python
#!/usr/bin/env python3
Expand Down

0 comments on commit eae52ea

Please sign in to comment.