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:d5fb9ba6c4c5, committed 2010-06-29
- Comitter:
- IPAB
- Date:
- Tue Jun 29 11:38:25 2010 +0000
- Commit message:
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Koala.lib Tue Jun 29 11:38:25 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/IPAB/code/Koala/#c32adf6f5ec6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Jun 29 11:38:25 2010 +0000
@@ -0,0 +1,41 @@
+#include "mbed.h"
+#include "Koala.h"
+
+
+Serial PC(USBTX,USBRX);
+Koala koala(p28,p27,38400); // tx, rx, baudrate
+
+// Just to check different speeds.
+#define SPEED 3
+#define LS 3
+#define RS -5
+
+
+int main() {
+
+ PC.baud(38400);
+
+ PC.printf("\r\nKoala Test Code\r\n");
+ PC.printf("=================================\r\n");
+ PC.printf("Initialising...\r\n");
+
+
+ PC.printf("Initialising position (0,0)\r\n%c\r\n",koala.set_pos_cnt(0,0));
+
+ PC.printf("Moving with speed (%d,%d)\r\n%c\r\n",LS*SPEED,RS*SPEED,koala.set_speed(LS*SPEED,RS*SPEED));
+ wait(2);
+ PC.printf("Stop moving...\r\n%c\r\n",koala.set_speed(0,0));
+ wait(0.5);
+
+ int nCountL,nCountR;
+ koala.read_position(&nCountL,&nCountR);
+ PC.printf("Counts:\t%d\t%d\r\n",nCountL,nCountR);
+ wait(1);
+
+ /* Read channel input
+ for (int i=0;i<1000;i++) {
+
+ PC.printf("Ears:\t%d\t%d\r\n",koala.read_channel(0),koala.read_channel(1));
+ }
+ */
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Jun 29 11:38:25 2010 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/3944f1e2fa4f