Menu

issues incompiling myFP2_ULN2003_298.ino

Tom
2020-08-22
2020-08-23
  • Tom

    Tom - 2020-08-22

    Hi,
    tried to compile myFP2_ULN2003_298.ino
    it seems there is something missing around lines 842 in myFP2_ULN2003_298

    I give you the complet error-output:

    Arduino: 1.8.13 (Windows 10), Board: "Arduino Micro"

    In file included from
    F:\myFocuserPro2\myFP2_ULN2003_298\myFP2_ULN2003_298.ino:358:0:

    sketch\serialcomms.h: In function 'void serialEventRun()':

    serialcomms.h:614:5: error: 'serialEvent' was not declared in this scope

    serialEvent();

    ^~~~~~~~~~~

    sketch\serialcomms.h:614:5: note: suggested alternative: 'serialEventRun'

    serialEvent();

    ^~~~~~~~~~~

    serialEventRun

    F:\myFocuserPro2\myFP2_ULN2003_298\myFP2_ULN2003_298.ino: In function
    'void loop()':

    myFP2_ULN2003_298:1177:3: error: expected '}' at end of input

    } // end Loop()

    ^

    Mehrere Bibliotheken wurden für "OneWire.h" gefunden

    Benutzt: C:\Users\me\Documents\Arduino\libraries\OneWire

    Nicht benutzt: F:\arduino-1.8.13\libraries\OneWire

    exit status 1

    'serialEvent' was not declared in this scope

     
  • brownrb

    brownrb - 2020-08-22

    That is because u are using a Micro not a Nano

    see this
    // To enable support when usng a Micro instead of a Nano, uncomment the next line
    //#define CONTROLLERISAMICRO 1 // provided by IL, enables the serialEventRun function for a Micro

     
  • Tom

    Tom - 2020-08-22

    it is uncommented:

    // To enable support when usng a Micro instead of a Nano, uncomment the next line
    #define CONTROLLERISAMICRO 1           // provided by IL, enables the serialEventRun function for a Micro
    

    and I get the above error

     
  • brownrb

    brownrb - 2020-08-23

    In the serialcomms.h file you need to move some code around due to the compiler not being able to forward reference the required function.

    So open up serialcomms.h file in a text editor, find the lines below and CUT THEM OUT, then paste those lines before the final #endif statement at the end of the file.

    // (IL: Needed on Pro Micro Clone otherwise serial input is never processed) -------------------------------------------------------------------------------
    // On some boards serialEvent() is never called as serialEventRun is not defined
    // properly by the IDE. If so this function provides the missing definition.
    // Typically you will get a timeout error when you try to connect to the focuser
    // using the ASCOM driver or focuser app then you need to uncomment FORCE_SERIALEVENT
    // Checks to see if there is data in the Hardware Serial and if so calls serialEvent()
    // to process it. This is called automatically between each loop() run and calls
    // serialEvent() if there is data in the Hardware Serial that needs processing.
    //-------------------------------------------------------------------------------

    ifdef CONTROLLERISAMICRO

    void serialEventRun()
    {
    if (Serial.available())
    {
    serialEvent();
    }
    }

    endif

    // (IL: End of extra Pro Micro function) -------------------------------------------------------------------------------

     

    Last edit: brownrb 2020-08-23
  • brownrb

    brownrb - 2020-08-23

    Email me at either gmail or yahoo - you will find an email address in the pdf etc

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.