Skip to content

Amin98Hosseini/ADXL345_STM32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adxl345 library for STM32 HAL

GY906


  • Super Loop Supported.
  • RTOS Supported.

  • Adxl345 Tested.
  • Adxl335 Tested.

  • Enable i2c Channel .
  • Configure ADXL345.h files.
  • Add 'adxl_init()' to Main File.

Super Loop example:

  • file ADXL345.h
//Adxl345 Device Address 
#define adxl_address 0x53<<1

//Set i2c Handeler here
extern I2C_HandleTypeDef hi2c1;

  • file main.c
#include "ADXL345.h"
int16_t x, y, z;
int main()
{
  adxl_init()
  while (1)
  {
    x=adxl_readx();
    y=adxl_ready();
    z=adxl_readz();
  }  
}

About

Library For Adxl345 With STM32 HAL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages