temperature

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: temperature

Post by elhobbs » Fri Dec 17, 2010 9:07 pm

Sepreath wrote:[all of this assumed you are using unsigned ints]
I personnaly use signed rather than unsigned types for fixed point - which I believe is more common. though it is certainly possible to use unsigned.

Jordan_Gray
Posts: 23
Joined: Sat Jun 12, 2010 3:31 am

Re: temperature

Post by Jordan_Gray » Sat Dec 18, 2010 2:04 pm

vuurrobin wrote:as for the temperature itself: the temperature registers can only be read from the arm7 processor while you normally program just for the arm9 and use a default arm7 binary. so you would have to write a custom arm7 binary to read the temperature, use the fifo (which, in the context of libnds, is the mechanism that libnds uses for arm7<->arm9 communication) to send the temperature to the arm9 and print it from there. creating custom arm7 code and processor communication isn't exactly beginners stuff.
Wow, thanks for explaining all that. Zeromus just assumes that everybody knows what a fifo is and how to use one. Thanks again for explaining that!

I was going to try and read the temperature at some point in my first-ever program, but I guess I won't be learning that stuff for a long while.

- Stryker AKA Jordan

zeromus
Posts: 212
Joined: Wed Mar 31, 2010 6:05 pm

Re: temperature

Post by zeromus » Sat Dec 18, 2010 9:13 pm

the temperature registers can only be read from the arm7 processor
could be discovered by pasting the code from the arm7 example i provided into the arm9 and observing that it doesnt work; or reflecting that such a roundabout way wouldnt be chosen to read the temperature if it weren't needed
while you normally program just for the arm9
could be discovered by comparing all the libnds examples to the arm9 and arm7 programs in the example i provided and recognizing that they share more in common with the arm9
and use a default arm7 binary
could have observed the critical functions performed by the arm7 example program i provided and deduced that similar functions must be going on behind the scenes if you hadnt overridden them.
so you would have to write a custom arm7 binary to read the temperature
i did that in my example of reading the temperature so it should be no surprise
use the fifo (which, in the context of libnds, is the mechanism that libnds uses for arm7<->arm9 communication), to send the temperature to the arm9 and print it from there.
i doubt you even looked at the code solution I provided, but if you had, you would see that large regions of code on both programs are full of nothing but things involving temperature, the word FIFO, and 'send' and 'receive'
creating custom arm7 code and processor communication isn't exactly beginners stuff.
but copying and pasting it is

so tell me again, what did I assume? nothing more than that you would spend as long contemplating the example I provided as I did providing it. but your web browser is broken so you give up and expect other folks to double and treble the wasted time by explaining what was already succinctly explained by the example? Youve also wanted us not to use "vocabulary" of amazing words like GLUT and SDL without providing some kind of in-line glossary for your convenience. grow up.

lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

Re: temperature

Post by lazyprogramer » Thu Dec 30, 2010 12:08 pm

Good news:
I started learning all C stuff that I understand more!

Jordan_Gray
Posts: 23
Joined: Sat Jun 12, 2010 3:31 am

Re: temperature

Post by Jordan_Gray » Mon Jan 10, 2011 11:12 pm

That's great!

lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

Re: temperature

Post by lazyprogramer » Tue Jan 11, 2011 2:10 pm

...Yes! And I understand the code better now :)

lazyprogramer
Posts: 85
Joined: Mon Sep 27, 2010 5:26 pm

Re: temperature

Post by lazyprogramer » Fri Feb 11, 2011 2:42 pm

I started learning libnds now, because I finshed C and C++ learning and I wrote the code which prints the temperature in °C!
it was simple -Sorry for stupid asking :?

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests