display on second i2c bus

stm32
JbLb 6 years ago
parent 182c303295
commit df4d58b3df

@ -45,6 +45,8 @@
#include <Adafruit_SSD1306.h> #include <Adafruit_SSD1306.h>
#include <NintendoExtensionCtrl.h> // https://github.com/dmadison/NintendoExtensionCtrl #include <NintendoExtensionCtrl.h> // https://github.com/dmadison/NintendoExtensionCtrl
// SDA SCL
TwoWire Wire3(PC_9, PA_8);
// #include <SoftwareSerial.h> // #include <SoftwareSerial.h>
// SoftwareSerial HoverSerial(2,3); // RX, TX // SoftwareSerial HoverSerial(2,3); // RX, TX
@ -89,7 +91,7 @@ int motor_test_direction = 1;
#define SCREEN_HEIGHT 64 // OLED display height, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire); Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire3);
// Connect to a Nunchuk // Connect to a Nunchuk
Nunchuk nchuk; Nunchuk nchuk;
HardwareSerial Serial1(PA_10, PA_9); HardwareSerial Serial1(PA_10, PA_9);

Loading…
Cancel
Save