mirror of
https://github.com/s00500/SimpleExpressions
synced 2024-12-22 04:10:49 +00:00
fixing init methods
This commit is contained in:
parent
1898615bab
commit
ea9fabe9a4
@ -4,21 +4,13 @@
|
||||
#define ledc_channel 5
|
||||
|
||||
void SimpleExpressionsClass::init(int aMouthPin, int aBuzzerPin) {
|
||||
mouth = Adafruit_NeoPixel(7, aMouthPin, NEO_GRB + NEO_KHZ800);
|
||||
mouth.begin();
|
||||
|
||||
buzzerPin = aBuzzerPin;
|
||||
|
||||
#if defined(ESP32)
|
||||
ledcSetup(ledc_channel, 2000, 8); // channel, max frequency, resolution
|
||||
ledcAttachPin(aBuzzerPin, ledc_channel);
|
||||
#endif
|
||||
|
||||
|
||||
initMouth(aMouthPin);
|
||||
initBuzzer(aBuzzerPin);
|
||||
clearMouth();
|
||||
}
|
||||
|
||||
void SimpleExpressionsClass::init(int aMouthPin, int aBuzzerPin) {
|
||||
|
||||
void SimpleExpressionsClass::initMouth(int aMouthPin) {
|
||||
mouth = Adafruit_NeoPixel(7, aMouthPin, NEO_GRB + NEO_KHZ800);
|
||||
mouth.begin();
|
||||
clearMouth();
|
||||
|
@ -16,8 +16,8 @@ class SimpleExpressionsClass
|
||||
public:
|
||||
// General
|
||||
void init(int mouthPin, int buzzerPin);
|
||||
void initMouth(int mouthPin);
|
||||
void initBuzzer(int buzzerPin);
|
||||
void initMouth(int mouthPin);
|
||||
void initBuzzer(int buzzerPin);
|
||||
|
||||
// Mouths
|
||||
void printMouth(int number, int r, int g, int b);
|
||||
|
Loading…
Reference in New Issue
Block a user