1
0
mirror of https://github.com/s00500/SimpleExpressions synced 2024-11-23 16:10:54 +00:00
SimpleExpressions/SimpleExpressions.h

49 lines
1.0 KiB
C
Raw Normal View History

2017-11-20 16:49:55 +00:00
#ifndef SimpleExpressions_h
#define SimpleExpressions_h
2017-11-20 13:59:19 +00:00
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#include "Shapes.h"
2017-11-21 23:30:35 +00:00
#define debug true
2017-11-20 16:49:55 +00:00
class SimpleExpressionsClass
2017-11-20 13:59:19 +00:00
{
public:
void init(int mouthPin, int buzzerPin);
2017-11-22 12:50:16 +00:00
void writeMouth(char mouthName[]);
void printMouthShape(int number);
2017-11-20 13:59:19 +00:00
void clearMouth();
2017-11-21 23:30:35 +00:00
void writeMouthRecolored(int mouth, uint32_t color);
2017-11-22 12:50:16 +00:00
void writeMouthGeneric(const int mouthArray[7][3]);
2017-11-21 12:09:40 +00:00
2017-11-22 12:50:16 +00:00
void putAnimationMouth(int anim, int index);
2017-11-21 12:09:40 +00:00
2017-11-20 13:59:19 +00:00
//-- 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;
2017-11-22 15:20:14 +00:00
Adafruit_NeoPixel mouth;
2017-11-20 13:59:19 +00:00
2017-11-22 12:50:16 +00:00
long int getMouthShape(int number);
long int getAnimShape(int anim, int index);
2017-11-20 13:59:19 +00:00
};
2017-11-20 16:49:55 +00:00
extern SimpleExpressionsClass SimpleExpressions;
2017-11-20 13:59:19 +00:00
#endif