Page 5 of 5

Re: temperature

Posted: Fri Dec 17, 2010 9:07 pm
by elhobbs
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.

Re: temperature

Posted: Sat Dec 18, 2010 2:04 pm
by Jordan_Gray
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

Re: temperature

Posted: Sat Dec 18, 2010 9:13 pm
by zeromus
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.

Re: temperature

Posted: Thu Dec 30, 2010 12:08 pm
by lazyprogramer
Good news:
I started learning all C stuff that I understand more!

Re: temperature

Posted: Mon Jan 10, 2011 11:12 pm
by Jordan_Gray
That's great!

Re: temperature

Posted: Tue Jan 11, 2011 2:10 pm
by lazyprogramer
...Yes! And I understand the code better now :)

Re: temperature

Posted: Fri Feb 11, 2011 2:42 pm
by lazyprogramer
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 :?