GNU General Public License v3.0

项目介绍

EFeru/hoverboard-sideboard-hack-STM 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前获得 75 个 Star、58 次 Fork。

仓库全名
EFeru/hoverboard-sideboard-hack-STM
开源许可证
GNU General Public License v3.0
Star 数
75
Fork 数
58
未关闭 Issue
5

README 摘要

hoverboard-sideboard-hack-STM This repository implements the firmware for the hoveboard sideboards. The hoveboard comes with two identical sideboards that can be flashed with this firmware. ► If you have a GD32 sideboard check-out the repo hoverboard-sideboard-hack-GD Table of Contents ======================= Hardware Example Variants Flashing Wiring iBUS Receiver 3D Visualization Demo Contributions Hardware The…

完整内容见 GitHub 原始 README 或本页 。

常见问题

hoverboard-sideboard-hack-STM 用什么语言开发?

主要使用 C 编写,采用 GNU General Public License v3.0 许可证,目前有 75 个 Star。

hoverboard-sideboard-hack-STM 可以免费商用吗?

仓库标注的许可证为 GNU General Public License v3.0,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 hoverboard-sideboard-hack-STM 的源码?

可以直接克隆仓库:git clone https://github.com/EFeru/hoverboard-sideboard-hack-STM.git,默认分支为 main;安装与运行步骤见仓库 README。

hoverboard-sideboard-hack-STM 最近还在维护吗?

仓库最近一次更新为 1月15日,当前有 5 个未关闭 Issue;Star 数为 75,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Hoverboard sideboard hack for STM32 boards

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
200
价值分
63
活跃状态
活跃

语言占比

Assembly
C
Linker Script
Makefile

贡献者

README

hoverboard-sideboard-hack-STM

Build status License: GPL v3 paypal

This repository implements the firmware for the hoveboard sideboards. The hoveboard comes with two identical sideboards that can be flashed with this firmware.

► If you have a GD32 sideboard check-out the repo hoverboard-sideboard-hack-GD


Table of Contents


Hardware

The original sideboard hardware supports one 4-pin cable that originally was connected to the hoveboard mainboard. It breaks out GND, 12/15V and USART. Additionally, two ports are used to connect to the LED boards. On the back of the board, two Photo Interrupter Optical Switches can be found, originally used to detect if a human is standing on the hoverboard. sideboard

The LED boards consist of colored LEDs (blue, red, green, orange) used for design and to inform the user about the current hoverboard state. Below the pinout of the LED boards is shown. ledboard

The sideboard brain is an STM32F103C8T6 with the pinout shown in the follwing figure: MCU_pinout

A very important component of the sideboard is the IMU MPU-6050 from Invensense. The MPU-6050 determines the board orientation by combining a 3-axis gyroscope and a 3-axis accelerometer on the same silicon die, together with an onboard Digital Motion Processor™ (DMP™), which processes complex 6-axis MotionFusion algorithms. The DMP™ offers many features, such as:

  • Accelerometer and Gyroscope raw data output
  • Quaternion output
  • Temperature output
  • Pedometer
  • Interrupts on gesture events such as Tap on all axes or Orientation change
  • Low-power modes
  • Self-test and calibration

The MPU-6050 pinout and orientation of axes is shown in the follwing figure: MPU6050_pinout

For more details see the MPU-6050 datasheet and MPU-6050 registers.


Example Variants

This firmware offers currently these variants (selectable in platformio.ini or config.h):

  • VARIANT_DEBUG: In this variant the user can interact with sideboard by sending commands via a Serial Monitor to observe and check the capabilities of the sideboard
  • VARIANT_HOVERCAR: This variant can be used for Hovercar build. An RC receiver with iBUS protocol can be connected to the AUX serial Rx pin (see schematic)
  • VARIANT_HOVERBOARD: In this variant the sideboard is communicating with the mainboard of a hoverboard using the FOC firmware repository

Of course the firmware can be further customized for other needs or projects.


Flashing

On the sideboard, there is a debugging header with GND, 3V3, SWDIO and SWCLK. Connect GND, SWDIO and SWCLK to your ST-Link V2 programmer. The 3V3 can be either obtained by connecting the pin to the ST-Link programmer or powering the sideboard with 12/15V.

If you have never flashed your sideboard before, the MCU is probably locked. To unlock the flash, check-out the wiki page How to Unlock MCU flash.

To build and flash choose one of the following methods:

Method 0: Using GitHub Fork

  • Fork the project
  • Modify desired source files and commit
  • Go to Actions (in the repo top menu)
  • Click on latest build
  • Download the build zip file from the Artifacts section
  • Upload desired firmware.bin file using ST-Link Utility
  • open the folder in the IDE of choice (vscode or Atom)
  • press the ‘PlatformIO:Build’ or the ‘PlatformIO:Upload’ button (bottom left in vscode).

Method 2: Using Keil uVision

  • in Keil uVision, open the sideboard-hack.uvproj
  • if you are asked to install missing packages, click Yes
  • click Build Target (or press F7) to build the firmware
  • click Load Code (or press F8) to flash the firmware.

Method 3: Using Linux CLI

  • prerequisites: install ST-Flash utility.
  • open a terminal in the repo check-out folder and if you have definded the variant in config.h type:
make

or you can set the variant like this

make -e VARIANT=VARIANT_####
  • flash the firmware by typing:
make flash

Wiring iBUS Receiver

An RC transmitter (Flysky FS-i6S or FS-i6X) can be connected to the sideboard using an FS-iA6B receiver as shown in the following schematic:

wiring_iBUS_pic


3D Visualization Demo

By converting Quaternions to Euler angles, we can make a 3D visualization example in Processing as shown below. For this Demo VARIANT_DEBUG was used.

sketch_pic


Contributions

Every contribution to this repository is highly appreciated! Feel free to create pull requests to improve this firmware as ultimately you are going to help everyone.

If you want to donate to keep this firmware updated, please use the link below:

paypal


评论

暂无评论