Skip to content

Commit

Permalink
arduino
Browse files Browse the repository at this point in the history
  • Loading branch information
omarwalid96 committed Jun 23, 2017
1 parent 3b9a419 commit 50a149c
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions arduinotiva2/arduinotiva2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,11 @@ void CounterClockWise()
{TIVA2(0x10);}
void SERVE()
{
if(PS3.getAnalogButton(R1)>50) // start
{TIVA1(0x11);}
if(PS3.getAnalogButton(L1)>50) // stop
{ TIVA1(0x12);}

if(PS3.getAnalogButton(R1)>100) // start
{TIVA1(0x11);}


if(PS3.getAnalogButton(R2)>50) // stop
{ TIVA1(0x27);}
if(PS3.getAnalogButton(L2)>50) // stop
Expand All @@ -313,6 +314,7 @@ void SERVE()
TIVA2(0x30);
PS3.disconnect();
}
servestop();
lifter12();
lifter3();
lifters();
Expand All @@ -325,6 +327,15 @@ void SERVE()
}
void saucer()
{TIVA1(0x13);}
void servestop()
{ while(1)
{
Usb.Task();
if (PS3.PS3Connected || PS3.PS3NavigationConnected) {
if(PS3.getAnalogButton(L1)>100) // stop
{ TIVA1(0x40);}
else{break;}}}
}
void lifter12()
{
while(1)
Expand Down Expand Up @@ -441,36 +452,25 @@ void lifters()
void liftersStop()
{ TIVA1(0x20);}
void dec()
{
while(1)
{
Usb.Task();
{ while(1)
{
Usb.Task();
if (PS3.PS3Connected || PS3.PS3NavigationConnected) {
if(PS3.getAnalogButton(LEFT)>100)
{
TIVA1(0x22);}
else
{
break;}
}
}
else{break;}}}
}
void inc()
{
while(1)
{
Usb.Task();
{while(1)
{
Usb.Task();
if (PS3.PS3Connected || PS3.PS3NavigationConnected) {
if(PS3.getAnalogButton(RIGHT)>100)
{
if(PS3.getAnalogButton(RIGHT)>100)
{
TIVA1(0x21);}
else
{
break;}
else{break;}}}
}
}
}



static const byte ASCII[][5] =
Expand Down

0 comments on commit 50a149c

Please sign in to comment.