Doesn't your laptop have a battery manager software/application that opens a message box telling you the battery is low?
Perhaps you could write a program and have it send a message via USB port to the Uno.
If not, and you can't find a program:
How will you add a connection from the battery? I looked at my 2 laptops, the battery pins are not easy to access.
Also, the batteries are pretty high voltage, 19-20 volts when being charged.
I have a message that comes up when my battery is low yes.
I just want that when this message appears, a red LED begins to blink or something like that.
Is it possible? Or not?
I hope it's possible. It seems very easy and simply.
Deam it And i don't find anything on the internet about this
You are a moderator wich posted 20000 replies/topics and you can't do that? What can i do then? I received my Tinkerkit yesterday, so I'm just a beginner
Sadly, simply being a mere forum moderator has precious little bearing on battery chemistry or monitoring techniques.
Explaining what OS your computer is running, and what access the user has to the battery monitoring subsystem might help.
Can you find the battery of your laptop?
Can you connect wires to it?
Do you have a Digital Multimeter to measure the voltage when it is full and when it is 90...10%
You could make a voltage divider to have a first order indication of battery life. But biggest problem is imho that the capacity really depends on what you are doing on the laptop.
No i can't connect wires to the battery, and i don't want to do that!
Okay, so I think it is impossible? But it seems very simple! Just a led that gives light when my computers battery is low?
Isn't there a function that can read the battery informations? Just like BatteryCharge.read(); or something like that?
Is there not a script that turn on the background of the computer? And that can give the percentage of the battery? Is there not a program that can give the percentage of the battery to the arduino? Please help me.
This seems to me to be more of a Windows 7 question than anything to do with an Arduino.
(In fact, I'd go so far as to say, I can see no reason for an Arduino here)
What do the Windows 7 battery monitoring APIs look like?
If I wanted to do this, I'd write an application to run on the PC which used the appropriate Windows API to read the battery level and print it out, and use Gobetwino to run that on request from the Arduino and return the results to the Arduino. The Arduino sketch would have to send the Gobetwino command string to the serial port at regular intervals, read back the command output and parse it to determine the battery level, then do whatever you want with LEDs based on the result. This assumes that the Arduino is connected to the PC by USB.
Yep, moderator with a lot of posts - but as indicated, this is a PC problem, and I'm not a PC code guy. Without access to PC internals, not much Arduino or other hardware (voltage comparator circuit for example) can do.
Externally, PC only presents 5V on the USB ports, so reading that won't even help.
Ce n'est pas impossible je dirais même que c'est assez simple... Sur Windows tu as un évènement PowerModeChanged, la classe Win32_Battery, ainsi que la classe SerialPort. Il te reste à combiner ces éléments dans un programme (je recommande d'utiliser VS2012 express et le langage C#), qui enverra un message à l'arduino, genre "batterie 40", qui indiquerait que la batterie est à 40%...
Coté Arduino, c'est vraiment très simple, tu lis le Serial, vérifie que le message contient "batterie" suivi d'un chiffre, tu récupère ce chiffre dans une variable et voilà... Avec la fonction "sscanf" c'est super simple
//on suppose que c'est le message reçu par le Serial de l'arduino:
char input[] = "batterie 40";
int niveau_de_batterie;
if ( sscanf( input, "batterie %d", &niveau_de_batterie ) == 1 )
{
//le niveau de batterie est maintenant dans la variable niveau_de_batterie
if ( niveau_de_batterie < 10 )
{
digitalWrite( ledPin, HIGH );
}
}
Je sais, plus facile à dire qu'à faire, mais sérieux c'est vraiment pas compliqué...Allez un peu de lecture:
Oulala merci beaucoup déjà! Mais il y a un truc que je ne comprend pas très bien, c'est ce 'Serial Input' ? Que dois-je faire avec le lien : Win32_Battery class - Win32 apps | Microsoft Learn ?? Je ne comprend pas tout, (j'ai 15 ans :D). J’espère que tu as le temps de m'aider?