docs.rs failed to build adxl355-0.2.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
adxl355-0.2.3
ADXL355 embedded-hal driver crate
Usage
Include library as a dependency in your Cargo.toml
[dependencies.adxl355]
version = "<version>"
Use embedded-hal implementation to get SPI and a GPIO OutputPin for the chip select, then create the accelerometer handle
use ;
// to create sensor with default configuration:
let mut accelerometer = default?;
// start measurements
accelerometer.start;
// to get 3d accerlation data:
let accel = accelerometer.acceleration?;
println!;
// One can also use conf module to supply configuration:
use ;
new?;
Running the examples
Blackpill board (STM32F103)
Example based on the stm32f103 microcontroller [examples/blackpill.rs
]
To build an example
And run immediately. Flashing with black magic probe using bmp.sh
script (only works for MacOS at the moment).
STM32G070 [DISABLED UNTIL NEXT STM32G0xx-hal UPDATE]
Example based on the stm32g070 microcontroller [examples/stm32g070.rs
]
To build an example
The resulting ELF file can be found under target/thumbv6m-none-eabi/examples/
.
To run immediately
This will make use of flash.sh
that assumes the st-link utilities are available in your PATH.
Example with normalized data