This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
compile error
#1
Hi Werk

I am upgrading the software to the latest version but am getting a compile error

Serial1  was not declared in this scope

ESP8266 wifi (Serial1)

I have V1.3 rx board and it is correct in the config also the Wee8266 library is loaded..this seems to be the only error...any ideas?

Mark
Reply
#2
I am using V1.8.5 IDE
Reply
#3
Arduino: 1.8.5 (Mac OS X), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

WeatherDuinoPro2Plus_RX_v410_b006:434: error: 'Serial1' was not declared in this scope
ESP8266 wifi(Serial1);
^
/Users/Mark/Downloads/WeatherDuino_Pro2_PLUS/v4.1/software/RX software/WeatherDuinoPro2Plus_RX_v410_b006/Routines.ino: In function 'void B_doubleclick()':
Routines:433: error: 'PORTH' was not declared in this scope
setPortLOW(PORTH, 6); //digitalWrite(TFT_BKL, LOW);
^
/Users/Mark/Downloads/WeatherDuino_Pro2_PLUS/v4.1/software/RX software/WeatherDuinoPro2Plus_RX_v410_b006/WeatherDuinoPro2Plus_RX_v410_b006.ino:138:33: note: in definition of macro 'setPortLOW'
#define setPortLOW(port, pin) ((port) &= ~(1 << (pin)))
^
/Users/Mark/Downloads/WeatherDuino_Pro2_PLUS/v4.1/software/RX software/WeatherDuinoPro2Plus_RX_v410_b006/VP.ino: In function 'void cmdDmpaft()':
VP:294: error: 'PORTG' was not declared in this scope
setPortHIGH(PORTG, 1); //digitalWrite(FLASH_CS, HIGH);
^
/Users/Mark/Downloads/WeatherDuino_Pro2_PLUS/v4.1/software/RX software/WeatherDuinoPro2Plus_RX_v410_b006/WeatherDuinoPro2Plus_RX_v410_b006.ino:139:34: note: in definition of macro 'setPortHIGH'
#define setPortHIGH(port, pin) ((port) |= (1 << (pin)))
^
VP:306: error: 'PORTG' was not declared in this scope
setPortHIGH(PORTG, 1); //digitalWrite(FLASH_CS, HIGH);
^
/Users/Mark/Downloads/WeatherDuino_Pro2_PLUS/v4.1/software/RX software/WeatherDuinoPro2Plus_RX_v410_b006/WeatherDuinoPro2Plus_RX_v410_b006.ino:139:34: note: in definition of macro 'setPortHIGH'
#define setPortHIGH(port, pin) ((port) |= (1 << (pin)))
^
exit status 1
'Serial1' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Reply
#4
If you have a V1.3 rx PRO2 PLUS board i think the Arduino board selection should be a "Mega 2560" ! (Not a Atmega328P)
Laurent

[Image: bannerfr.php]
Reply
#5
That did the trick...thanks
Reply
#6
Hi
Sorry to be a nuisance but I am having trouble compiling the Air Quality Software. The error messages are listed below. Any assistance would be appreciated. 
Regards
Ian

PMS7003.ino: In function 'void read_PMS7003()':
PMS7003.ino:33:29: error: call of overloaded 'find(int)' is ambiguous
PMS7003.ino:33:29: note: candidates are:
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:29:0,
                 from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:223,
                 from C:\Users\idorm\Documents\Arduino\libraries\VirtualWire/VirtualWire.h:269,
                 from WeatherDuino_AirQualityMonitor_PMS_v700_b007.ino:37:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:59:8: note: bool Stream::find(char*) <near match>
   bool find(char *target);   // reads data from the stream until the target string is found
        ^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:59:8: note:   no known conversion for argument 1 from 'int' to 'char*'
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:60:8: note: bool Stream::find(uint8_t*) <near match>
   bool find(uint8_t *target) { return find ((char *)target); }
        ^
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:60:8: note:   no known conversion for argument 1 from 'int' to 'uint8_t* {aka unsigned char*}'
Error compiling.
Reply
#7
Hello Ian, hope you are well.

Could you please check the version of your Arduino IDE?
I'm not sure, but the reported issue seems related to the SoftwareSerial library. Latest versions of Aduino IDE already include this library. If you have any copy of this library in your personal libraries folder you can safelly delete (or backup) it.
I checked again the latest AQI software version (Air Quality Monitor v7.00 b007), and it compiles fine.

Happy New Year to you and family
Werk_AG
MeteoCercal - Air Quality Data
Click here to watch at my ThingSpeak channel



Reply
#8
Thanks Caneira. I was using my old laptop which was running an obsolete version of the software. Sorry that I needed to bother you.
Thanks for the greetings. All the best to you and your family for 2018 also.

Best regards
Ian
Reply
#9
Hello,

I have an old RX v5.02 I tried to update today an I am running IDE 1.8.4 (on MacOS) with software v500 b002.

I came across the same compilation error:

exit status 1
'Serial1' was not declared in this scope


If I select the board Mega2560 it compiles, but when I programme my Nano I have to select the Nano micro so it won't upload. 


ALOS, I also came across another issue related to the D_LCD tab which I corrected:

line 114: I believe should be:
else if (UV_OutUnit != 9 && TX_Unit[UV_OutUnit].UV != 0) L_info = 5;        and not       else if (UV_OutUnit != 9  TX_Unit[UV_OutUnit].UV != 0) L_info = 5;

line 124: I believe should be:
        lcd.print(TX_Unit[UV_OutUnit].SolarRad);      and not             lcd.print(TX_Unit[SRUV_OutUnit].SolarRad);

My v5.02 has no wifi onboard, shall i just comment the wifi definition lines?

Thanks!
Zitoune
Reply
#10
Problem solved when using the WeatherDuino Pro2 v3.0 and not the PLUS of course...  Angel Angel
Reply




Users browsing this thread: 1 Guest(s)