can someone check it run through it make it better ?
its an analog keybored thanks
mega 2560
const uint8_t pinSENSOR_0 = 0;
const uint8_t pinSENSOR_1 = 1;
const uint8_t pinSENSOR_2 = 2;
const uint8_t pinSENSOR_3 = 3;
const uint8_t pinSENSOR_4 = 4;
const uint8_t pinSENSOR_5 = 5;
const uint8_t pinSENSOR_6 = 6;
const uint8_t pinSENSOR_7 = 7;
const uint8_t pinSENSOR_8 = 8;
const uint8_t pinSENSOR_9 = 9;
const uint8_t pinSENSOR_10 = 10;
const uint8_t pinSENSOR_11 = 11;
const uint8_t pinSENSOR_12 = 12;
const uint8_t pinSENSOR_13 = 13;
const uint8_t pinSENSOR_14 = 14;
const uint8_t pinSENSOR_15 = 15;
void subroutine()
{
goto main;}
:main {
goto White;}
White:
digitalWrite(ledPin, HIGH);
if ( (data = analogRead(pinSENSOR_13)) != analogRead(pinSENSOR_15) )
{
goto WhitePlatinum;
}
else
{
goto black;
}
WhitePlatinum:
if ( data == analogRead(pinSENSOR_0) )
{
Serial.println("tab");
goto black;
}
else
{
goto WhiteDiamond;
}
WhiteDiamond:
if ( data == analogRead(pinSENSOR_1) )
{
Serial.println(q);
goto black;
}
else
{
goto WhiteGold;
}
WhiteGold:
if ( data == analogRead(pinSENSOR_2) )
{
Serial.println(w);
goto black;
}
else
{
goto WhiteSilver;
}
WhiteSilver:
if ( data == analogRead(pinSENSOR_3) )
{
Serial.println(e);
goto black;
}
else
{
goto WhiteCopper;
}
WhiteCopper:
if ( data == analogRead(pinSENSOR_4) )
{
Serial.println(r);
goto black;
}
else
{
goto WhiteTitanium;
}
WhiteTitanium:
if ( data == analogRead(pinSENSOR_5) )
{
Serial.println(t);
goto black;
}
else
{
goto WhiteBrass;
}
WhiteBrass:
if ( data == analogRead(pinSENSOR_6) )
{
Serial.println(y);
goto black;
}
else
{
goto WhiteSteel;
}
WhiteSteel:
if ( data == analogRead(pinSENSOR_7) )
{
Serial.println(u);
goto black;
}
else
{
goto WhiteIron;
}
WhiteIron:
if ( data == analogRead(pinSENSOR_8) )
{
Serial.println(i);
goto black;
}
else
{
goto WhiteAluminum;
}
WhiteAluminium:
if ( data == analogRead(pinSENSOR_9) )
{
Serial.println(o);
goto black;
}
else
{
goto WhiteCoal;
}
else
{
goto black;
}
Black:
digitalWrite(ledPin, HIGH);
if ( (data = analogRead(pinSENSOR_13)) != analogRead(pinSENSOR_15) )
{
goto BlackPlatinum;
}
else
{
goto yellow;
}
BlackPlatinum:
if ( data == analogRead(pinSENSOR_0) )
{
Serial.println("tab");
goto yellow;
}
else
{
goto BlackDiamond;
}
BlackDiamond:
if ( data == analogRead(pinSENSOR_1) )
{
Serial.println(q);
goto yellow;
}
else
{
goto BlackGold;
}
BlackGold:
if ( data == analogRead(pinSENSOR_2) )
{
Serial.println(w);
goto yellow;
}
else
{
goto BlackSilver;
}
BlackSilver:
if ( data == analogRead(pinSENSOR_3) )
{
Serial.println(e);
goto yellow;
}
else
{
goto BlackCopper;
}
BlackCopper:
if ( data == analogRead(pinSENSOR_4) )
{
Serial.println(r);
goto yellow;
}
else
{
goto BlackTitanium;
}
BlackTitanium:
if ( data == analogRead(pinSENSOR_5) )
{
Serial.println(t);
goto yellow;
}
else
{
goto BlackBrass;
}
BlackBrass:
if ( data == analogRead(pinSENSOR_6) )
{
Serial.println(y);
goto yellow;
}
else
{
goto BlackSteel;
}
BlackSteel:
if ( data == analogRead(pinSENSOR_7) )
{
Serial.println(u);
goto yellow;
}
else
{
goto BlackIron;
}
BlackIron:
if ( data == analogRead(pinSENSOR_8) )
{
Serial.println(i);
goto yellow;
}
else
{
goto BlackAluminum;
}
BlackAluminium:
if ( data == analogRead(pinSENSOR_9) )
{
Serial.println(o);
goto yellow;
}
else
{
goto yellow;
}
yellow:
digitalWrite(ledPin, HIGH);
if ( (data = analogRead(pinSENSOR_12)) != analogRead(pinSENSOR_5) )
{
goto YellowPlatinum;
}
else
{
goto green;
}
YellowPlatinum:
if ( data == analogRead(pinSENSOR_0) )
{
Serial.println("tab");
goto main;
}
else
{
goto YellowDiamond;
}
YellowDiamond:
if ( data == analogRead(pinSENSOR_1) )
{
Serial.println(q);
goto main;
}
else
{
goto YellowGold;
}
YellowGold:
if ( data == analogRead(pinSENSOR_2) )
{
Serial.println(w);
goto main;
}
else
{
goto YellowSilver;
}
YellowSilver:
if ( data == analogRead(pinSENSOR_3) )
{
Serial.println(e);
goto main;
}
else
{
goto YellowCopper;
}
YellowCopper:
if ( data == analogRead(pinSENSOR_4) )
{
Serial.println(r);
goto main;
}
else
{
goto YellowTitanium;
}
YellowTitanium:
if ( data == analogRead(pinSENSOR_5) )
{
Serial.println(t);
goto main;
}
else
{
goto YellowBrass;
}
YellowBrass:
if ( data == analogRead(pinSENSOR_6) )
{
Serial.println(y);
goto main;
}
else
{
goto YellowSteel;
}
YellowSteel:
if ( data == analogRead(pinSENSOR_7) )
{
Serial.println(u);
goto main;
}
else
{
goto YellowIron;
}
YellowIron:
if ( data == analogRead(pinSENSOR_8) )
{
Serial.println(i);
goto main;
}
else
{
goto YellowAluminum;
}
Y YellowAluminium:
if ( data == analogRead(pinSENSOR_9) )
{
Serial.println(o);
goto main;
}
else
{
goto YellowCoal;
}
YellowCoal:
if ( data == analogRead(pinSENSOR_10) )
{
Serial.println(p);
goto main;
}
else
{
goto main;
}
else
{
goto Green;
green:
digitalWrite(ledPin, HIGH);
if ( (data = analogRead(pinSENSOR_13)) != analogRead(pinSENSOR_15) )
{
goto greenPlatinum;
}
else
{
goto blue;
}
greenPlatinum:
if ( data == analogRead(pinSENSOR_0) )
{
Serial.println("tab");
goto main;
}
else
{
goto greenDiamond;
}
greenDiamond:
if ( data == analogRead(pinSENSOR_1) )
{
Serial.println(q);
goto main;
}
else
{
goto greenGold;
}
greenGold:
if ( data == analogRead(pinSENSOR_2) )
{
Serial.println(w);
goto main;
}
else
{
goto greenSilver;
}
greenSilver:
if ( data == analogRead(pinSENSOR_3) )
{
Serial.println(e);
goto main;
}
else
{
goto greenCopper;
}
greenCopper:
if ( data == analogRead(pinSENSOR_4) )
{
Serial.println(r);
goto main;
}
else
{
goto greenTitanium;
}
greenTitanium:
if ( data == analogRead(pinSENSOR_5) )
{
Serial.println(t);
goto main;
}
else
{
goto greenBrass;
}
greenBrass:
if ( data == analogRead(pinSENSOR_6) )
{
Serial.println(y);
goto main;
}
else
{
goto greenSteel;
}
greenSteel:
if ( data == analogRead(pinSENSOR_7) )
{
Serial.println(u);
goto main;
}
else
{
goto greenIron;
}
greenIron:
if ( data == analogRead(pinSENSOR_8) )
{
Serial.println(i);
goto main;
}
else
{
goto greenAluminum;
}
Y greenAluminium:
if ( data == analogRead(pinSENSOR_9) )
{
Serial.println(o);
goto main;
}
else
{
goto greenCoal;
}
else
{
goto blue;
}
blue:
digitalWrite(ledPin, HIGH);
if ( (data = analogRead(pinSENSOR_13)) != analogRead(pinSENSOR_15) )
{
goto bluePlatinum;
}
else
{
goto red;
}
bluePlatinum:
if ( data == analogRead(pinSENSOR_0) )
{
Serial.println("tab");
goto main;
}
else
{
goto blueDiamond;
}
blueDiamond:
if ( data == analogRead(pinSENSOR_1) )
{
Serial.println(q);
goto main;
}
else
{
goto blueGold;
}