<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl-pl">
<link rel="self" type="application/atom+xml" href="https://forum.atnel.pl/feed.php?f=8&amp;t=10183&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-01-15T01:46:58+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=8&amp;t=10183&amp;mode</id>
<entry>
<author><name><![CDATA[radmistrz2]]></name></author>
<updated>2015-01-15T01:46:58+01:00</updated>
<published>2015-01-15T01:46:58+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10183&amp;p=114195#p114195</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10183&amp;p=114195#p114195"/>
<title type="html"><![CDATA[Re: Magnetometr HMC5883L zwraca dziwne wartości]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10183&amp;p=114195#p114195"><![CDATA[
czy ktoś mógłby podzielić się swoim kodem dla tego magnetometru?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=5544">radmistrz2</a> — 15 sty 2015, o 01:46</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[radmistrz2]]></name></author>
<updated>2015-01-12T19:54:29+01:00</updated>
<published>2015-01-12T19:54:29+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=10183&amp;p=113910#p113910</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=10183&amp;p=113910#p113910"/>
<title type="html"><![CDATA[Magnetometr HMC5883L zwraca dziwne wartości]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=10183&amp;p=113910#p113910"><![CDATA[
Witam. Próbuję zrobić prosty kompas - mam moduł HMC5883L dokładnie w tej obudowie <!-- m --><a class="postlink" href="http://allegro.pl/hmc5883l-kompas-cyfrowy-3-osiowy-iic-i2c-gy-271-i4971467456.html" >http://allegro.pl/hmc5883l-kompas-cyfro ... 67456.html</a><!-- m --> . Niestety dostaję wartości oderwane od rzeczywistości. Kiedy ustawię go na północ, to wartości bardzo szybko się zmieniają i dają wartość ok 270, ale kiedy obrócę go o 180 stopni, to niestety wyniki są w granicach 250-260. Korzystam z biblioteki <!-- m --><a class="postlink" href="http://davidegironi.blogspot.com/2013/01/avr-atmega-hmc5883l-magnetometer-lib-01.html" >http://davidegironi.blogspot.com/2013/0 ... ib-01.html</a><!-- m --><br /><br /><br />Oto kod odpowiedzialny za pobieranie danych:<br /><br />[syntax=c]hmc5883l_getrawdata(&amp;mxraw, &amp;myraw, &amp;mzraw);<br />hmc5883l_getdata(&amp;mx, &amp;my, &amp;mz);<br />float heading = 0;<br />heading = atan2((double)myraw,(double)mxraw)*57.29578;<br />LCD_GoTo(0, 1);<br />if(heading &lt; 0) heading = 360 + heading;<br />itoa(mxraw, itmp, 10);<br />itoa(myraw, itmp, 10);<br />itoa(mzraw, itmp, 10);<br />dtostrf(mx, 3, 5, itmp);<br />dtostrf(my, 3, 5, itmp);<br />dtostrf(mz, 3, 5, itmp); <br />dtostrf(heading, 3, 5, itmp);[/syntax]<br /><br />Magnetometr jest raczej nie jest przechylony, próbowałem obrócić go do góry nogami i dalej to samo.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=5544">radmistrz2</a> — 12 sty 2015, o 19:54</p><hr />
]]></content>
</entry>
</feed>