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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
// To enable support when usng a Micro instead of a Nano, uncomment the next line
#defineCONTROLLERISAMICRO1// provided by IL, enables the serialEventRun function for a Micro
and I get the above error
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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
it is uncommented:
and I get the above error
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
Hi
I am using V298, isn't it repeated automatically in the filename?
greetings
Tom
Am 23.08.2020 um 05:43 schrieb brownrb:
Email me at either gmail or yahoo - you will find an email address in the pdf etc