Skip to content

Commit

Permalink
Merge pull request #1701 from Love4yzp/docusaurus-version
Browse files Browse the repository at this point in the history
Improved document formatting
  • Loading branch information
limengdu authored Sep 23, 2024
2 parents 9293054 + ac5cf7d commit 3c5ccef
Show file tree
Hide file tree
Showing 27 changed files with 76 additions and 77 deletions.
8 changes: 4 additions & 4 deletions docs/Seeed_Elderly/Artik/Eagleye_530s.md
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ For more information, such as play with Alexa/DuerOS, please refer to [ReSpeaker

- Start recording using the Command Line

```Python
```python
arecord -D plughw:1,0 -f cd test.wav # record, please use the arecord -l to check the card and hardware first
aplay -D plughw:1,0 -f cd test.wav # play, please use the aplay -l to check the card and hardware first
arecord -D plughw:1,0 -f cd |aplay -D plughw:1,0 -f cd # record and play at the same time
Expand All @@ -875,7 +875,7 @@ arecord -D plughw:1,0 -f cd |aplay -D plughw:1,0 -f cd # record and play at the

- Step 1, We need to run the following script to get the device index number of Mic Array:

```Python
```python
apt install python-pip
pip install pyaudio
cd ~
Expand All @@ -884,7 +884,7 @@ arecord -D plughw:1,0 -f cd |aplay -D plughw:1,0 -f cd # record and play at the

- Step 2, copy below code and paste on [get_index.py](https://files.seeedstudio.com/wiki/Eagleye_530s/res/get_index.py).

```Python
```python
import pyaudio

p = pyaudio.PyAudio()
Expand All @@ -910,7 +910,7 @@ Input Device id 8 - default

- Step 5, change `RESPEAKER_INDEX = 2` to index number. Run python script [record.py](https://files.seeedstudio.com/wiki/Eagleye_530s/res/record.py) to record a speech.

```Python
```python
import pyaudio
import wave

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Here is an example also based on Pyaudio:

First, you need to run the following script to get the device index number of Mic Array:

```Python
```python
import pyaudio

p = pyaudio.PyAudio()
Expand All @@ -96,7 +96,7 @@ for i in range(0, numdevices):

Then, change `RESPEAKER_INDEX = 1` to your index number. Run the script to record a speech.

```Python
```python
import pyaudio
import wave

Expand Down Expand Up @@ -158,7 +158,7 @@ Note that if you are using the lastest *raw version*, you could only control the

And here is an python example :

```Python
```python
#!/usr/bin/env python

import respeaker.usb_hid as usb_hid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ cd pixel_ring/pixel_ring

- Step 2. Create a [led_control.py](https://files.seeedstudio.com/wiki/ReSpeaker_Mic_Array_V2/res/led_control.py) with below code and run 'python led_control.py'

```Python
```python
from usb_pixel_ring_v2 import PixelRing
import usb.core
import usb.util
Expand Down Expand Up @@ -441,7 +441,7 @@ We use [PyAudio python library](https://people.csail.mit.edu/hubert/pyaudio/) to

**For Linux:** We can use below commands to record or play the voice.

```Python
```python
arecord -D plughw:1,0 -f cd test.wav # record, please use the arecord -l to check the card and hardware first
aplay -D plughw:1,0 -f cd test.wav # play, please use the aplay -l to check the card and hardware first
arecord -D plughw:1,0 -f cd |aplay -D plughw:1,0 -f cd # record and play at the same time
Expand All @@ -451,15 +451,15 @@ We also can use python script to extract voice.

- Step 1, We need to run the following script to get the device index number of Mic Array:

```Python
```python
sudo pip install pyaudio
cd ~
nano get_index.py
```

- Step 2, copy below code and paste on [get_index.py](https://files.seeedstudio.com/wiki/ReSpeaker_Mic_Array_V2/res/get_index.py).

```Python
```python
import pyaudio

p = pyaudio.PyAudio()
Expand All @@ -481,7 +481,7 @@ Input Device id 2 - ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)

- Step 5, change `RESPEAKER_INDEX = 2` to index number. Run python script [record.py](https://files.seeedstudio.com/wiki/ReSpeaker_Mic_Array_V2/res/record.py) to record a speech.

```Python
```python
import pyaudio
import wave

Expand Down
10 changes: 5 additions & 5 deletions docs/Seeed_Elderly/reSpeaker/ReSpeaker-USB-Mic-Array.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ cd pixel_ring/pixel_ring

- Step 2. Create a [led_control.py](https://files.seeedstudio.com/wiki/ReSpeaker_Mic_Array_V2/res/led_control.py) with below code and run 'python led_control.py'

```Python
```python
from usb_pixel_ring_v2 import PixelRing
import usb.core
import usb.util
Expand Down Expand Up @@ -418,7 +418,7 @@ We use [PyAudio python library](https://people.csail.mit.edu/hubert/pyaudio/) to

**For Linux:** We can use below commands to record or play the voice.

```Python
```python
arecord -D plughw:1,0 -f cd test.wav # record, please use the arecord -l to check the card and hardware first
aplay -D plughw:1,0 -f cd test.wav # play, please use the aplay -l to check the card and hardware first
arecord -D plughw:1,0 -f cd |aplay -D plughw:1,0 -f cd # record and play at the same time
Expand All @@ -428,15 +428,15 @@ We also can use python script to extract voice.

- Step 1, We need to run the following script to get the device index number of Mic Array:

```Python
```python
sudo pip install pyaudio
cd ~
nano get_index.py
```

- Step 2, copy below code and paste on [get_index.py](https://files.seeedstudio.com/wiki/ReSpeaker_Mic_Array_V2/res/get_index.py).

```Python
```python
import pyaudio

p = pyaudio.PyAudio()
Expand All @@ -458,7 +458,7 @@ Input Device id 2 - ReSpeaker 4 Mic Array (UAC1.0): USB Audio (hw:1,0)

- Step 5, change `RESPEAKER_INDEX = 2` to index number. Run python script [record.py](https://files.seeedstudio.com/wiki/ReSpeaker_Mic_Array_V2/res/record.py) to record a speech.

```Python
```python
import pyaudio
import wave

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@ We use [PyAudio python library](https://people.csail.mit.edu/hubert/pyaudio/) to

- Step 1, We need to run the following script to get the device index number of 6 Mic pi hat:

```Python
```python
sudo pip install pyaudio
cd ~
nano get_index.py
```

- Step 2, copy below code and paste on get_index.py.

```Python
```python
import pyaudio

p = pyaudio.PyAudio()
Expand All @@ -393,7 +393,7 @@ Input Device id 2 - seeed-8mic-voicecard: - (hw:1,0)

- Step 5, change `RESPEAKER_INDEX = 2` to index number. Run python script record.py to record a speech.

```Python
```python
import pyaudio
import wave

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ You can do this yourself by powering the pins one by one, or using a library suc

1. Upload the following code to Thonny and run it.

```Python
```python
from gpiozero import Button, LED
from time import sleep

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ python grove_electricity_sensor.py

Here is the code of example:

```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Electricity Sensor (https://www.seeedstudio.com/wiki/Grove_-_Electricity_Sensor)
Expand Down
2 changes: 1 addition & 1 deletion docs/Sensor/Grove/Grove_Accessories/Time/Grove-RTC.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ python grove_i2c_rtc.py

Here is the code

```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove I2C RTC (https://www.seeedstudio.com/wiki/Grove_-_RTC)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ python grove_6axis_accel_compass_example.py


Here is the code of example:
```Python
```python
#!/usr/bin/env python
#
# GrovePi example for using the Grove - 6-Axis Accelerometer&Compass v2.0(https://www.seeedstudio.com/depot/Grove-6Axis-AccelerometerCompass-v20-p-2476.html)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ python high_accuracy_barometer_example.py

Here is the code :

```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove - Barometer (High-Accuracy)(https://www.seeedstudio.com/depot/Grove-Barometer-HighAccuracy-p-1865.html
Expand Down
4 changes: 2 additions & 2 deletions docs/Sensor/Grove/Grove_Sensors/Gas/Grove-Gas_Sensor-MQ2.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ python grove_gas_sensor.py

Here is code of grove_gas_sensor.py:

```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Gas Sensor
Expand Down Expand Up @@ -527,7 +527,7 @@ python grove_gas_sensor.py
```

Here is code of grove_gas_sensor.py:
```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Gas Sensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ python grove_flame_sensor.py

Here is the code of example:

```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove Flame Sensor (https://www.seeedstudio.com/wiki/Grove_-_Flame_Sensor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ pip3 install --upgrade seeed-python-si114x

**Software**

```Python
```python
import seeed_si114x
import time
import signal
Expand Down
47 changes: 23 additions & 24 deletions docs/Sensor/Grove/Grove_Sensors/Proximity/Grove-Gesture_v1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,28 @@ keywords:
image: https://wiki.seeedstudio.com/Grove-Gesture_v1.0/
slug: /Grove-Gesture_v1.0
last_update:
date: 01/05/2022
date: 09/23/2024
author: gunengyu
---

![](https://files.seeedstudio.com/wiki/Grove_Gesture_V_1.0/img/400px-Gesture_sensor_3.png)
<div style={{ textAlign: 'center' }}>
<img
src="https://files.seeedstudio.com/wiki/Grove_Gesture_V_1.0/img/400px-Gesture_sensor_3.png"
style={{ width: 480, height: 'auto', "border-radius": '12.8px' }}
/>
</div>

<div class="get_one_now_container" style={{textAlign: 'center'}}>
<a class="get_one_now_item" href="https://www.seeedstudio.com/Grove-Gesture-p-2463.html">
<strong><span><font color={'FFFFFF'} size={"4"}> Get One Now 🖱️</font></span></strong>
</a>
</div><br></br>

The sensor on Grove - Gesture is PAJ7620U2 that integrates gesture recognition function with general I2C interface into a single chip. It can recognize 9 basic gestures, and these gestures information can be simply accessed via the I2C bus.

Application: You can use Gesture as an input device to control another grove, or a computer, mobile phone, smart car, robot, and more with a simple swipe of your hand.

<iframe width={800} height={450} src="https://www.youtube.com/embed/i9hnRPuCx-Q" frameBorder={0} allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
<p style={{}}><a href="https://www.seeedstudio.com/Grove-Gesture-p-2463.html" target="_blank"><img src="https://files.seeedstudio.com/wiki/Seeed-WiKi/docs/images/300px-Get_One_Now_Banner-ragular.png" /></a></p>
<iframe class="youtube-video-r" src="https://www.youtube.com/embed/i9hnRPuCx-Q" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

## Features

Expand Down Expand Up @@ -106,7 +115,7 @@ Software Installation.
- **Step 4.** Start the Arduino IDE, Let's try the up/down demo.
- **Step 5.** Copy below code and paste to arduino IDE.

```cpp
```cpp showLineNumbers
/*
The following simple demo will show you a very easy application: When you move up, the red led will be turned on, otherwise the red led will be turned off.
*/
Expand Down Expand Up @@ -138,7 +147,7 @@ void loop()

- **Step 8.** Let's try the 9 gestures by select **File->Example->Grove_Gesture->paj7620_9gestures**, then select Seeeduino v4 as board manager and correct COM port.

```cpp
```cpp title="paj7620_9gestures" showLineNumbers
#include <Wire.h>
#include "paj7620.h"

Expand Down Expand Up @@ -281,7 +290,7 @@ void loop()
- **Step 9.** Click upload and open the Serial Monitor port.
- **Step 10.** This example can recognize 9 gestures and output the result, including move up, move down, move left, move right, move forward, move backward, circle-clockwise, circle-counter clockwise, and wave. Let's try and see COM port output as below.

```cpp
```shell
PAJ7620U2 TEST DEMO: Recognize 9 gestures.
INIT SENSOR...
Addr0 =20, Addr1 =76
Expand Down Expand Up @@ -360,24 +369,21 @@ Upload the program to your Arduino/Seeeduino.
- **Step 1**. Follow [Setting Software](https://wiki.seeedstudio.com/Grove_Base_Hat_for_Raspberry_Pi/#installation) to configure the development environment.
- **Step 2**. Download the source file by cloning the grove.py library.

```
```shell
cd ~
git clone https://github.com/Seeed-Studio/grove.py
```

- **Step 3**. Excute below commands to run the code.

```
```shell
cd grove.py/grove
python3 grove_gesture_sensor.py
```

Following is the grove_gesture_sensor.py code.

```python
```python title="grove_gesture_sensor.py" showLineNumbers
import time,sys
import RPi.GPIO as GPIO
from grove.i2c import Bus
Expand Down Expand Up @@ -900,8 +906,7 @@ if __name__ == "__main__":
If everything goes well, you will be able to see the following result
:::

```python
```shell
pi@raspberrypi:~/grove.py/grove $ python3 grove_gesture_sensor.py
wake-up finish.
Paj7620 initialize register finished.
Expand All @@ -912,12 +917,6 @@ Backward
Right
Up
Down
^CTraceback (most recent call last):
File "grove_gesture_sensor.py", line 555, in <module>
time.sleep(.1)
KeyboardInterrupt
```

You can quit this program by simply press ++ctrl+c++.
Expand Down Expand Up @@ -962,7 +961,7 @@ python3 gesture_value.py

Here is the code of gesture_value.py

```Python
```python
#!/usr/bin/env python
#
# GrovePi Example for using the Grove - Gesture Sensor v1.0(https://www.seeedstudio.com/depot/Grove-Gesture-p-2463.html)
Expand Down Expand Up @@ -1030,7 +1029,7 @@ while True:

- **Step 4.** Here is the screen output.

```cpp
```cpp showLineNumbers
pi@raspberrypi:~/Dexter/GrovePi/Software/Python/grove_gesture_sensor $ python3 gesture_value.py
wake-up finish.
Paj7620 initialize register finished.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ pip3 install --upgrade seeed-python-Ds18b20

#### Software

```Python
```python
import seeed_ds18b20
import time

Expand Down
Loading

0 comments on commit 3c5ccef

Please sign in to comment.