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: mbed-dev-f303 FastPWM3
Diff: main.cpp
- Revision:
- 47:55bdc4d5096b
- Parent:
- 45:aadebe074af6
- Child:
- 49:10638a45c3ac
--- a/main.cpp Mon Jul 30 20:33:23 2018 +0000
+++ b/main.cpp Sat Dec 07 08:01:06 2019 +0000
@@ -41,13 +41,13 @@
Serial pc(PA_2, PA_3);
-CAN can(PB_8, PB_9, 1000000); // CAN Rx pin name, CAN Tx pin name
+CAN can(PB_8, PB_9, 1000000); // CAN Rx pin name, CAN Tx pin name, 1000kbps
CANMessage rxMsg;
CANMessage txMsg;
-PositionSensorAM5147 spi(16384, 0.0, NPP);
+PositionSensorAM5147 spi(16384, 0.0, NPP); //14 bits encoder, 21 NPP
volatile int count = 0;
volatile int state = REST_MODE;
@@ -378,7 +378,7 @@
memcpy(&lut, &ENCODER_LUT, sizeof(lut));
spi.WriteLUT(lut); // Set potision sensor nonlinearity lookup table
- pc.baud(921600); // set serial baud rate
+ pc.baud(115200);//pc.baud(921600); // set serial baud rate
wait(.01);
pc.printf("\n\r\n\r HobbyKing Cheetah\n\r\n\r");
wait(.01);