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: main.cpp
- Revision:
- 0:58fb3f040295
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Dec 10 13:53:41 2014 +0000
@@ -0,0 +1,20 @@
+// Test program for WSE-PROJ-SBC encoder expander board
+// J Bradshaw 2014-12-10
+#include "mbed.h"
+#include "LS7366.h"
+
+SPI spi(p5, p6, p7);
+LS7366 enc1(spi, p19);
+LS7366 enc2(spi, p20);
+LS7366 enc3(spi, p28);
+LS7366 enc4(spi, p27);
+Serial pc(USBTX, USBRX); // tx, rx for serial USB interface to pc
+
+//------------------- MAIN --------------------------------
+int main()
+{
+ while(1){
+ pc.printf("enc1 = %ld enc2 = %ld enc3 = %ld enc4 = %ld\r\n",enc1.read(), enc2.read(),enc3.read(), enc4.read());
+ wait(.02);
+ }//while(1)
+}//main