View unanswered posts | View active topics It is currently Fri Sep 19, 2014 2:48 pm



Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
 temperature 
Author Message
Site Admin

Joined: Tue Aug 09, 2005 3:21 am
Posts: 1135
Location: UK
I guess "lazyprogrammer" is more of a lifestyle choice than a forum nickname :wink:

_________________
devkitPro IRC support
Personal Blog


Wed Nov 10, 2010 12:12 am
Profile ICQ WWW

Joined: Mon Sep 27, 2010 5:26 pm
Posts: 85
Quote:
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??

Quote:
I guess "lazyprogrammer" is more of a lifestyle choice than a forum nickname


In the real life I'm really NOT LAZY, but when i program i can be different


Wed Nov 10, 2010 2:47 pm
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 325
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?

no and no.

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?


Wed Nov 10, 2010 2:57 pm
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
t1 and t2 are irrelevant. all youre interested in is temp which is 20.12 fixed point degrees in celsius


Wed Nov 10, 2010 7:23 pm
Profile

Joined: Mon Sep 27, 2010 5:26 pm
Posts: 85
Quote:
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?


I don't know, so please can you just give me the right solution?


Quote:
t1 and t2 are irrelevant. all youre interested in is temp which is 20.12 fixed point degrees in celsius


okay...
And how should I write it in the code??
Please just give me the code then I will understand it.


Wed Nov 10, 2010 9:03 pm
Profile

Joined: Wed Mar 31, 2010 6:05 pm
Posts: 212
float celsius = temp/4096.0f;

do yourself a favor and re-evaluate your choice of hobbies.


Wed Nov 10, 2010 11:07 pm
Profile

Joined: Mon Sep 27, 2010 5:26 pm
Posts: 85
okay...
thanks


Thu Nov 11, 2010 4:33 pm
Profile

Joined: Mon Sep 27, 2010 5:26 pm
Posts: 85
I didnt understand it.


Sun Nov 14, 2010 3:18 pm
Profile

Joined: Sat Jun 12, 2010 3:31 am
Posts: 23
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


Wed Nov 24, 2010 2:18 am
Profile

Joined: Thu Jul 02, 2009 1:19 pm
Posts: 325
Jordan_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

the answer is in the thread - wow indeed :)


Wed Nov 24, 2010 5:22 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 47 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Who is online

Users browsing this forum: Bing [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
  Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.
Get devkitPro at SourceForge.net. Fast, secure and Free Open Source software downloads