You have to replace all the LCD library calls with USB library calls. Here's a quick, crude, untested try:
#include <TinyWireM.h>
#include <DigiUSB.h>
void setup(){
TinyWireM.begin();
DigiUSB.begin();
analogReference(INTERNAL1V1);
}
int get_temp() {
int raw = analogRead(A0+15);
//raw -= 13; // raw adjust = kelvin
int in_c = raw - 273; // celcius
return in_c;
}
void loop(){
DigiUSB.refresh();
int temp = get_temp();
DigiUSB.send(temp); // send the temperature value back to the PC over USB
DigiUSB.delay(1000); // one second delay
}
You should be able to receive the results using the "receive" or "monitor" program on your PC. And yes, you should plug in the DigiSpark first.
This example will just send the raw temperature value, once per second, with no formatting. And I didn't double-check to see if it needs to be converted to a string value first...