Skip to content

Instantly share code, notes, and snippets.

@sin5678
Created June 7, 2018 05:17
Show Gist options
  • Save sin5678/3589367b3ad9a9030aaf317260370926 to your computer and use it in GitHub Desktop.
Save sin5678/3589367b3ad9a9030aaf317260370926 to your computer and use it in GitHub Desktop.
STM32duino I2C 使用
查看 STM32 F103C8T6 的文档 I2C SDA ->PB11 (板子上的 B11) SCL->PB10 (板子上的 B10)
使用 arduino 的 Wire 库操作之前 要定义先定义
TwoWire WIRE2 (2,I2C_FAST_MODE);
#define Wire WIRE2
然后就能正常使用 Wire 库了
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment