#include"stm32f1xx_hal_uart.h" #include"usart.h" voidADXL345_write(u8addr-ADXL345模块-c - IMDN开发者社群-imdn.cn" /> #include"stm32f1xx_hal_uart.h"#include"usart.h"voidADXL345_write(u8addr,u8data){IIC_Start();IIC_Send_Byte(ADXL_WRITE);  IIC_Wait_Ack();  IIC_Send_Byte(addr);  IIC_Wait_Ack();  IIC_Send_Byte(data);  IIC_Wait_Ack();  IIC_Stop();  HAL_Delay(10);}u8ADXL345_read(u8addr){  u8d=0;  IIC_Start();  IIC_Send_Byte(ADXL_WRITE);  IIC_Wait_Ack();  IIC_Send_Byte(addr);  IIC_Wait_Ack();  II-IMDN开发者社群-imdn.cn"> #include"stm32f1xx_hal_uart.h"#include"usart.h"voidADXL345_write(u8addr,u8data){IIC_Start();IIC_Send_Byte(ADXL_WRITE);  IIC_Wait_Ack();  IIC_Send_Byte(addr);  IIC_Wait_Ack();  IIC_Send_Byte(data);  IIC_Wait_Ack();  IIC_Stop();  HAL_Delay(10);}u8ADXL345_read(u8addr){  u8d=0;  IIC_Start();  IIC_Send_Byte(ADXL_WRITE);  IIC_Wait_Ack();  IIC_Send_Byte(addr);  IIC_Wait_Ack();  II - IMDN开发者社群-imdn.cn">
登录
首页 » c » ADXL345模块

ADXL345模块

于 2022-05-28 发布 文件大小:2.21 kB
0 161
下载积分: 2 下载次数: 1

代码说明:

#include "adxl345.h" #include "main.h" #include "myiic.h" #include "math.h" #include "main.h" #include #include "stm32f1xx_hal_uart.h" #include "usart.h" void ADXL345_write(u8 addr, u8 data) { IIC_Start(); IIC_Send_Byte(ADXL_WRITE);     IIC_Wait_Ack();     IIC_Send_Byte(addr);     IIC_Wait_Ack();     IIC_Send_Byte(data);     IIC_Wait_Ack();     IIC_Stop();     HAL_Delay(10); } u8 ADXL345_read(u8 addr) {     u8 d = 0;     IIC_Start();     IIC_Send_Byte(ADXL_WRITE);     IIC_Wait_Ack();     IIC_Send_Byte(addr);     IIC_Wait_Ack();     II

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • CefSharp.MinimalExample-master
    使用cefsharp库(Minimal example of how the CefSharp library can be used using the official Nuget packages. Includes examples for WinForms WPF OffScreen For a more complete example of each project see the main CefSharp repository.)(using cefsharp library)
    2020-06-24 22:40:01下载
    积分:1
  • timer
    在对话框中动态显示系统时间!!! ^_^(In the dialog time dynamic display system!!!)
    2014-11-02 00:35:33下载
    积分:1
  • VT_X64
    说明:  一份简单的VT框架源码~带关键的中文注释(A Simple VT Framework Source)
    2020-06-19 22:40:02下载
    积分:1
  • EffectShow
    通过对图象实现各种扫描显示,了解图象的绘图过程,便于实现对图象处理的编程显示。(of images of various scanning, image understanding of the mapping process to facilitate the achievement of the image processing program shows.)
    2005-06-08 12:55:46下载
    积分:1
  • zxinglib
    C++ project for zxing library.
    2014-12-17 20:49:18下载
    积分:1
  • 基于战舰STM32的1602液晶驱动程序.rar,在网上看到的自己调不通就下了这个
    基于战舰STM32的1602液晶驱动程序.rar,在网上看到的自己调不通就下了这个,测试已经通过,感谢原作者的分享!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2023-03-17 06:45:03下载
    积分:1
  • 实验19:交通灯
    说明:  使用51单片机控制LED灯,实现交通灯功能。(The use of 51 single-chip computer to control the LED lights to achieve the function of traffic lights.)
    2020-06-19 10:20:02下载
    积分:1
  • Modbus_Protocol-RTU_C51_Program
    Modbus协议及Modbus RTU的C51编程(Modbus RTU Modbus protocol and the C51 programming)
    2011-08-23 17:20:33下载
    积分:1
  • MatchLSM
    1.打开左右两张影像2.Harris算法提取同名点3.显示提取同名点(若要进行下一步匹配则不建议显示,这里只是用于查看是否提取出)4.相关系数匹配(只在找出的同名点内匹配)5.LSM最小二乘匹配(先进行粗匹配,再精匹配)(1 Open the left and right images 2.Harris algorithm to extract two tie points 3 shows the extraction of corresponding points (not recommended to proceed to the next match show, here is used to see if extracted) 4. Correlation coefficient matching (just looking match within a point of the same name) 5.LSM least squares matching (rough first match, then fine match))
    2013-08-28 15:45:57下载
    积分:1
  • STM32F429BIT6_uCOS-III
    STM32F429BIT6  uCOS-III  移值  可以自己使用 没有错误
    2023-06-04 07:15:04下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载