Giter Club home page Giter Club logo

ruke's Introduction

RUCKE

RUKE: Rush Tanke

RUKE是利用51单片机、L298N电机驱动、PS2手柄、坦克坦克底盘、1000RPM的带霍尔效应编码器的JGB37 520调速电机DIY实现的PS2摇控坦克,提供精确速度控制,加减速,遥控体验绝佳。

功能说明

遥控坦克正常行驶

可通过PS2左侧摇杆控制坦克前进、后退、左转、右转。

加减速控制

可通过PS2右侧摇杆控制坦克加速、减速、向左前行进、向右前行进。

设计说明

硬件设计

详细参照:硬件设计说明

软件设计

详细参照:软件设计说明和代码

PS2按键功能

按键 功能 监控指示灯
左侧上键 坦克前进,长按有效,放开停止 P0_0
左侧下键 坦克后退,长按有效,放开停止 P0_1
左侧左键 坦克左转,长按有效,放开停止 P0_2
左侧右键 坦克右转,长按有效,放开停止 P0_3
右侧上健 坦克加速,每按一次提速一格,放开保持当时速度 P0_4
右侧下键 坦克减速,每按一次减速一格,放开保持当时速度 P0_5
右侧左键 坦克左前行驶,每按一次左偏一格,放开保持偏转角度 P0_6
右侧右键 坦克右前行驶,每按一次右偏一格,放开保持偏转角度 P0_7
左侧1键 坦克以最大速度向前行驶 P0_0
左侧2键 坦克以最大速度向后行驶 P0_1
右侧1键 坦克左向飘移 P0_2
右侧2键 坦克右向飘移 P0_3

成品效果

视频

https://www.bilibili.com/video/BV1Zu411p7aM/?spm_id_from=333.999.0.0

正视

俯视

左视

硬件模块及工具清单:

模块 说明 价格(元)
51单片机 单片机 STC89C52RC芯片,11.0592晶振。 40
坦克底盘 坦克底盘及M3铜柱螺丝若干,底盘带4个直流电机。 350
ps2手柄 无线的那种,会带接收器。 40
L298N电机驱动 12V供电,同时带5V输出电压。 4
JGB37 520减速电机 JGB37 520减速电机 * 2 每个35元
电池及充电器 12V锂电池和12V充电器 35
各种接线 各种公对公,母对母杜邦线若干,DIY铜线,漆包线,转接头,接线器等 10

另外音乐芯片组装需要电烙铁焊接,组装时可能需要万用表做些测试。如果对焊接不熟悉,还是买现成的模块比较合适。以上东西都可以在网上买到。

使用的相关工具软件:

OS: Ubuntu 20.04

硬件设计工具KiCAD

安装:https://docs.kicad.org/5.1/zh/getting_started_in_kicad/getting_started_in_kicad.html

软件设计开发工具:

ubuntu下安装: sudo apt-get install sdcc

  • 烧录软件:stcflash

ubuntu下安装: 从社区下载到本地,社区地址:https://github.com/laborer/stcflash

将stcflash.py文件解压到/usr/local/bin。 并去掉后缀名。

  • 依赖: python3, python-pip3, python serial

安装python serial: https://www.geeksforgeeks.org/how-to-install-python-serial-package-on-linux/

如果执行: stcflash报错: usr/bin/env: ‘python’: No such file or directory

执行以下命令解决: sudo ln -s /usr/bin/python3 /usr/bin/python

  • 串口调试工具: comtool

安装: sudo pipe3 install comtool

ruke's People

Contributors

coregiu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.