1 Star 0 Fork 0

DFRobot/DFRobot_utility

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DFRobotCar.h 765 Bytes
一键复制 编辑 原始数据 按行查看 历史
lisper 提交于 2014-11-07 10:10 +08:00 . fix
/**************************************************************************/
/*!
@file DFRobotCar.h
@author lisper (lisper.li@dfrobot.com)
@license LGPLv3 (see license.txt)
provide some useful function make it easy to control two DC car
Copyright (C) 2014 DFRobot
*/
#include <Arduino.h>
class DFRobotCar {
private:
bool _left_advance;// = LOW;
bool _left_back;// = HIGH;
bool _right_advance;// = HIGH;
bool _right_back;// = LOW;
uint8_t _left_en;// = 4;
uint8_t _left_pwm;// = 5;
uint8_t _right_en;// = 7;
uint8_t _right_pwm;// = 6;
public:
DFRobotCar (uint8_t left_en, uint8_t left_pwm, uint8_t right_en, uint8_t right_pwm);
void changeDir (bool left, bool right);
void control (int16_t left, int16_t right);
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dfrobot/DFRobot_utility.git
git@gitee.com:dfrobot/DFRobot_utility.git
dfrobot
DFRobot_utility
DFRobot_utility
master

搜索帮助