SparkFun Forums 

Where electronics enthusiasts find answers.

What are we doing right with Artemis? What are we doing wrong? Let us know here!
#215966
Since I cannot run the inbuilt BLE - not sure when, I use a standard HC-05 which I can run without anyproblem.
Then I want to display messages using the Zio OLED. The display is not working. But if I run the OLED example, it works.

Any assistance will be appreciated.

SmartDevice.ino
#include <SoftwareSerial.h>
#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif

U8G2_SSD1327_EA_W128128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

SoftwareSerial BT(0, 1);

void setup() {
// put your setup code here, to run once:
BT.begin(9600);
Serial.begin(9600);

}
void loop() {
// put your main code here, to run repeatedly:
if (BT.available())
{
Serial.print((char)BT.read());
OLED(); // NOT WORKING BUT IT DID DELAYED.
}
if (Serial.available())
{
BT.print((char)Serial.read());
}
}
void OLED()
{
// OLED BT
u8g2.setFont(u8g2_font_unifont_t_chinese2); // use chinese2 for all the glyphs of "你好世界"
//u8g2.setFont(u8g2_font_b10_t_japanese1); // all the glyphs of "こんにちは世界" are already included in japanese1: Lerning Level 1-6
u8g2.setFontDirection(0);
u8g2.firstPage();
do {
u8g2.setCursor(0, 15);
u8g2.print("Bluetooth Hello World!");
u8g2.setCursor(0, 40);
u8g2.print("你好世界"); // Chinese "Hello World"
//u8g2.print("こんにちは世界"); // Japanese "Hello World"
} while ( u8g2.nextPage() );
delay(1000);
}
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum