The product I refer is(Link goes to Arduino Store):
The library I refer is (link goes to Arduino reference libraries:
arduino_sensorkit 1.0.9
Every example code is working well expect the
Combined_Demo example it displays nothing!
The only thing is working the buzzer makes sound when button is pressed.
Do you have some hints why the OLED display shows nothing?
Here the Arduino_Sensorkit official Example Combined_Demo from Arduino!
// Combined Demo by Marc MERLIN <marc_soft@merlins.org>
// Reviewed by Pablo Marquínez <p.marquinez@arduino.cc>
// This demo uses all the devices from the Arduino Sensor Kit
// Showing the values on the Display
#include "Arduino_SensorKit.h"
#define BUZZER 5
#define BUTTON 4
#define LED 6
#define POT A0
#define MIC A2
#define LIGHT A3
int pot_value;
bool button_state;
int mic_value;
int light_value;
void setup() {
Serial.begin(9600);
pinMode(MIC , INPUT);
pinMode(LIGHT , INPUT);
pinMode(BUTTON , INPUT);
pinMode(LED, OUTPUT);
digitalWrite(LED, LOW);
pinMode(BUZZER, OUTPUT);
Environment.begin();
Oled.begin();
Oled.setFlipMode(true);
Accelerometer.begin();
Pressure.begin();
}
void loop() {
Oled.setFont(u8x8_font_amstrad_cpc_extended_r);
//cursor values are in characters, not pixels
Oled.setCursor(0, 4);
// If accelerometer and altimeter are queried too close to one another
// this causes a hang, so we read this first.
Oled.print("x:");
Oled.print(Accelerometer.readX());
Oled.print(" y:");
Oled.print(Accelerometer.readY());
Oled.setCursor(0, 5);
Oled.print("z:");
Oled.print(Accelerometer.readZ());
Oled.print(" T:");
Oled.print(Environment.readTemperature());
Oled.print("C");
Oled.setCursor(0, 0);
Oled.print("But:");
pot_value = analogRead(POT);
button_state = digitalRead(BUTTON);
Oled.print(button_state);
if (button_state == true) {
digitalWrite(LED, HIGH);
tone(BUZZER, pot_value);
} else {
digitalWrite(LED, LOW);
noTone(BUZZER);
}
Oled.setCursor(0, 1);
Oled.print("BuzPot: ");
Oled.print(pot_value);
Oled.print("Hz ");
mic_value = analogRead(MIC);
Oled.setCursor(0, 2);
Oled.print("Mic: ");
Oled.print(mic_value);
Oled.print(" ");
light_value = analogRead(LIGHT);
Oled.setCursor(0, 3);
Oled.print("Light: ");
Oled.print(light_value);
Oled.print(" ");
Oled.setCursor(0, 6);
Oled.print("Hum: ");
Oled.print(Environment.readHumidity());
Oled.print("%");
Oled.setCursor(0, 7);
Oled.print("Alt:");
Oled.print(Pressure.readAltitude());
delay(100);
}
When I run separately the "Oled_Display" example the display works and also
when I run separately the "Pressure_sensor" everything works.
But let it combine and do following test:
#include "Arduino_SensorKit.h"
void setup() {
Serial.begin(9600);
Pressure.begin();
Oled.begin();
Oled.setFlipMode(true);
}
void loop() {
Oled.setFont(u8x8_font_chroma48medium8_r);
// Get and print temperatures
Serial.print("Temp: ");
Serial.print(Pressure.readTemperature());
Serial.println("C"); // The unit for Celsius because original Arduino don't support special symbols
Oled.setCursor(0, 1);
Oled.print("Temp: ");
Oled.print(Pressure.readTemperature());
// Get and print atmospheric pressure data
Serial.print("Pressure: ");
Serial.print(Pressure.readPressure());
Serial.println("Pa");
Oled.setCursor(0, 2);
Oled.print("Pressure: ");
Oled.print(Pressure.readPressure());
// Get and print altitude data
Serial.print("Altitude: ");
Serial.print(Pressure.readAltitude());
Serial.println("m");
Oled.setCursor(0, 3);
Oled.print("Altitude: ");
Oled.print(Pressure.readAltitude());
Serial.println("\n");//add a line between output of different times.
delay(1000);
}
Again, nothing is displayed only the serial output is working well.
Do I have to define something with the I2C at the display setting???
What is here wrong?
Any support from @ArduinoTeam ???
Please try it!!!