diff --git a/.gitignore b/.gitignore index bbf313b..5402c18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,32 +1,3 @@ -# Object files -*.o -*.ko -*.obj -*.elf - -# Precompiled Headers -*.gch -*.pch - -# Libraries -*.lib -*.a -*.la -*.lo - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex - -# Debug files -*.dSYM/ +.pioenvs +.clang_complete +.gcc-flags.json diff --git a/wiperMotorPlatform.ino b/wiperMotorPlatform.ino index ed710b5..70523bf 100644 --- a/wiperMotorPlatform.ino +++ b/wiperMotorPlatform.ino @@ -53,7 +53,7 @@ void setup() { radio.openReadingPipe(1, addresses[0]); radio.startListening(); - Serial << "im a bot!" << endl; + if(DEBUG) Serial << "im a bot!" << endl; } else { role = role_ping_out; @@ -61,7 +61,7 @@ void setup() { radio.openReadingPipe(1, addresses[1]); radio.stopListening(); - Serial << "im a controller!" << endl; + if(DEBUG) Serial << "im a controller!" << endl; } if(role==role_pong_back) @@ -90,14 +90,19 @@ void loop() { /****************** Ping Out Role ***************************/ if (role == role_ping_out) { + myData.xin = analogRead(AX_pin); + if(myData.xin == 517){ myData.xin = 518;} //terrible hack. myData.yin = analogRead(AY_pin); bool ok = radio.write( &myData, sizeof(myData) ); + if(DEBUG) Serial<<"xin:"<