feat: Enhance Header component to improve active link detection
- Updated the `isActive` function in `Header.jsx` to handle root path and include logic for other paths. chore: Update package-lock.json to remove peer dependencies - Removed unnecessary peer dependencies from various packages in `package-lock.json`. feat: Update frameworks.json to include example links - Changed `exemplo_codigo` to `exemplo` and added `exemplos` links for various frameworks in `frameworks.json`. feat: Add placa images to series.json - Included image paths for different ESP32 series in `series.json`. feat: Create CodeExample component for displaying code snippets - Added a new `CodeExample.jsx` component to fetch and display code examples dynamically. feat: Add example Arduino code for Wi-Fi connection - Created `arduino.ino` example for connecting to Wi-Fi. feat: Add example code for audio playback using ESP-ADF - Created `esp-adf.c` example for audio playback using ESP-ADF. feat: Add example code for DSP operations - Created `esp-dsp.c` example demonstrating basic DSP operations. feat: Add example code for ESP-IDF LED blinking - Created `esp-idf.c` example for blinking an LED using ESP-IDF. feat: Add example code for Matter integration - Created `esp-matter.c` example for Matter device initialization and event handling. feat: Add example code for neural network operations - Created `esp-nn.c` example demonstrating basic neural network operations. feat: Add example code for face detection using ESP-WHO - Created `esp-who.c` example for face detection using ESP-WHO library. feat: Add MicroPython example for LED blinking - Created `micropython.py` example for blinking an LED using MicroPython.
This commit is contained in:
1 parent
3a5608d1de
commit
2a6699bbfb
18 files changed
+641
-112
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#include <WiFi.h>
|
||||
|
||||
// Substitua pelos dados da sua rede Wi-Fi
|
||||
const char* ssid = "NOME_DA_SUA_REDE";
|
||||
const char* password = "SENHA_DA_SUA_REDE";
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
delay(1000);
|
||||
|
||||
Serial.println("Conectando ao Wi-Fi...");
|
||||
WiFi.begin(ssid, password);
|
||||
|
||||
// Aguarda a conexão
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
}
|
||||
|
||||
Serial.println("");
|
||||
Serial.println("Wi-Fi conectado com sucesso!");
|
||||
Serial.print("Endereço IP: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Aqui você pode colocar o código principal do seu programa
|
||||
delay(1000);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#include "esp_log.h"
|
||||
#include "audio_pipeline.h"
|
||||
#include "audio_element.h"
|
||||
#include "audio_event_iface.h"
|
||||
#include "audio_common.h"
|
||||
#include "i2s_stream.h"
|
||||
#include "mp3_decoder.h"
|
||||
#include "fatfs_stream.h"
|
||||
#include "esp_peripherals.h"
|
||||
#include "periph_sdcard.h"
|
||||
|
||||
static const char *TAG = "HELLO_ADF";
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Inicializa periféricos (como o SD card)
|
||||
esp_periph_config_t periph_cfg = DEFAULT_ESP_PERIPH_SET_CONFIG();
|
||||
esp_periph_set_handle_t set = esp_periph_set_init(&periph_cfg);
|
||||
periph_sdcard_cfg_t sd_cfg = {
|
||||
.root = "/sdcard",
|
||||
};
|
||||
esp_periph_handle_t sdcard_handle = periph_sdcard_init(&sd_cfg);
|
||||
esp_periph_start(set, sdcard_handle);
|
||||
|
||||
// Espera o SD card montar
|
||||
periph_sdcard_wait_for_ready(sdcard_handle, portMAX_DELAY);
|
||||
|
||||
ESP_LOGI(TAG, "SD card montado!");
|
||||
|
||||
// Cria o pipeline
|
||||
audio_pipeline_handle_t pipeline;
|
||||
audio_pipeline_cfg_t pipeline_cfg = DEFAULT_AUDIO_PIPELINE_CONFIG();
|
||||
pipeline = audio_pipeline_init(&pipeline_cfg);
|
||||
|
||||
// Elementos: arquivo (fatfs), decodificador (mp3) e saída (i2s)
|
||||
audio_element_handle_t fatfs_stream_reader, i2s_stream_writer, mp3_decoder;
|
||||
|
||||
fatfs_stream_cfg_t fatfs_cfg = FATFS_STREAM_CFG_DEFAULT();
|
||||
fatfs_cfg.type = AUDIO_STREAM_READER;
|
||||
fatfs_stream_reader = fatfs_stream_init(&fatfs_cfg);
|
||||
|
||||
mp3_decoder_cfg_t mp3_cfg = DEFAULT_MP3_DECODER_CONFIG();
|
||||
mp3_decoder = mp3_decoder_init(&mp3_cfg);
|
||||
|
||||
i2s_stream_cfg_t i2s_cfg = I2S_STREAM_CFG_DEFAULT();
|
||||
i2s_cfg.type = AUDIO_STREAM_WRITER;
|
||||
i2s_stream_writer = i2s_stream_init(&i2s_cfg);
|
||||
|
||||
// Registra e conecta elementos
|
||||
audio_pipeline_register(pipeline, fatfs_stream_reader, "file");
|
||||
audio_pipeline_register(pipeline, mp3_decoder, "mp3");
|
||||
audio_pipeline_register(pipeline, i2s_stream_writer, "i2s");
|
||||
|
||||
audio_pipeline_link(pipeline, (const char *[]) {"file", "mp3", "i2s"}, 3);
|
||||
|
||||
// Define o arquivo MP3 a ser tocado
|
||||
audio_element_set_uri(fatfs_stream_reader, "/sdcard/test.mp3");
|
||||
|
||||
// Inicia o pipeline
|
||||
ESP_LOGI(TAG, "Iniciando pipeline...");
|
||||
audio_pipeline_run(pipeline);
|
||||
|
||||
// Mantém o pipeline rodando
|
||||
while (1) {
|
||||
vTaskDelay(1000 / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
// (Nunca chega aqui, mas seria o cleanup)
|
||||
audio_pipeline_stop(pipeline);
|
||||
audio_pipeline_wait_for_stop(pipeline);
|
||||
audio_pipeline_terminate(pipeline);
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_dsp.h"
|
||||
|
||||
#define N 8 // Tamanho do vetor
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Vetor de entrada (exemplo de sinal)
|
||||
float x[N] = {1.0, -2.0, 3.0, -4.0, 2.5, -1.5, 0.0, 4.5};
|
||||
float y[N]; // Vetor de saída
|
||||
|
||||
// Inicializa o ESP-DSP
|
||||
esp_err_t ret = dsps_fft2r_init_fc32(NULL, CONFIG_DSP_MAX_FFT_SIZE);
|
||||
if (ret != ESP_OK) {
|
||||
printf("Erro ao inicializar o ESP-DSP!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
printf("Sinal de entrada:\n");
|
||||
for (int i = 0; i < N; i++) {
|
||||
printf("%f ", x[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
// Calcula o quadrado de cada valor
|
||||
dsps_mulc_f32(x, y, N, 1.0f);
|
||||
dsps_mul_f32(y, y, y, N, 1, 1, 1);
|
||||
|
||||
// Soma todos os quadrados
|
||||
float soma = 0;
|
||||
dsps_sum_f32(y, N, &soma, 1);
|
||||
|
||||
// Calcula a magnitude (raiz da soma dos quadrados)
|
||||
float magnitude = sqrtf(soma);
|
||||
|
||||
printf("Magnitude do vetor: %f\n", magnitude);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "driver/gpio.h"
|
||||
|
||||
#define LED_PIN GPIO_NUM_2 // LED onboard (ajuste conforme sua placa)
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Configura o pino do LED como saída
|
||||
gpio_reset_pin(LED_PIN);
|
||||
gpio_set_direction(LED_PIN, GPIO_MODE_OUTPUT);
|
||||
|
||||
while (1) {
|
||||
// Liga o LED
|
||||
gpio_set_level(LED_PIN, 1);
|
||||
printf("LED ON\n");
|
||||
vTaskDelay(pdMS_TO_TICKS(1000)); // Espera 1 segundo
|
||||
|
||||
// Desliga o LED
|
||||
gpio_set_level(LED_PIN, 0);
|
||||
printf("LED OFF\n");
|
||||
vTaskDelay(pdMS_TO_TICKS(1000)); // Espera 1 segundo
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_matter.h"
|
||||
#include "esp_matter_controller.h"
|
||||
#include "nvs_flash.h"
|
||||
|
||||
static const char *TAG = "esp-matter-example";
|
||||
|
||||
void app_event_cb(const esp_matter_event_t *event)
|
||||
{
|
||||
switch (event->event_id) {
|
||||
case ESP_MATTER_EVENT_ATTRIBUTE_UPDATE: {
|
||||
const esp_matter_attr_update_t *attr_update = &event->data.attr_update;
|
||||
if (attr_update->endpoint_id == 1 && attr_update->cluster_id == ESP_MATTER_ON_OFF_CLUSTER_ID) {
|
||||
bool on = false;
|
||||
esp_matter_attribute_get(attr_update->endpoint_id, attr_update->cluster_id,
|
||||
attr_update->attribute_id, &on);
|
||||
ESP_LOGI(TAG, "Lâmpada %s", on ? "ligada" : "desligada");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Inicializa NVS
|
||||
esp_err_t err = nvs_flash_init();
|
||||
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||
ESP_ERROR_CHECK(nvs_flash_erase());
|
||||
ESP_ERROR_CHECK(nvs_flash_init());
|
||||
}
|
||||
|
||||
// Inicializa o Matter node
|
||||
esp_matter::node_t *node = esp_matter::node::create(NULL, app_event_cb);
|
||||
esp_matter::endpoint_t *endpoint = esp_matter::endpoint::create(node, ESP_MATTER_ENDPOINT_TYPE_ON_OFF_LIGHT);
|
||||
|
||||
// Inicia o stack Matter
|
||||
ESP_ERROR_CHECK(esp_matter::start(node));
|
||||
|
||||
ESP_LOGI(TAG, "Dispositivo Matter iniciado. Aguardando comissionamento...");
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
#include <stdio.h>
|
||||
#include "esp_nn.h"
|
||||
#include "esp_nn_defs.h"
|
||||
|
||||
#define INPUT_SIZE 4
|
||||
#define OUTPUT_SIZE 3
|
||||
|
||||
void print_array(const char *label, int16_t *array, int size) {
|
||||
printf("%s: ", label);
|
||||
for (int i = 0; i < size; i++) {
|
||||
printf("%d ", array[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Vetor de entrada (ex: saída de uma camada anterior)
|
||||
int16_t input[INPUT_SIZE] = {1, 2, 3, 4};
|
||||
|
||||
// Pesos da camada densa (3x4)
|
||||
int8_t weights[OUTPUT_SIZE * INPUT_SIZE] = {
|
||||
1, -1, 2, 0,
|
||||
0, 1, -1, 1,
|
||||
2, 0, 1, -2
|
||||
};
|
||||
|
||||
// Bias de cada neurônio
|
||||
int16_t bias[OUTPUT_SIZE] = {10, -5, 0};
|
||||
|
||||
// Saída
|
||||
int16_t output[OUTPUT_SIZE];
|
||||
|
||||
// Multiplicação da matriz: output = weights * input + bias
|
||||
esp_nn_mul_mat_16x8_16(weights, input, bias, output,
|
||||
OUTPUT_SIZE, INPUT_SIZE, /*shift=*/0);
|
||||
|
||||
print_array("Antes da ReLU", output, OUTPUT_SIZE);
|
||||
|
||||
// Aplicar função de ativação ReLU
|
||||
esp_nn_relu_16(output, OUTPUT_SIZE);
|
||||
|
||||
print_array("Depois da ReLU", output, OUTPUT_SIZE);
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
#include "esp_camera.h"
|
||||
#include "fd_forward.h" // Face Detection
|
||||
#include "fr_forward.h" // Face Recognition
|
||||
#include "human_face_detect_msr01.hpp"
|
||||
#include "human_face_detect_mnp01.hpp"
|
||||
|
||||
#define CAMERA_MODEL_AI_THINKER // ou o modelo da sua placa
|
||||
|
||||
#include "camera_pins.h"
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.setDebugOutput(true);
|
||||
Serial.println("Iniciando câmera...");
|
||||
|
||||
camera_config_t config;
|
||||
config.ledc_channel = LEDC_CHANNEL_0;
|
||||
config.ledc_timer = LEDC_TIMER_0;
|
||||
config.pin_d0 = Y2_GPIO_NUM;
|
||||
config.pin_d1 = Y3_GPIO_NUM;
|
||||
config.pin_d2 = Y4_GPIO_NUM;
|
||||
config.pin_d3 = Y5_GPIO_NUM;
|
||||
config.pin_d4 = Y6_GPIO_NUM;
|
||||
config.pin_d5 = Y7_GPIO_NUM;
|
||||
config.pin_d6 = Y8_GPIO_NUM;
|
||||
config.pin_d7 = Y9_GPIO_NUM;
|
||||
config.pin_xclk = XCLK_GPIO_NUM;
|
||||
config.pin_pclk = PCLK_GPIO_NUM;
|
||||
config.pin_vsync = VSYNC_GPIO_NUM;
|
||||
config.pin_href = HREF_GPIO_NUM;
|
||||
config.pin_sscb_sda = SIOD_GPIO_NUM;
|
||||
config.pin_sscb_scl = SIOC_GPIO_NUM;
|
||||
config.pin_pwdn = PWDN_GPIO_NUM;
|
||||
config.pin_reset = RESET_GPIO_NUM;
|
||||
config.xclk_freq_hz = 20000000;
|
||||
config.pixel_format = PIXFORMAT_RGB565;
|
||||
config.frame_size = FRAMESIZE_QVGA;
|
||||
config.fb_count = 1;
|
||||
|
||||
if (esp_camera_init(&config) != ESP_OK) {
|
||||
Serial.println("Falha ao iniciar a câmera!");
|
||||
return;
|
||||
}
|
||||
|
||||
Serial.println("Câmera inicializada com sucesso!");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
camera_fb_t *fb = esp_camera_fb_get();
|
||||
if (!fb) {
|
||||
Serial.println("Falha ao capturar imagem!");
|
||||
return;
|
||||
}
|
||||
|
||||
// Detecta rostos na imagem
|
||||
box_array_t *faces = face_detect_msr01(fb->buf, fb->width, fb->height, fb->format);
|
||||
if (faces) {
|
||||
Serial.printf("Rostos detectados: %d\n", faces->len);
|
||||
for (int i = 0; i < faces->len; i++) {
|
||||
box_t *box = &faces->box[i];
|
||||
Serial.printf("Face %d - x:%d y:%d w:%d h:%d\n", i, box->box_p[0], box->box_p[1],
|
||||
box->box_p[2] - box->box_p[0], box->box_p[3] - box->box_p[1]);
|
||||
}
|
||||
dl_lib_free(faces);
|
||||
} else {
|
||||
Serial.println("Nenhum rosto detectado.");
|
||||
}
|
||||
|
||||
esp_camera_fb_return(fb);
|
||||
delay(1000);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
from machine import Pin
|
||||
from time import sleep
|
||||
|
||||
# Define o pino 2 como saída (geralmente o LED embutido)
|
||||
led = Pin(2, Pin.OUT)
|
||||
|
||||
while True:
|
||||
led.value(1) # Liga o LED
|
||||
sleep(0.5) # Aguarda 0,5 segundos
|
||||
led.value(0) # Desliga o LED
|
||||
sleep(0.5) # Aguarda 0,5 segundos
|
||||
+16
-8
@@ -23,7 +23,8 @@
|
||||
"Gateways e hubs de comunicação",
|
||||
"Sistemas embarcados em tempo real"
|
||||
],
|
||||
"exemplo_codigo": "#include \"freertos/FreeRTOS.h\"\n#include \"freertos/task.h\"\n#include \"esp_wifi.h\"\n#include \"esp_log.h\"\n\nstatic const char *TAG = \"app_main\";\n\nvoid app_main(void)\n{\n ESP_LOGI(TAG, \"Iniciando aplicação ESP32\");\n \n // Inicializar Wi-Fi\n esp_netif_init();\n esp_event_loop_create_default();\n \n // Configurar Wi-Fi em modo station\n wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();\n esp_wifi_init(&cfg);\n \n ESP_LOGI(TAG, \"Wi-Fi inicializado com sucesso\");\n}",
|
||||
"exemplo": "/exemplos/esp-idf.c",
|
||||
"exemplos": "https://github.com/espressif/esp-idf/tree/master/examples",
|
||||
"documentacao": "https://docs.espressif.com/projects/esp-idf/",
|
||||
"repositorio": "https://github.com/espressif/esp-idf",
|
||||
"cor": "#E74C3C"
|
||||
@@ -53,7 +54,8 @@
|
||||
"Interfones e intercomunicadores",
|
||||
"Sistemas de PA (Public Address)"
|
||||
],
|
||||
"exemplo_codigo": "#include \"audio_pipeline.h\"\n#include \"audio_element.h\"\n#include \"mp3_decoder.h\"\n#include \"i2s_stream.h\"\n\nvoid app_main(void)\n{\n // Criar pipeline de áudio\n audio_pipeline_handle_t pipeline = audio_pipeline_init(&pipeline_cfg);\n \n // Criar elementos: HTTP stream -> MP3 decoder -> I2S output\n audio_element_handle_t http_stream = http_stream_init(&http_cfg);\n audio_element_handle_t mp3_decoder = mp3_decoder_init(&mp3_cfg);\n audio_element_handle_t i2s_stream = i2s_stream_init(&i2s_cfg);\n \n // Registrar elementos no pipeline\n audio_pipeline_register(pipeline, http_stream, \"http\");\n audio_pipeline_register(pipeline, mp3_decoder, \"mp3\");\n audio_pipeline_register(pipeline, i2s_stream, \"i2s\");\n \n // Conectar elementos\n audio_pipeline_link(pipeline, (const char *[]){\"http\", \"mp3\", \"i2s\"}, 3);\n \n // Iniciar reprodução\n audio_pipeline_run(pipeline);\n}",
|
||||
"exemplo": "/exemplos/esp-adf.c",
|
||||
"exemplos": "https://github.com/espressif/esp-adf/tree/master/examples",
|
||||
"documentacao": "https://docs.espressif.com/projects/esp-adf/",
|
||||
"repositorio": "https://github.com/espressif/esp-adf",
|
||||
"cor": "#3498DB"
|
||||
@@ -82,7 +84,8 @@
|
||||
"Compressão de dados",
|
||||
"Reconhecimento de padrões"
|
||||
],
|
||||
"exemplo_codigo": "#include \"esp_dsp.h\"\n\n#define N_SAMPLES 1024\nfloat input[N_SAMPLES];\nfloat output[N_SAMPLES];\n\nvoid app_main(void)\n{\n // Inicializar biblioteca DSP\n dsps_fft2r_init_fc32(NULL, N_SAMPLES);\n \n // Gerar sinal de entrada (exemplo: onda senoidal)\n for (int i = 0; i < N_SAMPLES; i++) {\n input[i] = sinf(2 * M_PI * 50 * i / N_SAMPLES);\n }\n \n // Aplicar FFT\n dsps_fft2r_fc32(input, N_SAMPLES);\n \n // Calcular magnitude do espectro\n for (int i = 0; i < N_SAMPLES / 2; i++) {\n output[i] = sqrtf(input[i*2] * input[i*2] + \n input[i*2+1] * input[i*2+1]);\n }\n}",
|
||||
"exemplo": "/exemplos/esp-dsp.c",
|
||||
"exemplos": "https://github.com/espressif/esp-dsp/tree/master/examples",
|
||||
"documentacao": "https://docs.espressif.com/projects/esp-dsp/",
|
||||
"repositorio": "https://github.com/espressif/esp-dsp",
|
||||
"cor": "#9B59B6"
|
||||
@@ -112,7 +115,8 @@
|
||||
"Análise de expressões faciais",
|
||||
"Contagem de pessoas"
|
||||
],
|
||||
"exemplo_codigo": "#include \"esp_camera.h\"\n#include \"fd_forward.h\"\n#include \"fr_forward.h\"\n\nvoid app_main(void)\n{\n // Inicializar câmera\n camera_config_t config = {\n .pin_pwdn = -1,\n .pin_reset = -1,\n .pin_xclk = 21,\n .pin_sscb_sda = 26,\n .pin_sscb_scl = 27,\n // ... outras configurações\n };\n esp_camera_init(&config);\n \n // Capturar frame\n camera_fb_t *fb = esp_camera_fb_get();\n \n // Detectar faces\n dl_matrix3du_t *image_matrix = dl_matrix3du_alloc(1, fb->width, fb->height, 3);\n box_array_t *detected = face_detect(image_matrix, &mtmn_config);\n \n if (detected) {\n printf(\"Detectadas %d faces\\n\", detected->len);\n // Processar faces detectadas\n }\n \n // Liberar recursos\n esp_camera_fb_return(fb);\n}",
|
||||
"exemplo": "/exemplos/esp-who.c",
|
||||
"exemplos": "https://github.com/espressif/esp-who/tree/master/examples",
|
||||
"documentacao": "https://github.com/espressif/esp-who",
|
||||
"repositorio": "https://github.com/espressif/esp-who",
|
||||
"cor": "#E67E22"
|
||||
@@ -142,7 +146,8 @@
|
||||
"Detecção de anomalias",
|
||||
"IA na borda (Edge AI)"
|
||||
],
|
||||
"exemplo_codigo": "#include \"esp_nn.h\"\n\n#define INPUT_SIZE 224*224*3\n#define OUTPUT_SIZE 1000\n\nint8_t input_data[INPUT_SIZE];\nint8_t output_data[OUTPUT_SIZE];\n\nvoid app_main(void)\n{\n // Preparar dados de entrada (imagem pré-processada)\n // ...\n \n // Executar camada de convolução\n esp_nn_conv2d_s8(\n input_data, // entrada\n output_data, // saída\n weights, // pesos\n bias, // bias\n input_height, // altura entrada\n input_width, // largura entrada\n input_channels, // canais entrada\n output_channels, // canais saída\n kernel_size, // tamanho kernel\n stride, // stride\n padding // padding\n );\n \n // Processar saída\n int predicted_class = get_max_index(output_data, OUTPUT_SIZE);\n printf(\"Classe predita: %d\\n\", predicted_class);\n}",
|
||||
"exemplo": "/exemplos/esp-nn.c",
|
||||
"exemplos": "https://github.com/espressif/esp-nn/tree/master/test_app",
|
||||
"documentacao": "https://github.com/espressif/esp-nn",
|
||||
"repositorio": "https://github.com/espressif/esp-nn",
|
||||
"cor": "#1ABC9C"
|
||||
@@ -172,7 +177,8 @@
|
||||
"Termostatos",
|
||||
"Dispositivos de controle de cortinas"
|
||||
],
|
||||
"exemplo_codigo": "#include \"esp_matter.h\"\n#include \"esp_matter_console.h\"\n\nusing namespace esp_matter;\nusing namespace chip::app::Clusters;\n\nvoid app_main(void)\n{\n // Criar nó Matter\n node_t *node = node::create(&node_config, NULL, NULL);\n \n // Criar endpoint de lâmpada\n endpoint_t *endpoint = on_off_light::create(\n node, \n &endpoint_config, \n ENDPOINT_FLAG_NONE\n );\n \n // Adicionar cluster On/Off\n cluster_t *cluster = cluster::get(endpoint, OnOff::Id);\n \n // Iniciar Matter\n esp_matter::start(NULL);\n \n // Aguardar comissionamento\n printf(\"Dispositivo Matter pronto para comissionamento\\n\");\n}",
|
||||
"exemplo": "/exemplos/esp-matter.c",
|
||||
"exemplos": "https://github.com/espressif/esp-matter/tree/main/examples",
|
||||
"documentacao": "https://docs.espressif.com/projects/esp-matter/",
|
||||
"repositorio": "https://github.com/espressif/esp-matter",
|
||||
"cor": "#F39C12"
|
||||
@@ -202,7 +208,8 @@
|
||||
"Sensores e atuadores básicos",
|
||||
"Projetos DIY"
|
||||
],
|
||||
"exemplo_codigo": "#include <WiFi.h>\n\nconst char* ssid = \"Sua_Rede\";\nconst char* password = \"Sua_Senha\";\n\nvoid setup() {\n Serial.begin(115200);\n \n // Conectar ao Wi-Fi\n WiFi.begin(ssid, password);\n \n while (WiFi.status() != WL_CONNECTED) {\n delay(500);\n Serial.print(\".\");\n }\n \n Serial.println(\"\");\n Serial.println(\"WiFi conectado\");\n Serial.print(\"Endereço IP: \");\n Serial.println(WiFi.localIP());\n}\n\nvoid loop() {\n // Seu código aqui\n delay(1000);\n}",
|
||||
"exemplo": "/exemplos/arduino.ino",
|
||||
"exemplos": "https://github.com/espressif/arduino-esp32/tree/master/docs/en/tutorials",
|
||||
"documentacao": "https://docs.espressif.com/projects/arduino-esp32/",
|
||||
"repositorio": "https://github.com/espressif/arduino-esp32",
|
||||
"cor": "#00979D"
|
||||
@@ -232,7 +239,8 @@
|
||||
"Projetos de ciência de dados embarcados",
|
||||
"Testes e validação"
|
||||
],
|
||||
"exemplo_codigo": "import network\nimport time\n\n# Conectar ao Wi-Fi\nwlan = network.WLAN(network.STA_IF)\nwlan.active(True)\nwlan.connect('Sua_Rede', 'Sua_Senha')\n\n# Aguardar conexão\nwhile not wlan.isconnected():\n time.sleep(0.5)\n print('.', end='')\n\nprint('\\nWi-Fi conectado')\nprint('IP:', wlan.ifconfig()[0])\n\n# Exemplo: Ler sensor e enviar dados\nwhile True:\n # Ler sensor\n temperatura = 25.5 # exemplo\n \n print(f'Temperatura: {temperatura}°C')\n time.sleep(1)",
|
||||
"exemplo": "/exemplos/micropython.py",
|
||||
"exemplos": "https://github.com/micropython/micropython/tree/master/examples",
|
||||
"documentacao": "https://docs.micropython.org/en/latest/esp32/",
|
||||
"repositorio": "https://github.com/micropython/micropython",
|
||||
"cor": "#2B2B2B"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
"temperatura_operacao": "-40°C a 125°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32.png",
|
||||
"cor": "#007bff"
|
||||
},
|
||||
"ESP32-S2": {
|
||||
@@ -64,6 +65,7 @@
|
||||
"temperatura_operacao": "-40°C a 85°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-s2_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-s2.png",
|
||||
"cor": "#28a745"
|
||||
},
|
||||
"ESP32-S3": {
|
||||
@@ -99,6 +101,7 @@
|
||||
"temperatura_operacao": "-40°C a 85°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-s3_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-s3.png",
|
||||
"cor": "#fd7e14"
|
||||
},
|
||||
"ESP32-C3": {
|
||||
@@ -129,6 +132,7 @@
|
||||
"temperatura_operacao": "-40°C a 105°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-c3_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-c3.png",
|
||||
"cor": "#20c997"
|
||||
},
|
||||
"ESP32-C5": {
|
||||
@@ -160,6 +164,7 @@
|
||||
"temperatura_operacao": "-40°C a 85°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-c5_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-c5.png",
|
||||
"cor": "#6f42c1"
|
||||
},
|
||||
"ESP32-C6": {
|
||||
@@ -193,6 +198,7 @@
|
||||
"temperatura_operacao": "-40°C a 105°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-c6_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-c6.png",
|
||||
"cor": "#17a2b8"
|
||||
},
|
||||
"ESP32-P4": {
|
||||
@@ -229,6 +235,7 @@
|
||||
"temperatura_operacao": "-40°C a 85°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-p4_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-p4.png",
|
||||
"cor": "#ffc107"
|
||||
},
|
||||
"ESP32-H2": {
|
||||
@@ -261,6 +268,7 @@
|
||||
"temperatura_operacao": "-40°C a 85°C",
|
||||
"temperatura_armazenamento": "-40°C a 150°C",
|
||||
"datasheet": "https://documentation.espressif.com/esp32-h2_datasheet_en.pdf",
|
||||
"placa": "/placas/esp32-h2.png",
|
||||
"cor": "#6c757d"
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user