Skip to content

Commit

Permalink
Merge branch 'Seeed-Studio:docusaurus-version' into docusaurus-version
Browse files Browse the repository at this point in the history
  • Loading branch information
Carla-Guo authored Sep 30, 2024
2 parents 0d079ba + 3aa887c commit 46627df
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 3 deletions.
31 changes: 30 additions & 1 deletion docs/Network/Meshtastic_Network/T1000-E/sensecap_t1000_e.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,37 @@ last_update:
author: Jessie
---

## Video Tutorial

## Preparation


<div style={{ display: 'flex', justifyContent: 'center', gap: '20px' }}>
<div style={{ textAlign: 'center' }}>
<a href="https://www.youtube.com/watch?v=9sCHpWPSPcw" target="_blank" rel="noopener noreferrer">
<img src="https://img.youtube.com/vi/9sCHpWPSPcw/0.jpg" alt="Unboxing Setup" width="320" height="180" />
</a>
<center><b><font size="4。5">Unboxing Setup</font></b></center>
</div>

<div style={{ textAlign: 'center' }}>
<a href="https://www.youtube.com/watch?v=8p34S_9DDEQ" target="_blank" rel="noopener noreferrer">
<img src="https://img.youtube.com/vi/8p34S_9DDEQ/0.jpg" alt="Status Indicators" width="320" height="180" />
</a>
<center><b><font size="4.5">Status Indicators</font></b></center>
</div>

<div style={{ textAlign: 'center' }}>
<a href="https://www.youtube.com/watch?v=li6DTOeXK3M" target="_blank" rel="noopener noreferrer">
<img src="https://img.youtube.com/vi/li6DTOeXK3M/0.jpg" alt="Flash New Firmware" width="320" height="180" />
</a>
<center><b><font size="4.5">Flash New Firmware</font></b></center>
</div>
</div>




## Get Started

Download `Meshtastic` App:

Expand Down
4 changes: 3 additions & 1 deletion docs/Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_button.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ last_update:

User button is connected to XMOS XU316 and it's not programmed yet(reserve for futurn usage). If you want to use this button with XIAO ESP32S3, connect the `Usr` pin to the `D2` or `D3` pin.


:::tip
The mute button usage is the same.
:::

<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/usr.png" alt="pir" width={600} height="auto" /></p>

Expand Down
86 changes: 86 additions & 0 deletions docs/Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_rgb_test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
---
description: ReSpeaker Lite RGB test
title: RGB test
keywords:
- ReSpeaker
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /respeaker_rgb_test
last_update:
date: 9/27/2024
author: Jessie
---


### Functionality


The RGB light on the ReSpeaker Lite board is using the WS2812 chip and controlled via the `GPIO1` pin. The project cycles through different colors (red, green, blue, and white) to ensure that the RGB light is functioning properly.




### Code

```cpp
#include <Adafruit_NeoPixel.h>

// Define parameters for the LED strip
#define PIN 1 // Pin connected to the RGB LED
#define NUMPIXELS 1 // Number of LEDs

Adafruit_NeoPixel strip(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); // Initialize the LED strip object

void setup() {
// Initialize the serial monitor for debugging
Serial.begin(115200);

// Initialize the RGB LED strip
strip.begin();
strip.show(); // Initialize all pixels to the off state
}

void loop() {
// Red color test
Serial.println("Red color test");
strip.setPixelColor(0, strip.Color(255, 0, 0)); // Set the first pixel to red
strip.show(); // Update the strip display
delay(1000); // Delay for 1 second

// Green color test
Serial.println("Green color test");
strip.setPixelColor(0, strip.Color(0, 255, 0)); // Set the first pixel to green
strip.show();
delay(1000);

// Blue color test
Serial.println("Blue color test");
strip.setPixelColor(0, strip.Color(0, 0, 255)); // Set the first pixel to blue
strip.show();
delay(1000);

// White color test
Serial.println("White color test");
strip.setPixelColor(0, strip.Color(255, 255, 255)); // Set the first pixel to white
strip.show();
delay(1000);

// Turn off the LED
Serial.println("Turn off the LED");
strip.setPixelColor(0, strip.Color(0, 0, 0)); // Turn off the first pixel
strip.show();
delay(1000);
}
```
<p style={{textAlign: 'center'}}><img src="https://files.seeedstudio.com/wiki/SenseCAP/respeaker/rgb_led.gif" alt="pir" width={400} height="auto" /></p>
### Configuration
`strip.setPixelColor`: set the color LED in the strip.
`strip.show`: applies the color changes to the LED.
96 changes: 96 additions & 0 deletions docs/Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_volume.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
description: ReSpeaker Lite Volume Adjustment
title: Volume Adjustment
keywords:
- ReSpeaker
image: https://files.seeedstudio.com/wiki/wiki-platform/S-tempor.png
slug: /respeaker_volume
last_update:
date: 9/27/2024
author: Jessie
---



### Functionality


This example project demonstrates how to adjust the volume of the ReSpeaker Lite via I2C command.

`AIC3204` I2C address: `0x18`


### Code


```cpp
#include "AudioTools.h"
#include "Wire.h"

#define AIC3204_ADDR 0x18

AudioInfo info_16k(16000, 2, 32);
SineWaveGenerator<int16_t> sineWave(1000); // subclass of SoundGenerator with max amplitude of 32000
GeneratedSoundStream<int16_t> sound(sineWave); // Stream generated from sine wave

I2SStream out;
I2SConfig config_i2s1;

//FormatConverterStream converter(in);
//StreamCopy copier(out, converter);
StreamCopy copier(out, sound);

uint32_t now_time = 0;
uint8_t level_index = 0;
int8_t level[10] = {0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x00, 0x01, 0x02, 0x03};

void aic3204_write_reg(uint8_t reg, uint8_t value)
{
Wire.beginTransmission(AIC3204_ADDR);
Wire.write(reg);
Wire.write(value);
Wire.endTransmission();
}


void setup(void) {
// Open Serial
Serial.begin(115200);
Wire.begin(5,6);
// while(!Serial);
// AudioLogger::instance().begin(Serial, AudioLogger::Info);

// start I2S
Serial.println("starting I2S...");
config_i2s1 = out.defaultConfig(TX_MODE);
config_i2s1.copyFrom(info_16k);
// Custom I2S output pins
config_i2s1.pin_bck = 8;
config_i2s1.pin_ws = 7;
config_i2s1.pin_data = 43;
config_i2s1.pin_data_rx = 44;
config_i2s1.is_master = false;
out.begin(config_i2s1);

// converter.begin(info_16k, info_48k);
sineWave.begin(info_16k, N_B4);

Serial.println("started...");

}

// Arduino loop - copy sound to out
void loop() {
copier.copy();
if (millis() - now_time > 1000) {
now_time = millis();
aic3204_write_reg(0x00, 0x01);
aic3204_write_reg(0x12, level[level_index]);
aic3204_write_reg(0x13, level[level_index]);
Serial.print("level: ");
Serial.println(level_index);
level_index = level_index + 2;
if (level_index >= 10) level_index = 0;
}
}
```
12 changes: 11 additions & 1 deletion docs/Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/xiao_respeaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,17 @@ Before we start this chapter, please make sure the ReSpeaker Lite's firmware is
* [I2S Firmware Download](https://files.seeedstudio.com/wiki/SenseCAP/respeaker/ffva_i2s_v1.0.5.bin)


Check [Get Started](https://wiki.seeedstudio.com/reSpeaker_usb_v3/#update-firmware) to flash the firmware.
Check [Get Started](https://wiki.seeedstudio.com/reSpeaker_usb_v3/#update-firmware) to set up the tool, and run the following command:

```
dfu-util -e -a 1 -D ffva_i2s_v1.0.5.bin
```

:::tip
After flashing is completed, please restart the board.
:::




### Software Preparation
Expand Down
2 changes: 2 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1766,6 +1766,8 @@ const sidebars = {
},
items: [
'Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_i2s_test',
'Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_rgb_test',
'Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_volume',
'Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_button',
'Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_record_and_play',
// 'Sensor/ReSpeaker_Lite/XIAO_ESP32_S3/respeaker_i2s_rgb',
Expand Down

0 comments on commit 46627df

Please sign in to comment.