Wallbot_CaaS
Dependencies: MPU6050 mbed PID
Fork of BLE_MPU6050_test6_challenge_sb by
TB6612.h
00001 /** 00002 * Motor Driver TB6612 Control Library 00003 * 00004 * -- TB6612 is a device of the rohm. 00005 * 00006 * Copyright (C) 2012 Junichi Katsu (JKSOFT) 00007 */ 00008 00009 #ifndef MBED_TB6612_H 00010 #define MBED_TB6612_H 00011 00012 #include "mbed.h" 00013 00014 class TB6612 { 00015 public: 00016 TB6612(PinName pwm, PinName fwd, PinName rev); 00017 void speed(float speed); 00018 void move(float speed , float time); 00019 void operator= ( float value ) 00020 { 00021 speed(value); 00022 } 00023 float nowspeed; 00024 00025 protected: 00026 PwmOut _pwm; 00027 DigitalOut _fwd; 00028 DigitalOut _rev; 00029 Timeout timer; 00030 float bspeed; 00031 bool timer_flag; 00032 void timeout(); 00033 00034 }; 00035 00036 #endif
Generated on Tue Jul 12 2022 18:33:09 by 1.7.2