Using the attiny15 footprint/part in eagle from the atmel library for the attiny45 is not right, because B4 and B3 are reversed and it's not the first time I noticed that. But this time I just went in and changed the part in the library. Muahaha. Evil, I know. PCB is updated (again), "code" is here:
#include <avr/sleep.h>
int leds[] = {0,1,2,4};
void setup()
{
for (int i=0; i<4; i++)
{
pinMode(leds[i], OUTPUT);
digitalWrite(leds[i], HIGH);
delay(200);
digitalWrite(leds[i], LOW);
delay(200);
}
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
sleep_enable();
sleep_mode();
}
void loop() { }
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
I have a terrible feeling that the power down stuff doesn't work - I measured 200uA power consumption, which is in the active range of an attiny45 and far away from 0.1uA in power-down mode, taken from the datasheet. Never just copy and paste stuff from the internet.
Are you sure? yes | no
Nice one... but one question to the code: Why does it work?
Shouldn't there be an ISR or something? or is the Button just your Reset Button?
Are you sure? yes | no
exactly that :) I thought about interrupts etc. but remembered reading about "only a reset could restart it, if interrupts were set wrong" - so I used that :)
Are you sure? yes | no
Hehe okay ;)
And now... what will it do?
BTW: Are those still the awesome Teal Color LEDs? ;)
Are you sure? yes | no
Well it goes through every pin and checks the cable. The (normal) blue LEDs show which pin is activated, and when the cable is not broken or shorted out, then only the corresponding red LED will glow. It's really not that big of a deal, until you're standing next to a customer on a lake and try to check a 150 Euro cable with a 10 Euro multimeter that shorts out on the connector shielding.
I only have 5 or 6 left of the cyan LEDs and they are hard to solder by hand - that's why I used the toaster oven instead for the matrices.
Are you sure? yes | no