Shop OBEX P1 Docs P2 Docs Learn Events
Problem about using Propeller C to control the text-to-speech module. — Parallax Forums

Problem about using Propeller C to control the text-to-speech module.

JarvanJarvan Posts: 31
edited 2014-06-13 00:14 in General Discussion
#include "simpletools.h" // Include simple tools
#include "fdserial.h"
#include "simpletext.h"


fdserial *emic;
char speak[] ={"hello"};
int main()
{
print("Emic2 start\n");

emic = fdserial_open(9, 8, 0, 9600);

print("waiting for Emic2...\n");


pause(1000);


fdserial_txChar(emic,'S');


pause(200);

fdserial_txChar(emic, &speak);

pause(200);


fdserial_txChar(emic, "D1\n");
}

Comments

  • SRLMSRLM Posts: 5,045
    edited 2014-06-10 06:27
    And the problem is?

    If I had to guess, it's because you're passing a pointer to the fdserial_txChar function, which only takes literal bytes. You'll need to write a loop to iterate over your strings and output the characters one by one.
  • jazzedjazzed Posts: 11,803
    edited 2014-06-10 07:15
    [php]
    #include "simpletools.h"
    #include "fdserial.h"

    fdserial *emic;
    char speak[] ={"hello"};

    int main()
    {
    print("Emic2 start\n");

    emic = fdserial_open(9, 8, 0, 9600);

    print("waiting for Emic2...\n");

    pause(1000);

    writeChar(emic,'S');

    pause(200);

    dprint(emic, &speak);

    pause(200);

    dprint(emic, "D1\n");
    }
    [/php]
  • JarvanJarvan Posts: 31
    edited 2014-06-13 00:14
    Great help ! Thank you SRLM and jazzed.
Sign In or Register to comment.