 // and pick SSD1306_128_64 or SSD1306_128_32 that matches display type.
 #define DISPLAY_I2C_ADDRESS 0x3C
 #define OLED_RESET 4
+#define DISPLAY_ROWS SSD1306_LCDHEIGHT/8
 
 #define JOYSTICK_X A2
 #define JOYSTICK_Y A3

static Pano pano(horiz_motor, vert_motor, camera, HORIZ_EN, VERT_EN);

// these variables are modified by the menu
volatile int focal, horiz, vert, shutter, pre_shutter, running, orientation, aspect, shots, motors_enable;
volatile static int stop_running = false;

void button_click(){
    stop_running = true;
}

const int rows = 3;

void setup() {
    Serial.begin(38400);


void loop() {
    if (!running){
        display.invertDisplay(display_invert);
        int event = joystick.read();
        if (event){
            handleEvent(event);
