An example of using the 6TRON Motor Sensor library with MbedOS, using a AS5047 magnetic sensor in SPI.
The following boards are required:
- Any MBED supported board
- One AS5047 magnetic sensor with SPI support
mbed_motor-sensor-example makes use of the following libraries (automatically
imported by mbed deploy or mbed import):
This repository use MbedOS as RTOS framework. While next steps describes how to use Mbed CLI 1 commands to setup the project, it is highly recommended that users read MbedOS official documentation.
To clone and deploy the project in one command, use mbed import and skip to the
target and toolchain definition:
mbed import https://github.com/catie-aq/mbed_motor-sensor-example.git mbed_motor-sensor-exampleAlternatively:
-
Clone to "mbed_motor-sensor-example" and enter it:
git clone https://github.com/catie-aq/mbed_motor-sensor-example.git mbed_motor-sensor-example cd mbed_motor-sensor-example -
Deploy software requirements with:
mbed deploy
-
If necessary, eg using a 6TRON Zest Core, clone the custom target repository:
git clone YOUR_CUSTOM_TARGET_REPOSITORY your-custom-target
-
... and enable the custom target:
-
Linux:
cp your-custom-target/custom_targets.json . -
Windows:
copy your-custom-target\custom_targets.json .
-
Define your target and toolchain:
mbed target YOUR_MBED_OS_TARGET
mbed toolchain GCC_ARMCompile the project:
mbed compileProgram the target device with a Segger J-Link debug probe and
sixtron_flash tool:
sixtron_flashDebug on the target device with the probe and Segger Ozone software.