Preliminary mbed encoder interface IC class
Dependents: mbed_QUAD_ENCLIB_TEST Axis Axis_20181108 Axis_version2
include the mbed library with this snippet
#include "mbed.h" #include "LS7366.h" SPI spi(p5, p6, p7); LS7366 enc1(spi, p19); LS7366 enc2(spi, p20); Serial pc(USBTX, USBRX); // tx, rx for serial USB interface to pc //------------------- MAIN -------------------------------- int main() { while(1){ pc.printf("enc1 = %ld enc2 = %ld\r\n",enc1.read(), enc2.read()); wait(.02); }//while(1) }//main
Revisions of LS7366.cpp
Revision | Date | Message | Actions |
---|---|---|---|
1:c627734cf04c | 2015-08-31 | removed secondary operator overload | File Diff Annotate |
0:c2458154721b | 2014-12-09 | LS7366 preliminary class for mbed | File Diff Annotate |