#include <Adafruit_ILI9341.h>
#include <Adafruit_GFX.h>
#include "pitches.h"
// JOSTICK CONFIGURATION
#define VERT_PIN A2 // Vertical
#define HORZ_PIN A1 // Horizontal
#define SEL_PIN 2 // Pushbutton
// BUZZER CONFIGURATION
const unsigned int BuzzPin = 7;
// SCREEN SIZE
const unsigned int WIDTH = 320;
const unsigned int HEIGHT = 240;
// ADAFRUIT DISPLAY CONFIGURATION
const byte TFT_SCK = 52;
const byte TFT_MISO = 50;
const byte TFT_MOSI = 51;
const byte TFT_DC = 8;
const byte TFT_CS = 10;
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCK, TFT_MISO);
void setup (){
// SCREEN INITIATION
tft.begin(); //initialize screen
tft.setRotation(3); //rotate screen
tft.fillScreen(0x0000); //make beginning screen black
}
void loop () {
//FUNCTION FOR PLAYGROUND DISPLAY
//FUNCTION CONTROLLER
void joystickControl() {
int joystickV = map(analogRead(VERT_PIN), 0,1023,-1,1);
int joystickH = map(analogRead(HORZ_PIN), 0,1023, -1, 1);
bool stateSEL = digitalRead(SEL_PIN);
switch (joystickH) //switch-function for right/left movement
{case 1: //links
if ()
{}
break;
case -1: //rechts
if ()
{}
break;}
}