kdagolf.blogg.se

Arduino wire library example
Arduino wire library example







So far, working with ANY module I got, it was NEVER that easy. Wire.write(something) //write to second register Wire.write(something) //Write to first register

arduino wire library example

When it comes to writing, it's even worse: Wire.beginTransmission(Module_Address) //Use this to start transmission To read Wire.requestFrom(Module_Address, 3) //Read three registers Call me stupid, but I have the feeling like somebody told me that 1 + 1 = 2, and then gave me some polynomial equation to solve :(Īll book examples and almost all tutorials look like this imaginary example: Wire.beginTransmission(Module_Address) //Use this to start transmission I've read few books and too many tutorials, but I could summarise these in two:Ī) all tutorials are just showing the very basics of how to use these methods and b) they don't actually explain the steps, like everything is totally self explanatory.

arduino wire library example

Being novice, I almost never use libraries that are already written by somebody, I try to create my class for module in order to truly understand how this module works and to learn how to manipulate with it. I Googled this a lot, and it seems that I am not the only one having problems with really understanding Wire.write() and Wire.read().









Arduino wire library example