リモコン移動作業ロボット:ソースコード:WheelSupport.h

//copyryght 2024- https://robot-creation-diary.com/
#pragma once
#include <stdint.h>
#include "Arduino.h"
#define L_MOTOR_BACK_PIN ((uint8_t)11)
#define L_MOTOR_FORWARD_PIN ((uint8_t)10)
#define R_MOTOR_BACK_PIN ((uint8_t)9)
#define R_MOTOR_FORWARD_PIN ((uint8_t)8)
#define SIGNAL_POWER_PIN ((uint8_t)7)


class CWheelSupport{
public:
  CWheelSupport();
  ~CWheelSupport();

  static void SetWheelData(int l_wheel, int r_wheel);

//個々の車輪の制御
  static void Forward(uint8_t forward_pin, uint8_t back_pin);
  static void Back(uint8_t forward_pin, uint8_t back_pin);
  static void Stop(uint8_t forward_pin, uint8_t back_pin);

  //左右の車輪を使って制御
  static void TurnRigh();
  static void TurnLeft();
};