Sorry, I don't mean to rush but I borrowed that multimeter that I have to return in a couple of dayssotasystems wrote:![]()

Sorry, I don't mean to rush but I borrowed that multimeter that I have to return in a couple of dayssotasystems wrote:![]()
I'll be honest... I have no clue what that meansCamble wrote:I should point out that with an Arduino, you can read the battery voltage using one of the analog pins. You don't need a reference voltage with a divider and a "battery low" flag. You can have a reading of the actual voltage and make your decisions based on that.
I get where to check the voltage with the multimeter, but how do I check the voltage with the arduino?Charge your battery up until it is completely full and then read the voltage with a multimeter AND your leonardo at the same time.
You'd need to do a bit of readingwinnetouch wrote: I get where to check the voltage with the multimeter, but how do I check the voltage with the arduino?
I read up what you posted. Didn't understand much so I looked up a video by Paul McWhorter. I sort of get what I have to do BUT... The problem is the code I'm using for the controller. My pin 15 and A1 are determined to be keypresses. So whenever I try to upload the script all I get is a blinking red light and the arduino continually sending out a command for a button press. I tried to make sense of the code I use (I didn't write it myself and it's posted 2 or 3 posts ago) but I can't see a way to skip those 2 pins. As far as I understand the script uses an equation to determine pin numbers and corresponding commands they send. But I don't know how to skip any specific pin. Should I be using a different code altogether?Camble wrote:You'd need to do a bit of readingwinnetouch wrote: I get where to check the voltage with the multimeter, but how do I check the voltage with the arduino?
https://www.arduino.cc/en/Reference/AnalogRead
Code: Select all
int ReadVoltage = 0;
void setup() {
analogReference(INTERNAL);
pinMode(A1, INPUT);
Serial.begin(9600);
}
void loop() {
ReadVoltage = analogRead(A1);
Serial.println(ReadVoltage);
delay(1000);
}
Did what you said and as long as the GB0 is turrned off I get al zeros. When I turn it on I get values around 767-781, then when the GB0 booted up it started dropping to around 740-760 and stayed there for the time I was observing.sotasystems wrote:It is no problem to use other pins to do the reading and lighting the LED. But I see that the problem is getting your readings (you just get "0" for some reason). First, use this code in a new sketch to see if you get something else than 0, and if you don't, then you can get your readings. (don't use your controller code just yet, we will modify it later):
Sounds about right. Now do as I said in page one:winnetouch wrote:Did what you said and as long as the GB0 is turrned off I get al zeros. When I turn it on I get values around 767-781, then when the GB0 booted up it started dropping to around 740-760 and stayed there for the time I was observing.sotasystems wrote:It is no problem to use other pins to do the reading and lighting the LED. But I see that the problem is getting your readings (you just get "0" for some reason). First, use this code in a new sketch to see if you get something else than 0, and if you don't, then you can get your readings. (don't use your controller code just yet, we will modify it later):
sotasystems wrote:To get the baseline readings, you do the following:
Charge your battery up until it is completely full and then read the voltage with a multimeter AND your leonardo at the same time. Then turn your gameboy on. Then open the Arduino Serial monitor on your computer, and note the approx. value you get there and the voltage you read with the multimeter. Now either play a game or just let a game run on your gameboy to make use of the battery and note the approximate readings you get from the serial monitor and the multimeter like every 10 minutes until the battery is depleted, but don't go below 3.20 Volt. Please also write the exact time! If you don't even get to 3.20 Volt, please tell at which voltage it started to cut off. If you have all your readings, please report back.
Here is a screenshot of the values. As instructed I did not go under 3,20 volts. The arduino values are a bit wonky since they kept fluctuating all the time.sotasystems wrote: Sounds about right. Now do as I said in page one.
Very well.winnetouch wrote: Here is a screenshot of the values. As instructed I did not go under 3,20 volts.
Pretty usual.winnetouch wrote:The arduino values are a bit wonky since they kept fluctuating all the time.
Users browsing this forum: No registered users and 1 guest