I have a sketch that prints out a value from 0 to 100. I want it to take up the whole screen.
I can't figure out how to make the font bigger I think that the part of the code defines the size of the font is :
oled.setFont(System5x7)
But if I alter the value 5x7 it just spits out errors messages.
This is all the code:
#include "SSD1306Ascii.h"
#include "SSD1306AsciiAvrI2c.h"
SSD1306AsciiAvrI2c oled;
#define I2C_ADDRESS 0x3C
int TankValue0;
int TankValue1;
void setup() {
Serial.begin(9600);
oled.begin(&Adafruit128x64, I2C_ADDRESS);
oled.setFont(System5x7);
oled.clear();
}
void loop() {
int sensorTankValue0 = analogRead(A0);
int sensorTankValue1 = analogRead(A1);
TankValue0 = map(sensorTankValue0, 300, 785, 100, 0);
TankValue1 = map(sensorTankValue1, 300, 785, 000, 0);
if (TankValue0 < 0) {
TankValue0 = 0;
}
if (TankValue1 < 0) {
TankValue1 = 0;
}
if (TankValue0 > 100) {
TankValue0 = 100;
}
if (TankValue1 > 100) {
TankValue1 = 100;
}
oled.print(TankValue0);
oled.print(" L");
oled.println(" ");
//oled.print("T1=");
// oled.print(TankValue1);
// oled.println(" ");
oled.setCursor(0, 0);
delay(1000);
}
spits out errors messages
... what error messages? ... why do you believe that error messages are useless for determining the source of the problem?