user14790: I would like to read temperature from a LM75 using the ATtiny85 running a core by SpenceKonde and utilizing the TinyWireM library.
My Logic Analyzer does not pick up any I2C communication, when I connect it to an Arduino Nano, it works fine. On the Nano, there is no need for TinyWireM so that's a big difference.
Therefore I conclude that the ATtiny85 is not speaking the right I2C slang to the device.
I also use SoftwareSerial and this works fine. It is visible on the Logic Analyzer.

The LM75 library is not made for ATtiny or TinyWireM, I replace the Wire references in-place by TinyWireM reference.
Should it be possible to 'just' replace Wire by TineWireM in the library and could I expect some meaningful data this way?
[updated code]
#include <Arduino.h>
#include <TinyWireM.h>
#include <LM75.h>
#include <SoftwareSerial.h>

#define SOFTWARE_SERIAL_TX_PIN 3
#define SOFTWARE_SERIAL_RX_PIN -1

LM75 sensor;
SoftwareSerial mySerial(SOFTWARE_SERIAL_RX_PIN, SOFTWARE_SERIAL_TX_PIN);

void setup() {
  TinyWireM.begin();
  mySerial.begin(2400);
  mySerial.print("Starting..");
}

void loop() {
delay(1000);
mySerial.println("SO");
mySerial.println(sensor.temp());
delay(1000);
} 


user54056: This is an old post I know but hopefully this information is helpful to someone. I modified the lm75 library by replacing all instances of Wire with TinyWire and as above no go, but turns out a 10k pull up on SCL / SDA is a necessity for the attiny 85. For whatever reason i2c works fine on an arduino UNO without pull ups but not on an attiny 85. So in short, add pull up resistors and it works. Bonus potato grade picture of attiny, LM75 and display module showing temperature.


user39273: The current ATtiny core includes a Wire library for the USI hardware used in the Tinys. This way you don't need to modify the LM75 library which is error prone.

14790: <p>I would like to read temperature from a <a href="https://datasheets.maximintegrated.com/en/ds/LM75.pdf" rel="nofollow noreferrer">LM75</a> using the <strong>ATtiny85</strong> running <a href="https://github.com/SpenceKonde/ATTinyCore" rel="nofollow noreferrer">a core by SpenceKonde</a> and utilizing the <a href="https://github.com/adafruit/TinyWireM" rel="nofollow noreferrer">TinyWireM</a> library.</p>

<p>My Logic Analyzer does not pick up any I2C communication, when I connect it to an Arduino Nano, it works fine. On the Nano, there is no need for <strong>TinyWireM</strong> so that's a big difference.</p>

<p>Therefore I conclude that the ATtiny85 is not speaking the right I2C slang to the device.</p>

<p>I also use SoftwareSerial and this works fine. It is visible on the Logic Analyzer.</p>

<p><a href="https://i.stack.imgur.com/7sqUj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7sqUj.png" alt="enter image description here"></a></p>

<p>The <a href="https://github.com/thefekete/LM75" rel="nofollow noreferrer">LM75 library</a> is not made for ATtiny or TinyWireM, I replace the <code>Wire</code> references in-place by <code>TinyWireM</code> reference.</p>

<p>Should it be possible to 'just' replace Wire by TineWireM in the library and could I expect some meaningful data this way?</p>

<p><strong>[updated code]</strong></p>

<pre><code>#include &lt;Arduino.h&gt;
#include &lt;TinyWireM.h&gt;
#include &lt;LM75.h&gt;
#include &lt;SoftwareSerial.h&gt;

#define SOFTWARE_SERIAL_TX_PIN 3
#define SOFTWARE_SERIAL_RX_PIN -1

LM75 sensor;
SoftwareSerial mySerial(SOFTWARE_SERIAL_RX_PIN, SOFTWARE_SERIAL_TX_PIN);

void setup() {
  TinyWireM.begin();
  mySerial.begin(2400);
  mySerial.print("Starting..");
}

void loop() {
delay(1000);
mySerial.println("SO");
mySerial.println(sensor.temp());
delay(1000);
} 
</code></pre>
 54056: <p>This is an old post I know but hopefully this information is helpful to someone. I modified the lm75 library by replacing all instances of Wire with TinyWire and as above no go, but turns out a 10k pull up on SCL / SDA is a necessity for the attiny 85. For whatever reason i2c works fine on an arduino UNO without pull ups but not on an attiny 85. So in short, add pull up resistors and it works. Bonus potato grade picture of attiny, LM75 and display module showing temperature.</p>

<p><a href="https://i.stack.imgur.com/TLO1P.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TLO1P.jpg" alt="enter image description here"></a></p>
 39273: <p>The current ATtiny core includes a Wire library for the USI hardware used in the Tinys. This way you don't need to modify the LM75 library which is error prone.</p>
