{"action":"created","issue":{"url":"https://api.github.com/repos/mikaelpatel/Cosa/issues/305","repository_url":"https://api.github.com/repos/mikaelpatel/Cosa","labels_url":"https://api.github.com/repos/mikaelpatel/Cosa/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/mikaelpatel/Cosa/issues/305/comments","events_url":"https://api.github.com/repos/mikaelpatel/Cosa/issues/305/events","html_url":"https://github.com/mikaelpatel/Cosa/issues/305","id":55403681,"number":305,"title":"TWI::Slave does not seem to work.","user":{"login":"oddstr13","id":638706,"avatar_url":"https://avatars2.githubusercontent.com/u/638706?v=4","gravatar_id":"","url":"https://api.github.com/users/oddstr13","html_url":"https://github.com/oddstr13","followers_url":"https://api.github.com/users/oddstr13/followers","following_url":"https://api.github.com/users/oddstr13/following{/other_user}","gists_url":"https://api.github.com/users/oddstr13/gists{/gist_id}","starred_url":"https://api.github.com/users/oddstr13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oddstr13/subscriptions","organizations_url":"https://api.github.com/users/oddstr13/orgs","repos_url":"https://api.github.com/users/oddstr13/repos","events_url":"https://api.github.com/users/oddstr13/events{/privacy}","received_events_url":"https://api.github.com/users/oddstr13/received_events","type":"User","site_admin":false},"labels":[{"id":19026281,"url":"https://api.github.com/repos/mikaelpatel/Cosa/labels/invalid","name":"invalid","color":"fad8c7","default":true},{"id":69764081,"url":"https://api.github.com/repos/mikaelpatel/Cosa/labels/ripple","name":"ripple","color":"eb6420","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2015-01-25T07:47:21Z","updated_at":"2018-03-11T19:50:58Z","closed_at":"2015-01-26T15:14:18Z","author_association":"CONTRIBUTOR","body":"I'm having trouble getting the TWI slave example to work with either the TWI scan sketch, or i2cdetect on the RPi.\nI'm not quite sure if this is an actual bug, or if I am doing something wrong.\n- The BMP085 shows up on the I2C bus, both for the scan sketch and for the Pi.\n- Once the TWI::Slave slave is connected, i2cdetect takes about 0.7s, and no devices are detected.\n- A scan with i2cdetect without the Cosa TWI::Slave connected takes about 0.1s, and detects 0x77, which is the BMP085.\n- Reversing the SCL and SDA pins on the TWI::Slave causes i2cdetect to detect devices on all addresses. This would be expected, I guess?\n\nSetups tried\n- Arduino UNO with the plain CosaTWIslave example sketch.\n- ATtiny85 with my modified sketch (NEXA::Transmitter control from the Pi is the goal; http://oddstr13.openshell.no/paste/VMSYQL7T/)  the LED toggle was added so I could see if there was actually anything running.\n- Breadboarded Arduino UNO (ATmega328P with 16MHz crystall & Optiboot) with my NEXA transmitter sketch. Also tried with the CosaTWIslave example sketch.\n\nConnecting the SCL pin of the Cosa TWI::Slave is what triggers this issue.\n- SDA connected, SCL _NOT_ connected == Pi can access BMP085.\n- SDA connected, SCL connected == Pi can _NOT_ access the BMP085.\n- SDA _NOT_ connected, SCL connected == Pi can _NOT_ access the BMP085.\n\nHaving only the TWI::Slave on the bus results in same results as with the BMP085 connected, except that the BMP085 is not detected then.\n\nUnfortunately I do not have a scope or a logic analyzer, so I'm not able to debug the issue on the electrical level.\n- Cosa version is commit 9350f31c14ba8f1c754ad4dece69beedc55d8a26\n- Arduino version is 1.0.6\n\nI can update to latest commit and try again, but I did not see any commit messages that suggested TWI might have been touched.\n\nPS:\nphew, that ended up as quite the wall of text..\nIs there an IRC channel for Cosa?\n"},"comment":{"url":"https://api.github.com/repos/mikaelpatel/Cosa/issues/comments/372143537","html_url":"https://github.com/mikaelpatel/Cosa/issues/305#issuecomment-372143537","issue_url":"https://api.github.com/repos/mikaelpatel/Cosa/issues/305","id":372143537,"user":{"login":"dothebart","id":5013077,"avatar_url":"https://avatars1.githubusercontent.com/u/5013077?v=4","gravatar_id":"","url":"https://api.github.com/users/dothebart","html_url":"https://github.com/dothebart","followers_url":"https://api.github.com/users/dothebart/followers","following_url":"https://api.github.com/users/dothebart/following{/other_user}","gists_url":"https://api.github.com/users/dothebart/gists{/gist_id}","starred_url":"https://api.github.com/users/dothebart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dothebart/subscriptions","organizations_url":"https://api.github.com/users/dothebart/orgs","repos_url":"https://api.github.com/users/dothebart/repos","events_url":"https://api.github.com/users/dothebart/events{/privacy}","received_events_url":"https://api.github.com/users/dothebart/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T19:50:58Z","updated_at":"2018-03-11T19:50:58Z","author_association":"NONE","body":"Yes, [the bananapi is connected via a logic converter](https://www.exp-tech.de/en/modules/currentvoltage/5410/sparkfun-logic-level-converter-bi-directional) On the Oscar you see that the signal is not as clean as on the 3.3V side, but with a genuine arduino wire-lib as used by the grove-pi i2cdetect can find the grove-pi, but not the [cosa slave example](https://github.com/mikaelpatel/Cosa/blob/master/examples/TWI/CosaTWIslave/CosaTWIslave.ino)"}}
{"actor":{"display_login":"dothebart"}}