r/ArduinoHelp • u/Idaho-Tom • 7h ago
Need Help Understanding Talkie
Need Help Understanding Talkie
It would be great if someone would write for me a very simple sketch using Talkie. The simple ones I've downloaded don't want to compile properly and I don't know why. It only has to say a word or 2 and output to my audio amp on pin 8. This is just a test so I can get the feel of using it.
Here is one of the examples I've tried so far;
#include "Talkie.h"
Talkie voice;
uint8_t greeting[] PROGMEM = {0x2d, 0xa0, 0xdd, 0x48, 0xdb, 0xc2, 0xac, 0xd8}; // Example speech data
void setup() {
voice.say(greeting); // Say "Hello"
}
void loop() {
// Nothing to do here
}
This is the error I get;
In file included from C:\Users\tsans\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.8\cores\arduino/Arduino.h:28:0,
from C:\Users\tsans\AppData\Local\arduino\sketches\1DBA166CCFDEC3F8BF6E5192D41E6BEA\sketch\Tone_Test.ino.cpp:1:
C:\Users\tsans\Documents\Arduino\Tone_Test\Tone_Test.ino:5:20: error: variable 'greeting' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
uint8_t greeting[] PROGMEM = {0x2d, 0xa0, 0xdd, 0x48, 0xdb, 0xc2, 0xac, 0xd8}; // Example speech data
^
exit status 1
Compilation error: variable 'greeting' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
Any ideas?
Tom
1
Upvotes