Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Robot.cpp
- Revision:
- 6:df6b8b2468d8
- Parent:
- 5:25bd866ef068
diff -r 25bd866ef068 -r df6b8b2468d8 Robot.cpp
--- a/Robot.cpp Mon May 17 15:03:21 2021 +0000
+++ b/Robot.cpp Tue May 18 00:04:27 2021 +0000
@@ -1,6 +1,15 @@
#include "Robot.h"
#include "mbed.h"
+
+#include "BufferedSerial.h"
+#include "rplidar.h"
+
+#include "Communication.h"
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+
I2C i2c(I2C_SDA, I2C_SCL );
const int addr8bit = 20 << 1; // 7bit I2C address is 20; 8bit I2C address is 40 (decimal).
@@ -61,21 +70,3 @@
countsLeft = (int16_t((read_buffer[0]<<8)|read_buffer[1]));
countsRight = (int16_t((read_buffer[2]<<8)|read_buffer[3]));
}
-
-//Funcao para criar um mapa simples com um quadrado no meio
-void read_map(int Map_Matrix[80][80]){
- for(int i = 0; i < 80; i++){
- for(int j = 0; j < 80; j++){
- if(i == 0 || j==0 || i==79 || j==79){
- Map_Matrix[i][j] = 1;
- }
- else{
- Map_Matrix[i][j] = 0;
- if(i >= 10 && j>=10 && i<=69 && j<=69){
- Map_Matrix[i][j] = 1;
- }
- }
- }
- }
-}
-