• if USE_UI_CONTROL doUI(); endif // USE_UI_CONTROL if (P.displayAnimate()) { if (newMessageAvailable)
  • LINK: https://wokwi.com/projects/364075476305102849
  • Set to 1 if we are implementing the user interface pot, switch, etc




    Download 0.51 Mb.
    bet3/3
    Sana30.11.2023
    Hajmi0.51 Mb.
    #108104
    1   2   3
    Bog'liq
    2 amaliy ish
    Qambarov Abrorbek
    P.setInvert(!P.getInvert());
    }
    }
    #endif // USE_UI_CONTROL


    void readSerial(void)
    {
    static char *cp = newMessage;


    while (Serial.available())
    {
    *cp = (char)Serial.read();
    if ((*cp == '\n') (cp - newMessage >= BUF_SIZE - 2)) // end of message character or full buffer
    {
    *cp = '\0'; // end the string
    // restart the index for next filling spree and flag we have a message waiting
    cp = newMessage;
    newMessageAvailable = true;
    }
    else // move char pointer to next position
    cp++;
    }
    }


    void setup()
    {
    Serial.begin(57600);
    Serial.print("\n[Parola Scrolling Display]\nType a message for the scrolling display\nEnd message line with a newline");


    #if USE_UI_CONTROL
    uiDirection.begin();
    uiInvert.begin();
    pinMode(SPEED_IN, INPUT);


    doUI();
    #endif // USE_UI_CONTROL


    P.begin();
    P.displayText(curMessage, scrollAlign, scrollSpeed, scrollPause, scrollEffect, scrollEffect);
    }


    void loop()
    {
    #if USE_UI_CONTROL
    doUI();
    #endif // USE_UI_CONTROL


    if (P.displayAnimate())
    {
    if (newMessageAvailable)
    {
    strcpy(curMessage, newMessage);
    newMessageAvailable = false;
    }
    P.displayReset();
    }
    readSerial();
    }





    LINK: https://wokwi.com/projects/364075476305102849
    Download 0.51 Mb.
    1   2   3




    Download 0.51 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Set to 1 if we are implementing the user interface pot, switch, etc

    Download 0.51 Mb.