My simplest "Arduino" circuit

Cool! Thanks for the info!

I'll bet leaving the multimeter connected would drain the battery faster.

I won't do that. :P

change WDTCR to WDTCSR if you get the "'WDTCR' was not declared in this scope" error. see this post.

[quote author=Nick Gammon date=1385175530 link=msg=1478979]

  // allow changes, disable reset, clear existing interrupt
  WDTCSR = bit (WDCE) | bit (WDE) | bit (WDIF);
  // set interrupt mode and an interval (WDE must be changed from 1 to 0 here)
  WDTCSR = bit (WDIE) | bit (WDP2) | bit (WDP1) | bit (WDP0);    // set WDIE, and 2 seconds delay


Is it still going?

Yes it is. I can't recall now if I changed the battery yet. I have a similar one with a light detector which flashes at night to show where a nearby torch is here.

I changed the battery on one of them. Next time I'll make a note of the date of the new battery installation.

Yes, I compiled the code with the IDE. I think you need to add this link to the Additional Board Manager URLs in the Preferences:

Then under Tools -> Board -> Board Manager you find the entry for the Attiny group, select it, and click Install.


I have really tried to mod the code so it will work with a digistump atiny85 small board and I have it to work great with out LDR (Have one on the torch beside the fusebox). But my problem is to get it to work with the LDR.
This is the board:

Do you have any ideas how to make it work, I have tried this the last time:

Pin 0 (PB0) ← LDR (GL5539) → Pin 7 (PB2) (Ain1) <----> 56 k <----> Gnd (Digispark Tiny85)
Pin 6 (PB1) <---- LED —> 100 R <-----> Gnd (Internal LED Digispark Tiny85)

Best regards,
Lars Hammarström