No SSD1306 libraries working

Working libraries, libraries being ported and related hardware
Mabez
Posts: 8
Joined: Tue Nov 22, 2016 12:05 am

No SSD1306 libraries working

Post by Mabez » Fri Nov 25, 2016 1:58 pm

Hi,

I am really trying to get my I2C display to work, I originally posted about using u8glib but I cannot get it to work, so I thought just to get it running I would use the two libraries that come with the STMduino cores, the OLED_I2C and adafruits lib. Whats strange is both of these compile using the examples but don't actually run, by that I mean I have added serial statements through out and they are never seen.

Arduino IDE: 1.6.9
STM32F1 Series - 'blue pill'

the changed example code:

Code: Select all

#include <OLED_I2C.h>

OLED  myOLED(SDA, SCL, 8);

extern uint8_t SmallFont[];

void setup()
{
  myOLED.begin();
  myOLED.setFont(SmallFont);
  //randomSeed(analogRead(0));
  Serial.begin(9600);
  delay(5000);
  Serial.println("STARTING!");
}

void loop()
{
  int y = random(0, 56);
  for (int i=128; i>=-(34*6); i--)
  {
    myOLED.print("OLED_I2C Scrolling Text Demo ", i, y);
    myOLED.update();
    Serial.println("In Loop");
    delay(50);
  }
}
Cheers,

Mabez

stevestrong
Posts: 1139
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: No SSD1306 libraries working

Post by stevestrong » Sat Nov 26, 2016 8:42 am

Try to call serial begin before OLED begin in setup.
Then be sure that you are not using the F() macro to print text.
Furthermore, be sure that you are connecting the serial monitor to the correct port, after the serial re-enumeration on the PC took place.
To wait till serial is available I would recommend the following code:

Code: Select all

while ( !Serial.isConnected() ) ;
instead of

Code: Select all

delay(5000);

Mabez
Posts: 8
Joined: Tue Nov 22, 2016 12:05 am

Re: No SSD1306 libraries working

Post by Mabez » Sat Nov 26, 2016 5:58 pm

Hi Steve,

Thanks for your reply, Serial.isConnected would not compile, and moving Serial.begin(9600) before oled.begin() hasn't helped, I am definitely on the correct port as if a run a sample sketch with just Serial prints it works fine. This is such a strange problem nothing like anything I've seen before and its infuriating :x

stevestrong
Posts: 1139
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: No SSD1306 libraries working

Post by stevestrong » Sat Nov 26, 2016 8:16 pm

Mabez wrote: Serial.isConnected() would not compile
It should compile, as it is defined here and here.
Please check if the Arduino board/target is correctly selected.
Post the compile error if it still doesn't.

david.prentice
Posts: 79
Joined: Wed Nov 16, 2016 8:52 am

Re: No SSD1306 libraries working

Post by david.prentice » Sat Nov 26, 2016 10:11 pm

I tried OLED_I2C_Scrolling_Text example on my Nucleo-F103.

It works if I write the specific constuctor:

Code: Select all

//OLED  myOLED(SDA, SCL, 8);
OLED  myOLED(14, 15, 8);     //Hardware I2C pin header on the Nucleo
The STM32 "build" seems to have SDA, SCL defined as 15, 16.
So OLED_I2C actually uses software I2C.

David.

User avatar
RogerClark
Posts: 5923
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: No SSD1306 libraries working

Post by RogerClark » Sat Nov 26, 2016 10:50 pm

Hi David

Which core are you using , LibMaple or the new STM core.

In Libmaple, the default Wire library (bit banged soft Wire)

Code: Select all

#define SDA PB7
#define SCL PB6
These are the hardware I2C pins on the F103, and we use these pins by default so people can upgrade to hardware I2C and not change their connections

I checked the pin mapping for Nucleo and pins 14 and 15 seem to be PB9 and PB8 respectively.

Looking in STM's docs those pins have SCL and SDA defined as "Alternative functions"

I'm not sure if this would work, but I suppose we could change LibMaple's Wire.h and put a guard #ifdef around the define for SCL and SDA and add those defines to one of the nucleo variant headers, but I'm not sure which header would get pulled in first by the IDE


...

Of course if you are using the STM core, things could be completely different, in which case you'd need to tell me if you installed via JSON or using the repo directly (as the JSON boards manager file is the original official release and the code now in the repo is our modified / improved version which may have bugs)

david.prentice
Posts: 79
Joined: Wed Nov 16, 2016 8:52 am

Re: No SSD1306 libraries working

Post by david.prentice » Sat Nov 26, 2016 11:24 pm

It seems to be using libmaple. I just installed whatever the defaults were from your website.

If there is an "official" STM build, it seems wise to use that rather than the legacy libmaple.

In fact, the F103 I2C works fine if you use a specific <HardWire.h> constructor and tell it to use the Alternate pins. e.g.

Code: Select all

#if defined(ARDUINO_STM_NUCLEO_F103RB)
#include <HardWire.h>
HardWire HWire(1, I2C_REMAP | I2C_FAST_MODE); // I2c1
#define Wire HWire
#else
#include <Wire.h>
#endif
It looks as if the Maple does not have a dedicated I2C header. So I can see the argument for bit-bashing on A4, A5.
Otherwise, I would expect the default to be Hardware I2C with the mapping in variants/.
The breadboardable modules still have "Arduino pins" but obviously no proper shield headers.

How many Maple boards exist? They possess Arduino headers.
I have ordered an IteadMaple but I think that it is no longer manufactured. There are a few left in stock.

There must be an awful lot of Nucleos out there. Whether F103, F0, F4.

David.

User avatar
RogerClark
Posts: 5923
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: No SSD1306 libraries working

Post by RogerClark » Sat Nov 26, 2016 11:34 pm

The whole LibMaple code base was written by LeafLabs in 2012 to support the Maple mini.

I don't know how many Nucleo F103 boards are in circulation but only about 5% of the forum members seem to use that board.

The majority use the "Blue Pill" or other generic (no brand) STM32F103 boards, so the LibMaple will not be changed it causes any problems to the 95% of users who don't use the Nucleo

See https://github.com/stm32duino/BoardManagerFiles for the JSON installer for the official release for Nucleo F103RB and Nucleo L476

Mabez
Posts: 8
Joined: Tue Nov 22, 2016 12:05 am

Re: No SSD1306 libraries working

Post by Mabez » Sat Nov 26, 2016 11:52 pm

Board : Generic STM32F103CB
Upload type: Serial
Arduino SAM 32 bit board definitions installed, tried on 1.6.9 and 1.6.5

Code: Select all

Arduino: 1.6.9 (Windows 10), Board: "Generic STM32F103C series, STM32F103CB (20k RAM. 128k Flash), Serial"

C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\arduino-builder -dump-prefs -logger=machine -hardware "C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\hardware" -hardware "C:\Users\mabez\AppData\Local\Arduino15\packages" -hardware "C:\Users\mabez\Documents\Arduino\hardware" -tools "C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\tools-builder" -tools "C:\Users\mabez\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\libraries" -libraries "C:\Users\mabez\Documents\Arduino\libraries" -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103CB,upload_method=serialMethod -ide-version=10609 -build-path "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\mabez\AppData\Local\Temp\arduino_modified_sketch_80355\OLED_I2C_Scrolling_Text.ino"
C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\arduino-builder -compile -logger=machine -hardware "C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\hardware" -hardware "C:\Users\mabez\AppData\Local\Arduino15\packages" -hardware "C:\Users\mabez\Documents\Arduino\hardware" -tools "C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\tools-builder" -tools "C:\Users\mabez\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\libraries" -libraries "C:\Users\mabez\Documents\Arduino\libraries" -fqbn=Arduino_STM32:STM32F1:genericSTM32F103C:device_variant=STM32F103CB,upload_method=serialMethod -ide-version=10609 -build-path "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\mabez\AppData\Local\Temp\arduino_modified_sketch_80355\OLED_I2C_Scrolling_Text.ino"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\sketch\OLED_I2C_Scrolling_Text.ino.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\sketch\OLED_I2C_Scrolling_Text.ino.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C\DefaultFonts.c" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C\OLED_I2C.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C\OLED_I2C.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\sketch\OLED_I2C_Scrolling_Text.ino.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire\HardWire.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire\Wire.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire\WireBase.cpp" -o "nul"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE  -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -w -x c++ -E -CC -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\sketch\OLED_I2C_Scrolling_Text.ino.cpp" -o "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Users\mabez\Downloads\arduino-1.6.9-windows\arduino-1.6.9\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Users\mabez\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -c -g -Os -w -DDEBUG_LEVEL=DEBUG_NONE -MMD -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -DBOARD_generic_stm32f103c -DVECT_TAB_ADDR=0x8000000 -DERROR_LED_PORT=GPIOB -DERROR_LED_PIN=1 -mcpu=cortex-m3 -DF_CPU=72000000L -DARDUINO=10609 -DARDUINO_GENERIC_STM32F103C -DARDUINO_ARCH_STM32F1   -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ -DMCU_STM32F103CB  -mthumb  -march=armv7-m -D__STM32F1__ "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/include" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/stm32f1/include"                                                           "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/stm32f1" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\system/libmaple/usb/usb_lib" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\variants\generic_stm32f103c" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C" "-IC:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire" "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\sketch\OLED_I2C_Scrolling_Text.ino.cpp" -o "C:\Users\mabez\AppData\Local\Temp\build1bba08f324dcc027ee3a42cdd38bb0cf.tmp\sketch\OLED_I2C_Scrolling_Text.ino.cpp.o"
C:\Users\mabez\AppData\Local\Temp\arduino_modified_sketch_80355\OLED_I2C_Scrolling_Text.ino: In function 'void setup()':

OLED_I2C_Scrolling_Text:49: error: 'class HardwareSerial' has no member named 'isConnected'

   while(!Serial.isConnected());

                 ^

Using library OLED_I2C in folder: C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\OLED_I2C (legacy)
Using library Wire in folder: C:\Users\mabez\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Wire (legacy)
exit status 1
'class HardwareSerial' has no member named 'isConnected'

User avatar
RogerClark
Posts: 5923
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: No SSD1306 libraries working

Post by RogerClark » Sun Nov 27, 2016 1:03 am

Hardware Serial does not have a function called isConnected, as would be meaningless

There is no way for the hardware serial pins on the device to know if they are connected to anything.

isConnected only applies to Serial USB, and either way this has nothing to do with the OLED lib as it doesnt use isConnected in any of its examples as far as I can tell

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest