20 template <
size_t SmoothLevel>
28 Udon::MovingAverage<SmoothLevel> ma;
38 , direction(direction)
46 pinMode(pinA, OUTPUT);
51 void move(
const int16_t power)
54 digitalWrite(pinA, p >= 0 ? HIGH : LOW);
55 analogWrite(pinP, abs(p));
74 template <
size_t SmoothLevel>
83 Udon::MovingAverage<SmoothLevel> ma;
96 , direction(direction)
104 pinMode(pinA, OUTPUT);
105 pinMode(pinB, OUTPUT);
110 void move(
const int16_t power)
113 digitalWrite(pinA, p >= 0 ? HIGH : LOW);
114 digitalWrite(pinB, p <= 0 ? HIGH : LOW);
115 analogWrite(pinP, abs(p));
132 using Motor2 = SmoothlyMotor2<50>;
133 using Motor3 = SmoothlyMotor3<50>;
135#ifdef __AVR_ATmega328P__
138 inline void ChangePwmPeriod()
double getValue() const noexcept
平均値の取得
Definition MovingAverage.hpp:49
int DirectionToSign(Direction direction)
Definition Direction.hpp:14
Direction
方向
Definition Direction.hpp:9
@ Forward
Definition Direction.hpp:10