Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 00017 float scale; 00018 int _speed; //save control input 00019 00020 TB6612(PinName pwm, PinName fwd, PinName rev); 00021 00022 void speed(int speed); 00023 void operator= ( int value ) 00024 { 00025 speed(value); 00026 } 00027 int getSpeed(); 00028 00029 protected: 00030 PwmOut _pwm; 00031 DigitalOut _fwd; 00032 DigitalOut _rev; 00033 }; 00034 00035 #endif
Generated on Mon Jul 18 2022 15:02:32 by
 1.7.2
 1.7.2