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
@@ -1,11 +1,12 @@
|
|||||||
|
import Link from "next/link";
|
||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
import Link from "next/link";
|
|
||||||
import frameworksData from "@/public/frameworks.json";
|
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
import CodeExample from "@/components/CodeExample";
|
||||||
|
import frameworksData from "@/public/frameworks.json";
|
||||||
|
|
||||||
export default function FrameworkDetail({ params }) {
|
export default async function FrameworkDetail({ params }) {
|
||||||
const { key } = params;
|
const { key } = await params;
|
||||||
const framework = frameworksData[key];
|
const framework = frameworksData[key];
|
||||||
|
|
||||||
if (!framework) {
|
if (!framework) {
|
||||||
@@ -42,7 +43,7 @@ export default function FrameworkDetail({ params }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex items-center gap-3">
|
<div className="mx-auto sm:mx-0 grid items-center gap-3">
|
||||||
{framework.documentacao && (
|
{framework.documentacao && (
|
||||||
<a
|
<a
|
||||||
href={framework.documentacao}
|
href={framework.documentacao}
|
||||||
@@ -88,7 +89,7 @@ export default function FrameworkDetail({ params }) {
|
|||||||
|
|
||||||
<div className="bg-white rounded-2xl shadow-lg p-6 border-l-4" style={{ borderColor: framework.cor }}>
|
<div className="bg-white rounded-2xl shadow-lg p-6 border-l-4" style={{ borderColor: framework.cor }}>
|
||||||
<h3 className="text-sm font-semibold text-gray-600 mb-2">FUNÇÃO PRINCIPAL</h3>
|
<h3 className="text-sm font-semibold text-gray-600 mb-2">FUNÇÃO PRINCIPAL</h3>
|
||||||
<p className="text-3xl font-bold text-gray-800">{framework.funcao_principal}</p>
|
<p className="text-xl font-bold text-gray-800">{framework.funcao_principal}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -126,26 +127,17 @@ export default function FrameworkDetail({ params }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{framework.exemplo_codigo && (
|
{framework.exemplos && (
|
||||||
<div className="bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100 mb-8">
|
<CodeExample framework={framework} />
|
||||||
<h3 className="text-lg font-semibold text-gray-800 mb-4" style={{ borderColor: framework.cor }}>
|
|
||||||
Exemplo de Código
|
|
||||||
</h3>
|
|
||||||
<div className="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-auto text-sm" style={{ maxHeight: 480 }}>
|
|
||||||
<pre className="whitespace-pre-wrap">
|
|
||||||
<code>{framework.exemplo_codigo}</code>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="flex gap-4 mt-6">
|
<div className="text-center md:flex gap-4 mt-6">
|
||||||
{framework.documentacao && (
|
{framework.documentacao && (
|
||||||
<a
|
<a
|
||||||
href={framework.documentacao}
|
href={framework.documentacao}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="inline-flex items-center gap-2 bg-linear-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-xl font-semibold shadow hover:shadow-xl transition"
|
className="inline-flex items-center mb-4 gap-2 bg-linear-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-xl font-semibold shadow hover:shadow-xl transition"
|
||||||
>
|
>
|
||||||
📚 Documentação Oficial
|
📚 Documentação Oficial
|
||||||
</a>
|
</a>
|
||||||
@@ -156,7 +148,7 @@ export default function FrameworkDetail({ params }) {
|
|||||||
href={framework.repositorio}
|
href={framework.repositorio}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="inline-flex items-center gap-2 bg-white text-gray-800 px-6 py-3 rounded-xl font-semibold shadow border-2 border-gray-100 hover:border-purple-300 transition"
|
className="inline-flex items-center mb-4 gap-2 bg-white text-gray-800 px-6 py-3 rounded-xl font-semibold shadow border-2 border-gray-100 hover:border-purple-300 transition"
|
||||||
>
|
>
|
||||||
💻 Repositório no GitHub
|
💻 Repositório no GitHub
|
||||||
</a>
|
</a>
|
||||||
@@ -170,7 +162,7 @@ export default function FrameworkDetail({ params }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function generateMetadata({ params }) {
|
export async function generateMetadata({ params }) {
|
||||||
const { key } = params;
|
const { key } = await params;
|
||||||
const framework = frameworksData[key];
|
const framework = frameworksData[key];
|
||||||
|
|
||||||
if (!framework) {
|
if (!framework) {
|
||||||
@@ -178,11 +170,13 @@ export async function generateMetadata({ params }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: `${framework.nome} - ${framework.nome_completo}`,
|
title: `ESPDocs - ${framework.nome_completo}`,
|
||||||
description: framework.descricao,
|
description: framework.descricao,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
return Object.keys(frameworksData).map((key) => ({ key }));
|
return Object.keys(frameworksData).map((key) => ({
|
||||||
|
key: key,
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
@@ -171,25 +171,6 @@ export default function Frameworks() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-8 bg-linear-to-r from-blue-600 via-purple-600 to-pink-600 rounded-2xl shadow-lg p-8 text-white">
|
|
||||||
<div className="flex flex-col md:flex-row items-center justify-between gap-6">
|
|
||||||
<div className="flex-1">
|
|
||||||
<h3 className="text-2xl font-bold mb-2">
|
|
||||||
💡 Precisa de Ajuda para Escolher?
|
|
||||||
</h3>
|
|
||||||
<p className="text-blue-100">
|
|
||||||
Compare frameworks, veja exemplos de código e entenda qual se adequa melhor ao seu projeto.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<Link
|
|
||||||
href="/comparacao-frameworks"
|
|
||||||
className="bg-white text-purple-600 px-6 py-3 rounded-xl font-semibold shadow-lg hover:shadow-xl transform hover:-translate-y-1 transition-all duration-300 whitespace-nowrap"
|
|
||||||
>
|
|
||||||
📊 Comparar Frameworks
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
import Image from "next/image";
|
||||||
import Header from "@/components/Header";
|
import Header from "@/components/Header";
|
||||||
import Footer from "@/components/Footer";
|
import Footer from "@/components/Footer";
|
||||||
import Link from "next/link";
|
|
||||||
import seriesData from "@/public/series.json";
|
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
|
import seriesData from "@/public/series.json";
|
||||||
import ConnectionsDiagram from "@/components/ConnectionsDiagram";
|
import ConnectionsDiagram from "@/components/ConnectionsDiagram";
|
||||||
import Image from "next/image";
|
|
||||||
import SeriesTabMenu from "@/components/SeriesTabMenu";
|
import SeriesTabMenu from "@/components/SeriesTabMenu";
|
||||||
|
|
||||||
export default function SerieDetail({ params }) {
|
export default async function SerieDetail({ params }) {
|
||||||
const { key } = params;
|
const { key } = await params;
|
||||||
const serie = seriesData[key];
|
const serie = seriesData[key];
|
||||||
|
|
||||||
if (!serie) {
|
if (!serie) {
|
||||||
@@ -22,19 +22,6 @@ export default function SerieDetail({ params }) {
|
|||||||
console.log(`Arquivo de conexões não encontrado para ${key}`);
|
console.log(`Arquivo de conexões não encontrado para ${key}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Development board image mapping
|
|
||||||
const devBoardImages = {
|
|
||||||
"ESP32": "/placas/esp32.png",
|
|
||||||
"ESP32-S2": "/placas/esp32-s2.png",
|
|
||||||
"ESP32-S3": "/placas/esp32-s3.png",
|
|
||||||
"ESP32-C3": "/placas/esp32-c3.png",
|
|
||||||
"ESP32-C5": "/placas/esp32-c5.png",
|
|
||||||
"ESP32-C6": "/placas/esp32-c6.png",
|
|
||||||
"ESP32-H2": "/placas/esp32-h2.png",
|
|
||||||
"ESP32-C2": "/placas/esp32-c2.png",
|
|
||||||
"ESP32-P4": "/placas/esp32-p4.png",
|
|
||||||
};
|
|
||||||
|
|
||||||
const seriesKeys = Object.keys(seriesData);
|
const seriesKeys = Object.keys(seriesData);
|
||||||
const currentIndex = seriesKeys.indexOf(key);
|
const currentIndex = seriesKeys.indexOf(key);
|
||||||
const previousKey = currentIndex > 0 ? seriesKeys[currentIndex - 1] : null;
|
const previousKey = currentIndex > 0 ? seriesKeys[currentIndex - 1] : null;
|
||||||
@@ -101,7 +88,7 @@ export default function SerieDetail({ params }) {
|
|||||||
{
|
{
|
||||||
id: 'devboard',
|
id: 'devboard',
|
||||||
label: 'Placa de Desenvolvimento',
|
label: 'Placa de Desenvolvimento',
|
||||||
available: devBoardImages[key],
|
available: serie.placa,
|
||||||
content: (
|
content: (
|
||||||
<div className="bg-white rounded-3xl shadow-xl p-8 border-2 border-gray-100">
|
<div className="bg-white rounded-3xl shadow-xl p-8 border-2 border-gray-100">
|
||||||
<h2 className="text-2xl font-bold text-gray-800 mb-6 pb-3 border-b-2 flex items-center gap-3" style={{ borderColor: serie.cor }}>
|
<h2 className="text-2xl font-bold text-gray-800 mb-6 pb-3 border-b-2 flex items-center gap-3" style={{ borderColor: serie.cor }}>
|
||||||
@@ -111,7 +98,7 @@ export default function SerieDetail({ params }) {
|
|||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<div className="relative w-full max-w-4xl">
|
<div className="relative w-full max-w-4xl">
|
||||||
<Image
|
<Image
|
||||||
src={devBoardImages[key]}
|
src={serie.placa}
|
||||||
alt={`${key} DevKit - Placa de Desenvolvimento`}
|
alt={`${key} DevKit - Placa de Desenvolvimento`}
|
||||||
width={1200}
|
width={1200}
|
||||||
height={800}
|
height={800}
|
||||||
@@ -217,7 +204,7 @@ export default function SerieDetail({ params }) {
|
|||||||
|
|
||||||
<SeriesTabMenu tabs={tabs} color={serie.cor} />
|
<SeriesTabMenu tabs={tabs} color={serie.cor} />
|
||||||
|
|
||||||
<div className="flex justify-between items-center gap-4 mt-12">
|
<div className="grid sm:flex sm:justify-between items-center gap-4 mt-12">
|
||||||
{previousKey ? (
|
{previousKey ? (
|
||||||
<Link
|
<Link
|
||||||
href={`/series/${previousKey}`}
|
href={`/series/${previousKey}`}
|
||||||
@@ -284,7 +271,7 @@ function SpecSection({ title, specs, cor }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function generateMetadata({ params }) {
|
export async function generateMetadata({ params }) {
|
||||||
const { key } = params;
|
const { key } = await params;
|
||||||
const serie = seriesData[key];
|
const serie = seriesData[key];
|
||||||
|
|
||||||
if (!serie) {
|
if (!serie) {
|
||||||
|
|||||||
@@ -20,12 +20,6 @@ export default function Sobre() {
|
|||||||
|
|
||||||
<main id="conteudo" className="px-4 pt-16 pb-20 max-w-6xl mx-auto">
|
<main id="conteudo" className="px-4 pt-16 pb-20 max-w-6xl mx-auto">
|
||||||
<header className="relative overflow-hidden rounded-2xl p-8 md:p-12 bg-linear-to-r from-blue-600 via-purple-600 to-pink-500 text-white shadow-lg">
|
<header className="relative overflow-hidden rounded-2xl p-8 md:p-12 bg-linear-to-r from-blue-600 via-purple-600 to-pink-500 text-white shadow-lg">
|
||||||
<div className="absolute right-0 top-0 -mr-40 -mt-24 opacity-20 pointer-events-none">
|
|
||||||
<svg width="400" height="300" viewBox="0 0 600 400" fill="none" aria-hidden="true">
|
|
||||||
<path d="M0 200 C150 100 350 300 600 200 L600 400 L0 400 Z" fill="white" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="relative z-10 max-w-4xl mx-auto">
|
<div className="relative z-10 max-w-4xl mx-auto">
|
||||||
<h1 className="text-4xl md:text-5xl font-extrabold leading-tight bg-clip-text text-transparent bg-linear-to-r from-white to-purple-100 mb-3">
|
<h1 className="text-4xl md:text-5xl font-extrabold leading-tight bg-clip-text text-transparent bg-linear-to-r from-white to-purple-100 mb-3">
|
||||||
Sobre o ESPDocs
|
Sobre o ESPDocs
|
||||||
|
|||||||
@@ -0,0 +1,141 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { useEffect, useState } from 'react'
|
||||||
|
|
||||||
|
export default function CodeExample({ framework }) {
|
||||||
|
const examplesUrl = framework?.exemplos;
|
||||||
|
const color = framework?.cor || '#6B7280';
|
||||||
|
|
||||||
|
const [sample, setSample] = useState('');
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [error, setError] = useState(null);
|
||||||
|
const [copied, setCopied] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setSample('');
|
||||||
|
setError(null);
|
||||||
|
setLoading(false);
|
||||||
|
|
||||||
|
if (!framework) return;
|
||||||
|
|
||||||
|
const exemploPath = framework.exemplo;
|
||||||
|
if (!exemploPath) {
|
||||||
|
const msg = `// Exemplos completos: ${examplesUrl || 'Ver repositório'}\n// Abra o link acima para ver exemplos e código completo.\n`;
|
||||||
|
setSample(msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const url = exemploPath.startsWith('/') ? exemploPath : `/${exemploPath}`;
|
||||||
|
|
||||||
|
let cancelled = false;
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
fetch(url)
|
||||||
|
.then((res) => {
|
||||||
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
||||||
|
return res.text();
|
||||||
|
})
|
||||||
|
.then((text) => {
|
||||||
|
if (cancelled) return;
|
||||||
|
if (text && text.trim().length > 0) {
|
||||||
|
setSample(text);
|
||||||
|
} else {
|
||||||
|
setSample(`// Arquivo de exemplo está vazio. Consulte: ${examplesUrl || 'repositório'}\n`);
|
||||||
|
setError('Arquivo vazio');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
if (cancelled) return;
|
||||||
|
setSample(`// Não foi possível carregar o exemplo local. Consulte: ${examplesUrl || 'repositório'}\n`);
|
||||||
|
setError(err.message || 'Falha ao carregar exemplo');
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
if (!cancelled) setLoading(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
cancelled = true;
|
||||||
|
};
|
||||||
|
}, [framework?.exemplo, framework?.exemplos]);
|
||||||
|
|
||||||
|
const lines = (sample || '').split('\n');
|
||||||
|
|
||||||
|
async function handleCopy() {
|
||||||
|
try {
|
||||||
|
await navigator.clipboard.writeText(sample);
|
||||||
|
setCopied(true);
|
||||||
|
setTimeout(() => setCopied(false), 2000);
|
||||||
|
} catch {}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="bg-white rounded-2xl shadow-lg p-6 border-2 border-gray-100 mb-8">
|
||||||
|
<div className="md:flex items-start justify-between gap-4 mb-4">
|
||||||
|
<div>
|
||||||
|
<h3 className="text-lg font-semibold text-gray-800 mb-1">Exemplo de Código</h3>
|
||||||
|
<p className="text-sm text-gray-600">Trecho rápido para começar — personalize conforme necessário.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="grid grid-cols-2 md:flex items-center gap-2">
|
||||||
|
<span
|
||||||
|
className="inline-flex items-center text-sm font-semibold px-3 py-1 rounded-full text-white"
|
||||||
|
style={{ backgroundColor: color }}
|
||||||
|
>
|
||||||
|
{framework?.linguagem || 'Código'}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={handleCopy}
|
||||||
|
className="inline-flex items-center gap-2 bg-white text-gray-800 px-3 py-2 rounded-lg font-medium shadow border-2 border-gray-100 hover:shadow-lg transition"
|
||||||
|
title="Copiar código"
|
||||||
|
>
|
||||||
|
{copied ? '✅ Copiado' : '📋 Copiar'}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{examplesUrl && (
|
||||||
|
<a
|
||||||
|
href={examplesUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="inline-flex items-center gap-2 px-3 py-2 rounded-lg font-semibold text-white col-span-2"
|
||||||
|
style={{
|
||||||
|
background: `linear-gradient(90deg, ${color} 0%, rgba(124,58,237,1) 100%)`
|
||||||
|
}}
|
||||||
|
title="Abrir exemplos no GitHub"
|
||||||
|
>
|
||||||
|
🔗 Ver Outros no GitHub
|
||||||
|
</a>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="rounded-lg overflow-hidden border">
|
||||||
|
<div className="p-0">
|
||||||
|
<div className="flex items-center justify-between bg-gradient-to-r from-gray-900 to-gray-800 p-3">
|
||||||
|
<div className="text-xs text-gray-300 font-medium">{framework?.nome}</div>
|
||||||
|
<div className="text-xs text-gray-400">
|
||||||
|
{loading ? 'Carregando exemplo...' : (framework?.exemplo ? 'Exemplo do framework' : 'Abrir no GitHub')}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex">
|
||||||
|
<pre
|
||||||
|
className="bg-gray-900 text-gray-100 p-4 w-full overflow-auto"
|
||||||
|
style={{ fontFamily: 'ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", "Courier New", monospace' }}
|
||||||
|
>
|
||||||
|
{lines.map((line, idx) => (
|
||||||
|
<div key={idx} className="flex select-text">
|
||||||
|
<span className="text-gray-500 pr-4 text-right w-8 select-none">{idx + 1}</span>
|
||||||
|
<code className="whitespace-pre-wrap flex-1">{line === '' ? '\u00A0' : line}</code>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{error && <p className="text-xs text-red-500 mt-2">Não foi possível carregar o arquivo de exemplo: {error}. Usando instrução para o repositório.</p>}
|
||||||
|
<p className="text-xs text-gray-500 mt-3">Dica: personalize este trecho conforme o seu projeto. Os exemplos completos estão no repositório.</p>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
+112
-24
@@ -1,33 +1,121 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
|
const year = new Date().getFullYear();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="bg-white py-3 text-black border-t border-gray-300 space-y-2">
|
<footer role="contentinfo" aria-label="Rodapé do site ESPDocs" className="bg-linear-to-r from-blue-600 to-purple-600 text-white mt-12">
|
||||||
<div className="text-center leading-5 text-sm md:flex md:justify-between max-w-5xl mx-auto">
|
<div className="max-w-6xl mx-auto px-6 py-8 rounded-t-2xl shadow-inner border-t border-white/10">
|
||||||
<div className="m-0 p-0">
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||||
© {new Date().getFullYear()}
|
<div className="space-y-3">
|
||||||
<a
|
<h3 className="text-2xl font-extrabold tracking-tight">ESPDocs</h3>
|
||||||
href="https://cienciaembarcada.com.br"
|
<p className="text-sm text-white/90 max-w-sm">
|
||||||
className="text-blue-700 font-semibold hover:underline"
|
Documentação não oficial em português para ESP32 — focada em clareza, exemplos práticos e comunidade.
|
||||||
target="_blank"
|
</p>
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
<div className="">
|
||||||
Ciência Embarcada
|
<a
|
||||||
</a>
|
href="https://github.com/lucasrguerra/ESPDocs"
|
||||||
. Todos os direitos reservados.
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
aria-label="Ver repositório do ESPDocs no GitHub (abre em nova aba)"
|
||||||
|
className="inline-flex items-center gap-2 bg-white/10 hover:bg-white/20 px-3 py-2 rounded-md text-sm font-semibold focus:outline-none focus:ring-2 focus:ring-white/30 transition"
|
||||||
|
>
|
||||||
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true" className="opacity-90">
|
||||||
|
<path d="M12 .5a12 12 0 00-3.8 23.4c.6.1.8-.3.8-.6v-2.1c-3.3.7-4-1.6-4-1.6-.5-1.2-1.2-1.5-1.2-1.5-1-.7.1-.7.1-.7 1.1.1 1.7 1.1 1.7 1.1 1 .1 1.6-.7 1.9-1 .1-.8.4-1.3.8-1.6-2.6-.3-5.3-1.3-5.3-5.8 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.6.1-3.3 0 0 1-.3 3.3 1.2a11.4 11.4 0 016 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.7.2 3 .1 3.3.8.8 1.2 1.9 1.2 3.1 0 4.5-2.7 5.5-5.3 5.8.5.4.9 1.1.9 2.2v3.2c0 .3.2.7.8.6A12 12 0 0012 .5z" fill="currentColor"/>
|
||||||
|
</svg>
|
||||||
|
Ver no GitHub
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<nav aria-label="Links úteis" className="text-sm">
|
||||||
|
<h4 className="text-sm font-semibold mb-2">Links úteis</h4>
|
||||||
|
<ul className="space-y-2">
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/lucasrguerra/ESPDocs"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="hover:underline text-white/95 focus:outline-none focus:ring-2 focus:ring-white/20 rounded"
|
||||||
|
aria-label="Abrir repositório no GitHub"
|
||||||
|
>
|
||||||
|
Repositório no GitHub
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://github.com/lucasrguerra/ESPDocs/issues"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="hover:underline text-white/90 focus:outline-none focus:ring-2 focus:ring-white/20 rounded"
|
||||||
|
aria-label="Abrir issues do repositório"
|
||||||
|
>
|
||||||
|
Reportar bug / Abrir issue
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
href="https://cienciaembarcada.com.br"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="hover:underline text-white/90 focus:outline-none focus:ring-2 focus:ring-white/20 rounded"
|
||||||
|
aria-label="Visitar Ciência Embarcada (abre em nova aba)"
|
||||||
|
>
|
||||||
|
Ciência Embarcada
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<div className="space-y-3">
|
||||||
|
<h4 className="text-sm font-semibold">Créditos</h4>
|
||||||
|
<p className="text-sm text-white/90">
|
||||||
|
Desenvolvido por{' '}
|
||||||
|
<a
|
||||||
|
href="https://linkedin.com/in/lucasrguerra"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="underline hover:text-white"
|
||||||
|
aria-label="Perfil LinkedIn de Lucas Rayan Guerra (abre em nova aba)"
|
||||||
|
>
|
||||||
|
Lucas Rayan Guerra
|
||||||
|
</a>
|
||||||
|
.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="flex items-center gap-3 mt-2">
|
||||||
|
<a
|
||||||
|
href="https://github.com/lucasrguerra/ESPDocs"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="inline-flex items-center justify-center w-9 h-9 rounded-md bg-white/10 hover:bg-white/20 focus:outline-none focus:ring-2 focus:ring-white/20"
|
||||||
|
aria-label="GitHub do projeto"
|
||||||
|
>
|
||||||
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||||
|
<path d="M12 .5a12 12 0 00-3.8 23.4c.6.1.8-.3.8-.6v-2.1c-3.3.7-4-1.6-4-1.6-.5-1.2-1.2-1.5-1.2-1.5-1-.7.1-.7.1-.7 1.1.1 1.7 1.1 1.7 1.1 1 .1 1.6-.7 1.9-1 .1-.8.4-1.3.8-1.6-2.6-.3-5.3-1.3-5.3-5.8 0-1.3.5-2.3 1.2-3.1-.1-.3-.5-1.6.1-3.3 0 0 1-.3 3.3 1.2a11.4 11.4 0 016 0c2.3-1.5 3.3-1.2 3.3-1.2.6 1.7.2 3 .1 3.3.8.8 1.2 1.9 1.2 3.1 0 4.5-2.7 5.5-5.3 5.8.5.4.9 1.1.9 2.2v3.2c0 .3.2.7.8.6A12 12 0 0012 .5z" fill="currentColor"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a
|
||||||
|
href="https://linkedin.com/in/lucasrguerra"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
className="inline-flex items-center justify-center w-9 h-9 rounded-md bg-white/10 hover:bg-white/20 focus:outline-none focus:ring-2 focus:ring-white/20"
|
||||||
|
aria-label="LinkedIn do autor"
|
||||||
|
>
|
||||||
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" aria-hidden="true">
|
||||||
|
<path d="M4.98 3.5a2.5 2.5 0 11.001 5.001A2.5 2.5 0 014.98 3.5zM3 8.98h4v12H3v-12zM9.5 8.98h3.8v1.6h.1c.5-.9 1.8-1.9 3.6-1.9 3.8 0 4.5 2.5 4.5 5.8v6.5h-4v-5.8c0-1.4-.1-3.2-2-3.2-2 0-2.3 1.6-2.3 3.1v5.9h-4v-12z" fill="currentColor"/>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="m-0 p-0">
|
<div className="mt-6 pt-4 border-t border-white/10 text-sm text-white/80 text-center">
|
||||||
Desenvolvido por
|
<div>
|
||||||
<a
|
© {year} ESPDocs — Conteúdo não oficial. Consulte sempre datasheets e documentos oficiais para decisões críticas.
|
||||||
href="https://linkedin.com/in/lucasrguerra"
|
</div>
|
||||||
className="text-blue-700 font-semibold hover:underline"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
Lucas Rayan Guerra
|
|
||||||
</a>
|
|
||||||
.
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -29,7 +29,11 @@ export default function Header() {
|
|||||||
];
|
];
|
||||||
|
|
||||||
function isActive(href) {
|
function isActive(href) {
|
||||||
return pathname === href;
|
if (href === "/") {
|
||||||
|
return pathname === "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
return String(pathname).includes(href) && href !== "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Generated
-9
@@ -267,7 +267,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz",
|
||||||
"integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==",
|
"integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@emotion/babel-plugin": "^11.13.5",
|
"@emotion/babel-plugin": "^11.13.5",
|
||||||
@@ -311,7 +310,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz",
|
"resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz",
|
||||||
"integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==",
|
"integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.18.3",
|
"@babel/runtime": "^7.18.3",
|
||||||
"@emotion/babel-plugin": "^11.13.5",
|
"@emotion/babel-plugin": "^11.13.5",
|
||||||
@@ -1890,7 +1888,6 @@
|
|||||||
"integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==",
|
"integrity": "sha512-BnOroVl1SgrPLywqxyqdJ4l3S2MsKVLDVxZvjI1Eoe8ev2r3kGDo+PcMihNmDE+6/KjkTubSJnmqGZZjQSBq/g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/scope-manager": "8.46.2",
|
"@typescript-eslint/scope-manager": "8.46.2",
|
||||||
"@typescript-eslint/types": "8.46.2",
|
"@typescript-eslint/types": "8.46.2",
|
||||||
@@ -2408,7 +2405,6 @@
|
|||||||
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"acorn": "bin/acorn"
|
"acorn": "bin/acorn"
|
||||||
},
|
},
|
||||||
@@ -3310,7 +3306,6 @@
|
|||||||
"integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==",
|
"integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.8.0",
|
"@eslint-community/eslint-utils": "^4.8.0",
|
||||||
"@eslint-community/regexpp": "^4.12.1",
|
"@eslint-community/regexpp": "^4.12.1",
|
||||||
@@ -3484,7 +3479,6 @@
|
|||||||
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
|
"integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@rtsao/scc": "^1.1.0",
|
"@rtsao/scc": "^1.1.0",
|
||||||
"array-includes": "^3.1.9",
|
"array-includes": "^3.1.9",
|
||||||
@@ -5667,7 +5661,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
|
||||||
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
|
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
@@ -5677,7 +5670,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
|
||||||
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
|
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"scheduler": "^0.26.0"
|
"scheduler": "^0.26.0"
|
||||||
},
|
},
|
||||||
@@ -6381,7 +6373,6 @@
|
|||||||
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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",
|
"Gateways e hubs de comunicação",
|
||||||
"Sistemas embarcados em tempo real"
|
"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/",
|
"documentacao": "https://docs.espressif.com/projects/esp-idf/",
|
||||||
"repositorio": "https://github.com/espressif/esp-idf",
|
"repositorio": "https://github.com/espressif/esp-idf",
|
||||||
"cor": "#E74C3C"
|
"cor": "#E74C3C"
|
||||||
@@ -53,7 +54,8 @@
|
|||||||
"Interfones e intercomunicadores",
|
"Interfones e intercomunicadores",
|
||||||
"Sistemas de PA (Public Address)"
|
"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/",
|
"documentacao": "https://docs.espressif.com/projects/esp-adf/",
|
||||||
"repositorio": "https://github.com/espressif/esp-adf",
|
"repositorio": "https://github.com/espressif/esp-adf",
|
||||||
"cor": "#3498DB"
|
"cor": "#3498DB"
|
||||||
@@ -82,7 +84,8 @@
|
|||||||
"Compressão de dados",
|
"Compressão de dados",
|
||||||
"Reconhecimento de padrões"
|
"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/",
|
"documentacao": "https://docs.espressif.com/projects/esp-dsp/",
|
||||||
"repositorio": "https://github.com/espressif/esp-dsp",
|
"repositorio": "https://github.com/espressif/esp-dsp",
|
||||||
"cor": "#9B59B6"
|
"cor": "#9B59B6"
|
||||||
@@ -112,7 +115,8 @@
|
|||||||
"Análise de expressões faciais",
|
"Análise de expressões faciais",
|
||||||
"Contagem de pessoas"
|
"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",
|
"documentacao": "https://github.com/espressif/esp-who",
|
||||||
"repositorio": "https://github.com/espressif/esp-who",
|
"repositorio": "https://github.com/espressif/esp-who",
|
||||||
"cor": "#E67E22"
|
"cor": "#E67E22"
|
||||||
@@ -142,7 +146,8 @@
|
|||||||
"Detecção de anomalias",
|
"Detecção de anomalias",
|
||||||
"IA na borda (Edge AI)"
|
"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",
|
"documentacao": "https://github.com/espressif/esp-nn",
|
||||||
"repositorio": "https://github.com/espressif/esp-nn",
|
"repositorio": "https://github.com/espressif/esp-nn",
|
||||||
"cor": "#1ABC9C"
|
"cor": "#1ABC9C"
|
||||||
@@ -172,7 +177,8 @@
|
|||||||
"Termostatos",
|
"Termostatos",
|
||||||
"Dispositivos de controle de cortinas"
|
"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/",
|
"documentacao": "https://docs.espressif.com/projects/esp-matter/",
|
||||||
"repositorio": "https://github.com/espressif/esp-matter",
|
"repositorio": "https://github.com/espressif/esp-matter",
|
||||||
"cor": "#F39C12"
|
"cor": "#F39C12"
|
||||||
@@ -202,7 +208,8 @@
|
|||||||
"Sensores e atuadores básicos",
|
"Sensores e atuadores básicos",
|
||||||
"Projetos DIY"
|
"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/",
|
"documentacao": "https://docs.espressif.com/projects/arduino-esp32/",
|
||||||
"repositorio": "https://github.com/espressif/arduino-esp32",
|
"repositorio": "https://github.com/espressif/arduino-esp32",
|
||||||
"cor": "#00979D"
|
"cor": "#00979D"
|
||||||
@@ -232,7 +239,8 @@
|
|||||||
"Projetos de ciência de dados embarcados",
|
"Projetos de ciência de dados embarcados",
|
||||||
"Testes e validação"
|
"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/",
|
"documentacao": "https://docs.micropython.org/en/latest/esp32/",
|
||||||
"repositorio": "https://github.com/micropython/micropython",
|
"repositorio": "https://github.com/micropython/micropython",
|
||||||
"cor": "#2B2B2B"
|
"cor": "#2B2B2B"
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 125°C",
|
"temperatura_operacao": "-40°C a 125°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32.png",
|
||||||
"cor": "#007bff"
|
"cor": "#007bff"
|
||||||
},
|
},
|
||||||
"ESP32-S2": {
|
"ESP32-S2": {
|
||||||
@@ -64,6 +65,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 85°C",
|
"temperatura_operacao": "-40°C a 85°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-s2_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-s2_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-s2.png",
|
||||||
"cor": "#28a745"
|
"cor": "#28a745"
|
||||||
},
|
},
|
||||||
"ESP32-S3": {
|
"ESP32-S3": {
|
||||||
@@ -99,6 +101,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 85°C",
|
"temperatura_operacao": "-40°C a 85°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-s3_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-s3_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-s3.png",
|
||||||
"cor": "#fd7e14"
|
"cor": "#fd7e14"
|
||||||
},
|
},
|
||||||
"ESP32-C3": {
|
"ESP32-C3": {
|
||||||
@@ -129,6 +132,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 105°C",
|
"temperatura_operacao": "-40°C a 105°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-c3_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-c3_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-c3.png",
|
||||||
"cor": "#20c997"
|
"cor": "#20c997"
|
||||||
},
|
},
|
||||||
"ESP32-C5": {
|
"ESP32-C5": {
|
||||||
@@ -160,6 +164,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 85°C",
|
"temperatura_operacao": "-40°C a 85°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-c5_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-c5_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-c5.png",
|
||||||
"cor": "#6f42c1"
|
"cor": "#6f42c1"
|
||||||
},
|
},
|
||||||
"ESP32-C6": {
|
"ESP32-C6": {
|
||||||
@@ -193,6 +198,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 105°C",
|
"temperatura_operacao": "-40°C a 105°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-c6_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-c6_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-c6.png",
|
||||||
"cor": "#17a2b8"
|
"cor": "#17a2b8"
|
||||||
},
|
},
|
||||||
"ESP32-P4": {
|
"ESP32-P4": {
|
||||||
@@ -229,6 +235,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 85°C",
|
"temperatura_operacao": "-40°C a 85°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-p4_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-p4_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-p4.png",
|
||||||
"cor": "#ffc107"
|
"cor": "#ffc107"
|
||||||
},
|
},
|
||||||
"ESP32-H2": {
|
"ESP32-H2": {
|
||||||
@@ -261,6 +268,7 @@
|
|||||||
"temperatura_operacao": "-40°C a 85°C",
|
"temperatura_operacao": "-40°C a 85°C",
|
||||||
"temperatura_armazenamento": "-40°C a 150°C",
|
"temperatura_armazenamento": "-40°C a 150°C",
|
||||||
"datasheet": "https://documentation.espressif.com/esp32-h2_datasheet_en.pdf",
|
"datasheet": "https://documentation.espressif.com/esp32-h2_datasheet_en.pdf",
|
||||||
|
"placa": "/placas/esp32-h2.png",
|
||||||
"cor": "#6c757d"
|
"cor": "#6c757d"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user