37 namespace grove_tb6612fng {
53 void setup()
override;
165 template<
typename... Ts>
168 TEMPLATABLE_VALUE(uint8_t, channel)
169 TEMPLATABLE_VALUE(uint16_t,
speed)
171 void play(Ts...
x)
override {
172 auto channel = this->channel_.value(x...);
173 auto speed = this->speed_.value(x...);
174 this->parent_->dc_motor_run(channel,
speed);
178 template<
typename... Ts>
183 void play(Ts...
x)
override { this->parent_->dc_motor_brake(this->channel_.value(
x...)); }
186 template<
typename... Ts>
191 void play(Ts...
x)
override { this->parent_->dc_motor_stop(this->channel_.value(
x...)); }
194 template<
typename... Ts>
197 void play(Ts...
x)
override { this->parent_->standby(); }
200 template<
typename... Ts>
203 void play(Ts...
x)
override { this->parent_->not_standby(); }
206 template<
typename... Ts>
211 void play(Ts...
x)
override { this->parent_->set_i2c_addr(this->
address_.value(
x...)); }
void dc_motor_brake(uint8_t channel)
BedjetMode mode
BedJet operating mode.
void dump_config() override
void dc_motor_run(uint8_t channel, int16_t speed)
void play(Ts... x) override
TEMPLATABLE_VALUE(uint8_t, channel) void play(Ts... x) override
TEMPLATABLE_VALUE(uint8_t, address) void play(Ts... x) override
uint8_t address_
store the address of the device on the bus
void set_i2c_addr(uint8_t addr)
void stepper_run(StepperModeTypeT mode, int16_t steps, uint16_t rpm)
void play(Ts... x) override
void dc_motor_stop(uint8_t channel)
Implementation of SPI Controller mode.
void stepper_keep_run(StepperModeTypeT mode, uint16_t rpm, bool is_cw)
TEMPLATABLE_VALUE(uint8_t, channel) void play(Ts... x) override
This Class provides the methods to read/write bytes from/to an i2c device.
Helper class to easily give an object a parent of type T.