Skip to content

Commit

Permalink
Compile RobotScript code to Arduino: replace format string by several…
Browse files Browse the repository at this point in the history
… print
  • Loading branch information
J-Bindel committed Jan 6, 2024
1 parent 8eff27b commit 6eb4aa5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/compilation/inocode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ void robotSpeak(String text){
double getRobotDistance(){
for(int i = 0; i < 4; i ++)
{
Serial.println("Sonar %d acquires a distance of %%.2f", i + 1, hc.dist(i));
Serial.print("Sonar ");
Serial.print(i + 1);
Serial.print(" acquires a distance of ");
Serial.print(hc.dist(i));
Serial.println(".");
}
Omni.delayMS(60);
}
Expand Down

0 comments on commit 6eb4aa5

Please sign in to comment.