Add ESP32 examples folder and sigma-delta example
This commit is contained in:
parent
150d2cec69
commit
a80b2b24a4
18
libraries/ESP32/examples/AnalogOut/SigmaDelta/SigmaDelta.ino
Normal file
18
libraries/ESP32/examples/AnalogOut/SigmaDelta/SigmaDelta.ino
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
void setup()
|
||||||
|
{
|
||||||
|
//setup channel 0 with frequency 312500 Hz
|
||||||
|
sigmaDeltaSetup(0, 312500);
|
||||||
|
//attach pin 18 to channel 0
|
||||||
|
sigmaDeltaAttachPin(18,0);
|
||||||
|
//initialize channel 0 to off
|
||||||
|
sigmaDeltaWrite(0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
//slowly ramp-up the value
|
||||||
|
//will overflow at 256
|
||||||
|
static uint8_t i = 0;
|
||||||
|
sigmaDeltaWrite(0, i++);
|
||||||
|
delay(100);
|
||||||
|
}
|
9
libraries/ESP32/library.properties
Normal file
9
libraries/ESP32/library.properties
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
name=ESP32
|
||||||
|
version=1.0
|
||||||
|
author=Hristo Gochkov, Ivan Grokhtkov
|
||||||
|
maintainer=Hristo Gochkov <hristo@espressif.com>
|
||||||
|
sentence=ESP32 sketches examples
|
||||||
|
paragraph=
|
||||||
|
category=Other
|
||||||
|
url=
|
||||||
|
architectures=esp32
|
2
libraries/ESP32/src/dummy.h
Normal file
2
libraries/ESP32/src/dummy.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
// This file is here only to silence warnings from Arduino IDE
|
||||||
|
// Currently IDE doesn't support no-code libraries, like this collection of example sketches.
|
Loading…
Reference in New Issue
Block a user