temperature
-
- Site Admin
- Posts: 1863
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: temperature
I guess "lazyprogrammer" is more of a lifestyle choice than a forum nickname
-
- Posts: 85
- Joined: Mon Sep 27, 2010 5:26 pm
Re: temperature
Get ready here comes the baby spoon... temp is the temperature in degrees celcius in 20.12 fixed point - divide the number by 4096 (2 to the 12th power) to convert it to an integer.
Seriously though, asking for help and putting in no effort on your part is really annoying.
So I should do it like this:
if I have the numbers:
739 844 112842
39844.112842 / 4096 = 9.7... degrees celsius
Is this correct?
Can you please post the code, because I'm not sure what you mean with the fixpoint... 20.12 means 100°C???Wich fixpoint do you mean and what does this point mean??
In the real life I'm really NOT LAZY, but when i program i can be differentI guess "lazyprogrammer" is more of a lifestyle choice than a forum nickname
Re: temperature
no and no.lazyprogramer wrote:So I should do it like this:
if I have the numbers:
739 844 112842
39844.112842 / 4096 = 9.7... degrees celsius
Is this correct?
not that you are on the right track... why did you drop the 7 at the beginning? why do you think that 3 numbers separated by spaces are all part of the same number?
Re: temperature
t1 and t2 are irrelevant. all youre interested in is temp which is 20.12 fixed point degrees in celsius
-
- Posts: 85
- Joined: Mon Sep 27, 2010 5:26 pm
Re: temperature
I don't know, so please can you just give me the right solution?not that you are on the right track... why did you drop the 7 at the beginning? why do you think that 3 numbers separated by spaces are all part of the same number?
okay...t1 and t2 are irrelevant. all youre interested in is temp which is 20.12 fixed point degrees in celsius
And how should I write it in the code??
Please just give me the code then I will understand it.
Re: temperature
float celsius = temp/4096.0f;
do yourself a favor and re-evaluate your choice of hobbies.
do yourself a favor and re-evaluate your choice of hobbies.
-
- Posts: 23
- Joined: Sat Jun 12, 2010 3:31 am
Re: temperature
All I can say is wow.
Just reading this, I laughed out loud.
Seriously, give lazyprogrammer a break. He has no idea what he's asking, and you should maybe get him to clarify that a little.
Being somewhat new to programming the DS, though, this post caught my eye. I had no idea there were temperature sensors in the screens. Can they be read individually (as in, read two different temperatures)? Even if the programming/hardware isn't made that way, I would still love to learn how to read them. Where would I find out more information (aside from just going "Here's my open mouth. Feed me. Now.")? I tried googling it and found this, this, and this. However, none of it seemed to tell me what I was looking for, as in: what exactly do I need to type to read the sensors directly? I don't mind doing a little bit of math to calculate the answer in Kelvins, ºC, or even ºF, I just am wandering what I need to type in a homebrew app to read the temperature.
- Stryker
Just reading this, I laughed out loud.
Seriously, give lazyprogrammer a break. He has no idea what he's asking, and you should maybe get him to clarify that a little.
Being somewhat new to programming the DS, though, this post caught my eye. I had no idea there were temperature sensors in the screens. Can they be read individually (as in, read two different temperatures)? Even if the programming/hardware isn't made that way, I would still love to learn how to read them. Where would I find out more information (aside from just going "Here's my open mouth. Feed me. Now.")? I tried googling it and found this, this, and this. However, none of it seemed to tell me what I was looking for, as in: what exactly do I need to type to read the sensors directly? I don't mind doing a little bit of math to calculate the answer in Kelvins, ºC, or even ºF, I just am wandering what I need to type in a homebrew app to read the temperature.
- Stryker
Re: temperature
the answer is in the thread - wow indeedJordan_Gray wrote:All I can say is wow.
...clipped...
I just am wandering what I need to type in a homebrew app to read the temperature.
- Stryker
Who is online
Users browsing this forum: No registered users and 3 guests