encoder test for the biorobotics shield
Embed:
(wiki syntax)
Show/hide line numbers
main.cpp
00001 #include "mbed.h" 00002 00003 DigitalIn encoder_1a(D7); 00004 DigitalIn encoder_1b(D6); 00005 00006 Serial pc(USBTX, USBRX); 00007 00008 int main() 00009 { 00010 while (true) { 00011 pc.baud(115200); 00012 00013 pc.printf("encoder a: %d\r\n", encoder_1a.read()); 00014 pc.printf("encoder b: %d\r\n\n", encoder_1b.read()); 00015 00016 wait(1.0f); 00017 } 00018 }
Generated on Fri Jul 15 2022 17:36:24 by
1.7.2