37namespace grove_tb6612fng {
53 void setup()
override;
165template<
typename... Ts>
172 auto channel = this->channel_.value(
x...);
173 auto speed = this->speed_.value(
x...);
174 this->parent_->dc_motor_run(channel,
speed);
178template<
typename... Ts>
183 void play(Ts...
x)
override { this->
parent_->dc_motor_brake(this->channel_.value(
x...)); }
186template<
typename... Ts>
191 void play(Ts...
x)
override { this->
parent_->dc_motor_stop(this->channel_.value(
x...)); }
194template<
typename... Ts>
200template<
typename... Ts>
206template<
typename... Ts>
211 void play(Ts...
x)
override { this->
parent_->set_i2c_addr(this->address_.value(
x...)); }
BedjetMode mode
BedJet operating mode.
virtual void play(Ts... x)=0
Helper class to easily give an object a parent of type T.
GroveMotorDriveTB6612FNG * parent_
TEMPLATABLE_VALUE(uint8_t, channel) void play(Ts... x) override
TEMPLATABLE_VALUE(uint8_t, address) void play(Ts... x) override
void play(Ts... x) override
speed void play(Ts... x) override
TEMPLATABLE_VALUE(uint8_t, channel) TEMPLATABLE_VALUE(uint16_t
void play(Ts... x) override
TEMPLATABLE_VALUE(uint8_t, channel) void play(Ts... x) override
void stepper_keep_run(StepperModeTypeT mode, uint16_t rpm, bool is_cw)
void dc_motor_brake(uint8_t channel)
void dc_motor_run(uint8_t channel, int16_t speed)
void stepper_run(StepperModeTypeT mode, int16_t steps, uint16_t rpm)
void dump_config() override
void set_i2c_addr(uint8_t addr)
void dc_motor_stop(uint8_t channel)
This Class provides the methods to read/write bytes from/to an i2c device.
Providing packet encoding functions for exchanging data with a remote host.