PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Examples
Badge
08 Speech
01 Say Hello Goodbye.c
1
/*
2
Say Hello Goodbye.c
3
Say "hello" and "goodbye". Note that the spelling in the talk_say
4
function calls is phonetic. See Documentation text2speech Library.html
5
for a list of character strings for creating phonemes.
6
*/
7
8
#include "
simpletools.h
"
// Include simpletools library
9
#include "
badgetools.h
"
// Include badgetools library
10
#include "
text2speech.h
"
// Include text2speech library
11
12
talk
*spkr;
// Talk process ID/data pointer
13
14
void
main
()
// Main function
15
{
16
badge_setup
();
// Start badge systems
17
spkr =
talk_run
(9, 10);
// Start talk process
18
oledprint
(
"Hello\n"
);
// Display hello
19
talk_say
(spkr,
"heloa"
);
// Say hello
20
pause
(1500);
// Pause for 1.5 s
21
oledprint
(
"Goodbye\n"
);
// Display goodbye
22
talk_say
(spkr,
"goodbae"
);
// Say goodbye
23
}
24
pause
void pause(int time)
Delay cog from moving on to the next statement for a certain length of time.
Definition:
libws2812.c:125
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
talk_say
int32_t talk_say(talk *talkId, char *ptr)
Pronounce speech using strings spelled phonetically. Make sure to look over the function details (fol...
Definition:
talk.c:323
main
int main(void)
Definition:
GraphicsTest.c:20
oledprint
int oledprint(const char *fmt,...)
Use to display strings on the oLED display in a manner similar to displaying combinations of strings ...
Definition:
peb_text.c:4
badge_setup
int badge_setup(void)
Set up all available badge drivers. Call this function at the start of any given program to allow acc...
Definition:
badgealpha.c:29
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
text2speech.h
Pronounces words spelled out phonemically. This library is a spin2cpp.exe translation of Phil Pilgrim...
talk_run
talk * talk_run(int pin, int npin)
Run a talk process, uses a cog.
Definition:
talk.c:164
talk
Definition:
text2speech.h:101
Generated on Fri May 20 2022 16:48:04 for PropWare by
1.8.17