BASE
Dependencies: X-NUCLEO-IHM05A1
Revision 33:ba8992082097, committed 2019-09-13
- Comitter:
- stebonicelli
- Date:
- Fri Sep 13 15:18:40 2019 +0000
- Parent:
- 32:465e41868fe4
- Child:
- 34:7710cb1766e0
- Commit message:
- Added led toggle
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Sep 13 09:24:19 2019 +0000
+++ b/main.cpp Fri Sep 13 15:18:40 2019 +0000
@@ -158,6 +158,7 @@
printf("CAN: mess %d\n\r", speed);
current_speed=speed;
+ led1 = !led1;
if (current_speed>0)
{
@@ -199,12 +200,12 @@
int main()
{
-
can1.frequency(125000);
// Motor Initialization
motor = new L6208(D2, D8, D7, D4, D5, D6, VREFA_PWM_PIN, VREFB_PWM_PIN);
motor->set_step_mode(StepperMotor::STEP_MODE_1_16);
+
if (motor->init(&init) != COMPONENT_OK)
{
printf("ERROR: vvMotor Init\n\r");
@@ -213,21 +214,16 @@
motor->attach_error_handler(&motor_error_handler);
-
end1.rise(&end1_int_handler);
printf("DONE: Motor Init\n\r");
// CAN Initialization
-
-
canrxa.start(canrx_ISR);
//cantxa.start(cantx_ISR);
printf("DONE: CAN Init\n\r");
-
-
-
+
printf("Running!\n\r");
//zero();