You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Ps3Data example doesn't compile as the check for the controller being connected line is wrong.
I have modified the code as shown below and it works fine.
#include <Ps3Controller.h>
void setup()
{
Serial.begin(115200);
Ps3.begin("01:02:03:04:05:06");
Serial.println("Ready.");
}
void loop()
{
if(Ps3.isConnected()){
if( Ps3.data.button.cross ){
Serial.println("Pressing the cross button");
}
if( Ps3.data.button.square ){
Serial.println("Pressing the square button");
}
if( Ps3.data.button.triangle ){
Serial.println("Pressing the triangle button");
}
if( Ps3.data.button.circle ){
Serial.println("Pressing the circle button");
}
}
}
The text was updated successfully, but these errors were encountered:
The Ps3Data example doesn't compile as the check for the controller being connected line is wrong.
I have modified the code as shown below and it works fine.
The text was updated successfully, but these errors were encountered: