issue with the begin function as master - #1000
Conversation
I had been trying to work with the i2c bus with a mpu6050, but it just did not work. So I added a while right after you enable the peripheral in the begin() function as master, it just worked out for me, i followed the tivaware reference guide example for i2c initialization
|
Thanks for the fix! Strange that I have not seen it with other I2C peripherals. Can you please post the snip of code in which you call Wire.begin and then start communicating with the mpu6050? Would you please issue the pull request against the tivac-core located here: https://github.com/energia/tivac-core |
|
Well, i have been having trouble with this library , well i tried to use the code provided by qboticslabs for the chefbot robot. And, long story short, it was nor working at all, for some reason, they use the i2c3 line, and when you wok with this library it doesnt work at all, it just enable the i2c1 line, and, well , so i figured out this by reading the ::begin() function, and in code composer i checked out a very simple program just to verify the simplest command which was writing to the whoami (0x75) register on the mpu and getting the value from the bus,if i got a 68 it worked out: #include <Wire.h> void setup() } Wire.write(0x75);// sends one byte Serial.print("endtransmission"); Wire.beginTransmission(0x68); } |
I had been trying to work with the i2c bus with a mpu6050, but it just did not work. So I added a while right after you enable the peripheral in the begin() function as master, it just worked out for me, i followed the tivaware reference guide example for i2c initialization
Thank you for creating a pull request and contributing to the Energia repository!
Before opening the request, please review the following guidelines.
Scope of the change
Describe the scope of the change.
Limit the number of modified lines of code and avoid unecessary modified lines (like
tabreplaced byspace).Known limitations
I've only tested it with the tivac TM4C123G
Im going to try it with the tm4c1294 probably next week :D
Tests and examples
Run any tests or examples that can exercise the modified code.