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.
Dependencies: ds3_si mbed omuni solenoid
Fork of 2017_Robocon_mother by
Diff: main.cpp
- Revision:
- 3:2d189409c3c3
- Parent:
- 2:6c6c5f2796fe
- Child:
- 5:d5aa02f1acbb
--- a/main.cpp Thu Sep 14 04:12:21 2017 +0000
+++ b/main.cpp Tue Oct 10 12:47:39 2017 +0000
@@ -1,11 +1,12 @@
#include "mbed.h"
#include "omuni.h"
+#include "mbed.h"
#include "solenoid.h"
I2C i2c(p28, p27);
-omuni omu(i2c, 0x10, 0x14, 0x16);
-solenoid sol(i2c, 0x20);
+omuni omu(&i2c, 0x10, 0x14, 0x16);
+solenoid sol(&i2c, 0x20);
Serial con(p9, p10);
Serial master(p13,p14);
@@ -49,7 +50,7 @@
char MotorData[] = {'H', ConData[0][1]-1, ConData[0][2]-6, ConData[1][1]+1, ConData[1][2]-8};
omu.out(MotorData);
- /*
+
for(int i = 0; i < 12; i++)
{
pc.printf("%3d ",ConData[0][i]);
@@ -59,7 +60,7 @@
pc.printf("%3d ",ConData[1][i]);
}
pc.printf("\n\r");
- */
+
char soldata = ((ConData[0][3] << 2) + ConData[1][3]) << 4;
//printf("%d\n",soldata);
sol = soldata;
