Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include "WireScanner.h"
- TwoWire wirePort(PB11, PB10); // STM32F103 I2C_2
- WireScanner ws(wirePort);
- void setup() {
- Serial.begin(9600);
- delay(1000);
- Serial.println("Pointer:");
- Serial.println((long)&wirePort);
- wirePort.begin();
- }
- void loop() {
- ws.scanI2C();
- delay(5000); // wait 5 seconds for next scan
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement