Advertisement
Guest User

Untitled

a guest
Nov 30th, 2022
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include <Wire.h>
  2. #include "WireScanner.h"
  3.  
  4. TwoWire wirePort(PB11, PB10); // STM32F103 I2C_2
  5. WireScanner ws(wirePort);
  6.  
  7. void setup() {
  8. Serial.begin(9600);
  9. delay(1000);
  10. Serial.println("Pointer:");
  11. Serial.println((long)&wirePort);
  12. wirePort.begin();
  13. }
  14.  
  15. void loop() {
  16. ws.scanI2C();
  17. delay(5000); // wait 5 seconds for next scan
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement