Created
August 22, 2022 17:21
-
-
Save neuberfran/a06deb7f4f6579aab7fda1f10a21c771 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SquareLine LVGL GENERATED FILE | |
// EDITOR VERSION: SquareLine Studio 1.0.5 | |
// LVGL VERSION: 8.2 | |
// PROJECT: discovery6 | |
#include <Arduino.h> | |
#include "ui.h" | |
#include <SmartDrive.h> | |
SmartDrive smd = SmartDrive(SmartDrive_DefaultAddress); | |
#define STOP01 0 | |
#define STOP02 0 | |
void run01right(lv_event_t * e) | |
{ | |
// Your code here | |
while (STOP01 == 0) | |
{ | |
smd.Run_Unlimited(SmartDrive_Motor_ID_1, SmartDrive_Dir_Reverse, 90); | |
} | |
#define STOP01 0 | |
} | |
void run02right(lv_event_t * e) | |
{ | |
// Your code here | |
smd.Run_Unlimited(SmartDrive_Motor_ID_2, SmartDrive_Dir_Reverse, 90); | |
} | |
void stopmotor01(lv_event_t * e) | |
{ | |
// Your code here | |
#define STOP01 1 | |
smd.StopMotor(SmartDrive_Motor_ID_1, SmartDrive_Action_Brake); | |
} | |
void run01left(lv_event_t * e) | |
{ | |
// Your code here | |
while (STOP01 == 0) | |
{ { | |
smd.Run_Unlimited(SmartDrive_Motor_ID_1, SmartDrive_Dir_Forward, 90); | |
} } | |
#define STOP01 0 | |
} | |
void run02left(lv_event_t * e) | |
{ | |
// Your code here | |
smd.Run_Unlimited(SmartDrive_Motor_ID_2, SmartDrive_Dir_Forward, 90); | |
} | |
void stopmotor02(lv_event_t * e) | |
{ | |
// Your code here | |
smd.StopMotor(SmartDrive_Motor_ID_2, SmartDrive_Action_Brake); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment