Skip to content

Instantly share code, notes, and snippets.

@neuberfran
Last active August 22, 2022 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neuberfran/4e8a228cfd107ad70efa251bdc44fef8 to your computer and use it in GitHub Desktop.
Save neuberfran/4e8a228cfd107ad70efa251bdc44fef8 to your computer and use it in GitHub Desktop.
// 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 1
}
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);
#define STOP01 0
}
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 1
}
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