Loxone PicoC example not working.

Einklappen
X
 
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge
  • Gast

    #1

    Loxone PicoC example not working.

    Hi everybody. I have a hard time getting PicoC working. I have a few programs written myself that works but none of them uses text output. I tried the example from: https://www.loxone.com/dede/kb/script-programming/ i.e. this example:

    // write program here in PicoC
    char szBuffer[128];
    float f1,f2,f3,f4;
    int nEvents;
    while(TRUE)
    {
    nEvents = getinputevent();
    if (nEvents & 0xe)
    {
    f1 = getinput(0);
    f2 = getinput(1);
    f3 = getinput(2);
    f4 = f1 * f2 + f3;
    setoutput(0,f4);
    sprintf(szBuffer,“/ * %f + %f = %f“,f1,f2,f3,f4);
    setoutputtext(0,szBuffer);
    printf(szBuffer);
    }
    sleep(100);
    }

    and changed the bitmask to: Program 16: if(nEvents & 0x38). I can't get anything out. Not from AQ1 or TQ1.

    What am I doing wrong here?
  • romildo
    Lebende Foren Legende
    • 25.08.2015
    • 5144

    #2
    Hi,
    If you put in the code line
    sprintf(szBuffer,“/ * %f + %f = %f“,f1,f2,f3,f4);
    with copy and paste, it dosn't work.
    Type in the sign “ by hand
    lg Romildo

    Kommentar

    • Gast

      #3
      Thanks man. Works as expected now

      Kommentar


      • romildo
        romildo kommentierte
        Kommentar bearbeiten
        You're welcome.
    Lädt...