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.
Dependencies: HOSOKIkikou FEP_RX22 QEI R1370 ikarashiMDC_2byte_ver mbed 2022_NHK_B_canTR PID SEKIkikou
Diff: main.cpp
- Revision:
- 3:75dae8deb5f3
- Parent:
- 2:ea17f9e04972
- Child:
- 4:3c04f88a8cd8
diff -r ea17f9e04972 -r 75dae8deb5f3 main.cpp
--- a/main.cpp Fri Sep 30 05:31:57 2022 +0000
+++ b/main.cpp Fri Sep 30 06:28:25 2022 +0000
@@ -2,10 +2,15 @@
#include "controller.h"
#include "pinconfig.h"
#include "ikarashiMDC.h"
+#include "QEI.h"
Bcon mycon(fepTX, fepRX, fepad);
Serial pc(USBTX, USBRX, 115200);
Serial serial(motorTX, motorRX, 115200);
+QEI enc1(encoder1_A, encoder1_B, NC, 100, QEI::X4_ENCODING);
+QEI enc2(encoder2_A, encoder2_B, NC, 100, QEI::X4_ENCODING);
+QEI enc3(encoder3_A, encoder3_B, NC, 100, QEI::X4_ENCODING);
+QEI enc4(encoder4_A, encoder4_B, NC, 100, QEI::X4_ENCODING);
DigitalOut stop(stop_pin);
DigitalOut led(LED2);
@@ -13,7 +18,15 @@
ikarashiMDC(0,0,SM,&serial),
ikarashiMDC(0,1,SM,&serial),
ikarashiMDC(0,2,SM,&serial),
- ikarashiMDC(0,3,SM,&serial)
+ ikarashiMDC(0,3,SM,&serial),
+ ikarashiMDC(1,0,SM,&serial),
+ ikarashiMDC(1,1,SM,&serial),
+ ikarashiMDC(1,2,SM,&serial),
+ ikarashiMDC(1,3,SM,&serial),
+ ikarashiMDC(2,0,SM,&serial),
+ ikarashiMDC(2,1,SM,&serial),
+ ikarashiMDC(2,2,SM,&serial),
+ ikarashiMDC(2,3,SM,&serial)
};
uint8_t b[8];