usb/battery switching?

hi :smiley:

i just recently made a battery backup for my panel.
its conected to my arduino :stuck_out_tongue:

is there a way for when the power goes out(usb is plugged into mp3 wall charger) that the peizo on pin 11 will play C as used in the melody script every minute, and when the battery backup is low, it will play
Cfec
Cfe
Cfec
Cfe

please post the code :stuck_out_tongue: i am really stumped

To programmatically predict when battery is low is a daunting task. I think there was a thread on this a while ago.

Google it :slight_smile:

You could make a ciruit that would automatically change powersource and that circuit could toggle an arduino pin to signal a source change. I do not know how to build a circuit like this, yet, but google automatic power detection, or something in the likes of that.

that should do :slight_smile:

sadly, nothing what i was looking for, i typed in arduino automatic power detection

The Arduino 2009 automatic switches to use Vin when USB is unplugged, if you set Vin at a voltage that is 6V or less. Changing R10 will widen that scope.

By the way your web site is blocked from my location it says:-

Adult Content
Sites that display full or partial nudity in a sexual context, but not sexual activity; erotica; sexual paraphernalia; sex-oriented businesses as clubs, nightclubs, escort services; and sites supporting online purchase of such goods and services.

you can buy things, check if you have a internet filter, and thanks :slight_smile:

check if you have a internet filter,

I do I am at work I have no choice in the matter.

good point (XD)