Skip to content

Commit

Permalink
Update ROSencoders-motors.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaRoma97 authored Dec 10, 2020
1 parent 85226eb commit 84fb7d9
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions ROSencoders-motors.ino
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,7 @@ void ISR_count2()
counter2++; // increment Motor 2 counter value
}

/*
// TimerOne ISR
void ISR_timerone()
{
Timer1.detachInterrupt(); // Stop the timer
//Serial.print("Motor Speed 1: ");
float rotation1 = (counter1 / diskslots) * 60; // calculate RPM for Motor 1
//Serial.print(rotation1);
//erial.print(" RPM - ");
counter1 = 0; // reset counter to zero
//Serial.print("Motor Speed 2: ");
float rotation2 = (counter2 / diskslots) * 60; // calculate RPM for Motor 2
//Serial.print(rotation2);
//Serial.println(" RPM");
counter2 = 0; // reset counter to zero
//odomvel=(rotation1-rotation2);//*3.14/600*0.04/0.14;
//vel.x = odomvel;
vel.x = counter1;
vel.y = counter2;
//Serial.print("vel");
//Serial.print(odomvel);
odom_pub.publish(&vel);
Timer1.attachInterrupt( ISR_timerone ); // Enable the timer
delay(10);
}
*/


void ISR_timerone()
{
Expand Down

0 comments on commit 84fb7d9

Please sign in to comment.