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.
Revision 0:843dd155e1ed, committed 2016-08-07
- Comitter:
- kikoaac
- Date:
- Sun Aug 07 12:46:00 2016 +0000
- Commit message:
- 4???????????;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor.lib Sun Aug 07 12:46:00 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/kikoaac/code/Motor/#3b639d84a95d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Sun Aug 07 12:46:00 2016 +0000
@@ -0,0 +1,43 @@
+#include "mbed.h"
+#include "Motor.h"
+
+#define check() 1
+DigitalOut myled(LED1);
+Serial pc(USBTX,USBRX);
+Serial esp(p28,p27);
+#define end "\r\n"
+
+
+Motor motor[2] = {Motor(p20,p25,p19),Motor(p17,p18,p21)};
+int main()
+{
+
+ pc.baud(115200);
+ esp.baud(115200);
+ int data = 0;
+ for(int i = 0 ;i < 2 ; i++)motor[i] = 0;
+ while(1) {
+ if(esp.readable()) {
+ data = esp.getc();
+ }
+ printf("%d\r\n",data);
+ if(data == 1)
+ for(int i= 0; i< 2; i++) {
+ motor[i] = 1;
+ }
+ else if(data == 2)
+ for(int i= 0; i< 2; i++) {
+ motor[i] = -1;
+ }
+ else if(data == 3) {
+ motor[0] = 1;
+ motor[1] = -1;
+ } else if(data == 4) {
+ motor[0] = -1;
+ motor[1] = 1;
+ } else
+ for(int i= 0; i< 2; i++) {
+ motor[i] = 0;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sun Aug 07 12:46:00 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34 \ No newline at end of file