mirror of
https://github.com/s00500/SimpleExpressions
synced 2024-11-21 12:50:54 +00:00
52 lines
1.1 KiB
C++
Executable File
52 lines
1.1 KiB
C++
Executable File
#ifndef SimpleExpressions_h
|
|
#define SimpleExpressions_h
|
|
#include <Adafruit_NeoPixel.h>
|
|
#ifdef __AVR__
|
|
#include <avr/power.h>
|
|
#endif
|
|
|
|
#include "Shapes.h"
|
|
|
|
#define debug true
|
|
|
|
|
|
class SimpleExpressionsClass
|
|
{
|
|
public:
|
|
|
|
void init(int mouthPin, int buzzerPin);
|
|
|
|
void writeMouth(char mouthName[], int r, int g, int b);
|
|
void printMouth(int number, int r, int g, int b);
|
|
|
|
void writeMouth(char mouthName[]);
|
|
void printMouth(int number);
|
|
|
|
void clearMouth();
|
|
|
|
void writeMouthGeneric(const bool mouthArray[7], int r, int g, int b);
|
|
void writeMouthGeneric(const int mouthArray[7][3]);
|
|
|
|
//void putAnimationMouth(int anim, int index);
|
|
|
|
//-- Sounds
|
|
void _tone (float noteFrequency, long noteDuration, int silentDuration);
|
|
void bendTones (float initFrequency, float finalFrequency, float prop, long noteDuration, int silentDuration);
|
|
void sing(int songName);
|
|
|
|
//-- Gestures
|
|
//void playGesture(int gesture);
|
|
|
|
|
|
private:
|
|
int pinBuzzer;
|
|
Adafruit_NeoPixel mouth;
|
|
|
|
long int getMouthShape(int number);
|
|
long int getAnimShape(int anim, int index);
|
|
};
|
|
|
|
extern SimpleExpressionsClass SimpleExpressions;
|
|
|
|
#endif
|