
#include "SSD1306.h" // alias for `#include "SSD1306Wire.h"`
// jfs Wemos lolin32
// jfs Heltec WiFi kit 32 (weisses Board)
// #define HELTEC
#define DEBUG

#define RXD2 12
#define TXD2 13


#define _ADS1115

#ifdef _ADS1115
  // 0x48 addr to gnd
  // 0x49 addr to vdd
  // 0x4A addr to sda
  // 0x4B addr to scl
  #include <Adafruit_ADS1015.h>
  Adafruit_ADS1115 ads(0x48);
  float Voltage = 0.0;
#endif


// Initialize the OLED display using Wire library
#ifdef HELTEC
SSD1306  display(0x3c, 4, 15);
#else

SSD1306  display(0x3c, 5, 4);
#endif

void setup() {
#ifdef HELTEC
  pinMode(16,OUTPUT); digitalWrite(16, LOW); delay(50); digitalWrite(16, HIGH);
#endif 
Serial.begin(115200); 
  display.init();
  display.flipScreenVertically();
  display.clear();
  display.drawString(0, 0, "Starting...");
  display.display();

  Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
  Serial.println("Serial Txd is on pin: "+String(TX));
  Serial.println("Serial Rxd is on pin: "+String(RX));
}

void loop() {
 while (Serial2.available()) {
    Serial.print(char(Serial2.read()));
  }
}
