Initial Commit

Dependencies:   mbed HC05 QEI MODSERIAL SWSPI mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
Throwbot
Date:
Sun Oct 05 15:27:32 2014 +0000
Child:
1:1da89c13dfa1
Commit message:
Ebot Working full code

Changed in this revision

Drivers/HC05.lib Show annotated file Show diff for this revision Revisions of this file
Drivers/QEI.lib Show annotated file Show diff for this revision Revisions of this file
Drivers/TB6612FNG2.lib Show annotated file Show diff for this revision Revisions of this file
Robot.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed/MODSERIAL.lib Show annotated file Show diff for this revision Revisions of this file
mbed/SWSPI.lib Show annotated file Show diff for this revision Revisions of this file
mbed/mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
motors.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Drivers/HC05.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/davervw/code/SWSPI/#e2d77a394590
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Drivers/QEI.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/aberk/code/QEI/#5c2ad81551aa
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Drivers/TB6612FNG2.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/Abhishek/code/TB6612FNG2/#53e02c276f23
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Robot.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/Abhishek/code/Robot_Original/#b74b6d70347d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,60 @@
+#include "QEI.h"
+#include "mbed.h"
+#include "robot.h"
+#include "rtos.h"
+#define ulrL PTD6
+#define ulR PTD5
+#define ulF PTD1
+#define ulrR PTC2
+#define ulB PTC1
+#define ulL PTC0
+AnalogIn uL(ulL);
+AnalogIn uF(ulF);
+AnalogIn uR(ulR);
+AnalogIn urR(ulrR);
+AnalogIn urL(ulrL);
+char c;
+int main() {
+     initRobot();
+     Thread buzzer_th(pl_buzzer, NULL, osPriorityNormal, 2048, NULL);
+     motor_control(lMotor*m_speed,rMotor*m_speed);
+    while(1){
+       //bt.printf("Pulses is:   Revolutions is: \r\n");
+      //bt.lock();
+       // bt.printf("LDR1_%lf;LDR2_%lf;Pulses is: %i  Revolutions is: %i Pulses is: %i  ultrasonic: , \r\n",ldrread1(),ldrread2(), left.getPulses(), left.getRevolutions(),right.getPulses());//, uL.read()*5*102.54*2.54);
+        //bt.printf("s;LDR1_%lf;LDR2_%lf;Pulses is:  %i ; %i:s\n\r",ldrread1(),ldrread2(),wheel.getPulses(), wheel.getRevolutions());
+       // motor_control(lMotor*m_speed,rMotor*m_speed);
+         //bt.unlock(); 
+        if(bt.readable()){
+        c = bt.getc();
+        if(c=='?')
+        {
+            bt.lock();
+            bt.printf("EBOTDEMO\n");
+            bt.unlock(); 
+        }
+       /* int number = (c-'0');
+        stdio_mutex.lock();
+        freq = number;
+        stdio_mutex.unlock();
+        motor_control(0,0);
+        
+        */}
+         if(ldrread1()>0.6)
+    {
+        //pl_buzzer(); 
+        
+    }
+    if(ldrread2()>0.6)
+    { 
+        Led_on();
+    }
+     else
+    {
+       Led_off();
+    }
+        //Thread::wait(1);
+    Thread::wait(50);
+   
+   }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed/MODSERIAL.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Sissors/code/MODSERIAL/#657e235d88f8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed/SWSPI.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/davervw/code/SWSPI/#50294edaa3d2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed/mbed-rtos.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#631c0f1008c3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/motors.lib	Sun Oct 05 15:27:32 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/teams/Abhishek/code/motors_original/#201d986498c7