Cannot compile BMP180 + OLED sketch

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
fredfit
Posts: 22
Joined: 17 Jun 2020 12:50

Cannot compile BMP180 + OLED sketch

Post by fredfit »

Hi all,

I cannot compile the example sketch of the "I2C pressure and temperature sensor BMP180 and OLED display" article.
(https://z-uno.z-wave.me/examples/bmp180-oled/)
It looks very simple though ...
I checked in my managed libraries that I have ZUNO_BMP180 and ZUNO_OLED_I2C present (downloaded from https://github.com/Z-Wave-Me/Z-Uno-Core ... /libraries). I also updated both Arduino IDE to version 1.8.13 and Z-Uno package to version 2.1.7. Despite that, I get an error message that I don't understand:

Code: Select all

	************* Building Arduino Sketch *************
	C:\Users\fredf\AppData\Local\Temp\arduino_build_389334/ZUno_exemple_BMP180_OLED.ino
	***************************************************

	 --- USING a list of libraries from:
		C:\Users\fredf\AppData\Local\Arduino15\packages\Z-Uno\hardware\zw8051\2.1.7\libraries
		C:\Users\fredf\Documents\Arduino\libraries
	*** Collecting prototypes...
Preprocessing file: Custom.c with SDCPP... 

Preprocessing file: Print.cpp with SDCPP... 
Compiling Print_sdcpp_.cpp ...
Print_sdcpp_.cpp:543:17:warning:& has lower precedence than ==; == will be evaluated first
Preprocessing file: Stream.cpp with SDCPP... 
Compiling Stream_sdcpp_.cpp ...
Preprocessing file: HardwareSerial.cpp with SDCPP... 
Compiling HardwareSerial_sdcpp_.cpp ...
Preprocessing file: HLCore.cpp with SDCPP... 
Compiling HLCore_sdcpp_.cpp ...
Preprocessing file: Wire.cpp with SDCPP... 
Compiling Wire_sdcpp_.cpp ...
Preprocessing file: ZUNO_BMP180.cpp with SDCPP... 
Compiling ZUNO_BMP180_sdcpp_.cpp ...
ZUNO_BMP180_sdcpp_.cpp:910:1:warning:control may reach end of non-void function
Preprocessing file: ZUNO_OLED_I2C.cpp with SDCPP... 
ZUNO_OLED_I2C.cpp:299:10: warning: missing terminating ' character
ZUNO_OLED_I2C.cpp:774:16: warning: missing terminating " character
ZUNO_OLED_I2C.cpp:775:7: warning: missing terminating " character
ZUNO_OLED_I2C.cpp:2203:12: warning: missing terminating ' character
ZUNO_OLED_I2C.cpp:2317:111: warning: missing terminating ' character
ZUNO_OLED_I2C.cpp:2329:138: warning: missing terminating ' character

Compiling ZUNO_OLED_I2C_sdcpp_.cpp ...
ZUNO_OLED_I2C_sdcpp_.cpp:10:1:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:53:49:error:non-ASCII characters are not allowed outside of literals and identifiers
ZUNO_OLED_I2C_sdcpp_.cpp:53:73:error:non-ASCII characters are not allowed outside of literals and identifiers
ZUNO_OLED_I2C_sdcpp_.cpp:174:27:error:unknown type name 'up'
ZUNO_OLED_I2C_sdcpp_.cpp:175:15:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:201:267:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:215:332:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:216:308:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:239:299:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:242:113:error:unknown type name 'contribute'
ZUNO_OLED_I2C_sdcpp_.cpp:242:123:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:276:262:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:284:312:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:285:334:error:expected unqualified-id
ZUNO_OLED_I2C_sdcpp_.cpp:303:10:warning:missing terminating ' character
ZUNO_OLED_I2C_sdcpp_.cpp:350:75:error:non-ASCII characters are not allowed outside of literals and identifiers
ZUNO_OLED_I2C_sdcpp_.cpp:355:56:error:non-ASCII characters are not allowed outside of literals and identifiers
ZUNO_OLED_I2C_sdcpp_.cpp:391:75:error:non-ASCII characters are not allowed outside of literals and identifiers
ZUNO_OLED_I2C_sdcpp_.cpp:396:56:error:non-ASCII characters are not allowed outside of literals and identifiers
ZUNO_OLED_I2C_sdcpp_.cpp:423:75:error:non-ASCII characters are not allowed outside of literals and identifiersUnknown error:'NoneType' object has no attribute 'name' uCxx returned error code:-1

exit status 1
Error compiling for board Z-Wave>ME Z-Uno.
Can someone please help me in finding what is wrong ? Thanks in advance ;)
fredfit
Posts: 22
Joined: 17 Jun 2020 12:50

Re: Cannot compile BMP180 + OLED sketch

Post by fredfit »

I finally found out what was wrong by comparing the behaviour of the compilation with the same sketch on another PC equipped with the same versions of Arduino (1.8.13) and Z-Uno (2.1.7). The compilation worked well on this other PC.
By comparing the content of the ZUNO_OLED_I2C library's folder, i found out that there were the following files that were missing in the first PC:

oled_img_conv.py
ZUNO_OLED_FONT_NUMB16.cpp
ZUNO_OLED_FONT_NUMB16.h
ZUNO_OLED_FONT_NUMB24.cpp
ZUNO_OLED_FONT_NUMB24.h
ZUNO_OLED_FONT_NUMB40.cpp
ZUNO_OLED_FONT_NUMB40.h
ZUNO_OLED_FONT_RUS8.cpp
ZUNO_OLED_FONT_RUS8.h
ZUNO_OLED_IMG_LOGO.cpp
ZUNO_OLED_IMG_LOGO.h

This first PC had only ZUNO_OLED_I2C.cpp and ZUNO_OLED_I2C.h files.
Adding manually the missing files to the first PC, the compilation now works fine.

Beyond this, I'm very interested to have your comments since this library was downloaded from the official GitHub. I checked again that only those two files are available for download from the GitHub repository.
Is it a mistake or am I doing something wrong in the way I look for some specific libraries ?
User avatar
PoltoS
Posts: 7571
Joined: 26 Jan 2011 19:36

Re: Cannot compile BMP180 + OLED sketch

Post by PoltoS »

May be you are using master branch instead of the one we use for latest versions?
fredfit
Posts: 22
Joined: 17 Jun 2020 12:50

Re: Cannot compile BMP180 + OLED sketch

Post by fredfit »

Thank you, I'll now use the link you provided
Post Reply