Giter Site home page Giter Site logo

scatwheelchair_mcu_2's Introduction

ScatWheelchair_MCU_2

This repo is the secondary embedded system(Bluepill - STM32F103C8TX) on the wheelchair.

The MCU does

  • collect data from incremental encoder
  • process them to angular velocity and
  • send them back to primary MCU every 1ms.

Link to Main MCU repo: https://github.com/angcx1997/scat_microcontroller

Link to original author repo: https://github.com/angcx1997/ScatWheelchair_MCU_2

Requirement

Installation

STM32CubeIDE is used to generated the overall code and structure. In Project Manager/Code Generator, select "Generate peripheral initialization ..."

Tips: Add the code in between the section

  • /* USER CODE BEGIN XX */ and
  • /* USER CODE END XX */

If wish to use STM32CubeMX

  • Do note that the code is not generated through CubeMX but refer to the code generated by it.
  • If wish to use the auto-code generation feature from CubeMX, it is advised to generate a new code from CubeMX and copy the code from this repo.
  • Also, the /Document/cubeMX_report.pdf is just providing a reference, might not be final pin configuration or peripheral configuration.

Hardware and Peripheral Used

Hardware Peripheral Used
Left Encoder TIM2 CH1 CH2
Right Encoder TIM3 CH1 CH2
Communication with Main MCU SPI1

General Guideline if you are interested in contributing the code

To achieve accurate timing of 1kHz, systick interrupt is used to ensure that the data sending at correct timing. If user have more thing to send over to main MCU, could just add them into HAL_SYSTICK_Callback.

Note

The reason a second MCU is used is because of insufficient space on main MCU. Therefore, current method of sending data is actually not encouraged by the author as it is more error prone to wiring or timing issue during communication between MCU. And it make debugging very difficult.

scatwheelchair_mcu_2's People

Contributors

angcx1997 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.