SimpleExpressions/src/SimpleExpressions.h

50 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"
#include "Sounds.h"
2017-11-20 13:59:19 +00:00
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:
// General
void init(int mouthPin, int buzzerPin);
void initMouth(int mouthPin);
void initBuzzer(int buzzerPin);
2017-11-20 13:59:19 +00:00
// Mouths
void printMouth(int number, int r, int g, int b);
void writeMouth(const char mouthName[], int r, int g, int b);
2017-11-23 11:28:47 +00:00
void printMouth(int number);
void writeMouth(const char mouthName[]);
2017-11-22 12:50:16 +00:00
void clearMouth();
void showMouth();
2017-11-20 13:59:19 +00:00
void writeMouthGeneric(const int mouthArray[7][3]);
void writeMouthGeneric(const bool mouthArray[7], int r, int g, int b);
// Sounds
void _tone (float noteFrequency, long noteDuration, int silentDuration);
void bendTones (float initFrequency, float finalFrequency, float prop, long noteDuration, int silentDuration);
void playSound(int soundName);
2017-11-20 13:59:19 +00:00
private:
Adafruit_NeoPixel mouth;
void clearPixels();
int buzzerPin;
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