Go Down

Topic: Corrected I2C Scanner Sketch- attached. (Read 343 times) previous topic - next topic

louarnold

The version of the sketch in error has this line of code:
Code: [Select]
Wire.beginTransmission(address);
The sketch with that line will report the incorrect device address because the beginTransmission() method requires a right-shifted address value and the sketch sends it and reports the unshifted address. The correct code line is:
Code: [Select]
Wire.beginTransmission(address>>1);
The attached sketch is the corrected one.

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview