#include "ballsensor.h" Ballsensor::Ballsensor() { // Umrechnungstabelle position i in Winkel winkel[0] = 0; winkel[1] = 30; winkel[2] = 60; winkel[3] = 100; winkel[4] = 180; winkel[5] = 260; winkel[6] = 300; winkel[7] = 330; // Der Winkel ist erstmal 0 ballwinkel = 0; } Ballsensor::~Ballsensor() { } int Ballsensor::GetBallwinkel() { return ballwinkel; } void Ballsensor::Aktualisieren() { // Erstelle ein Array für die Sensorwerte int sensor[NUM_BALLSENSOR]; int result = 0; // und einer Variable fürs Ergebnis int current = 1024; // Setze aktuellen Wert auf Maximum // Analoge Sensoren abfragen und eintragen for(int i=0;i