<div dir="ltr"><div>Cílová proměnná byla typu long int .  </div><div>Na pravou stranu výrazu jsem zkoušel psát (long) i (long int) , ale nepomohlo to .  Fungovalo to, ale ty warningy mě štvaly. </div><div>Inspiroval jsem se tady : </div><div><br></div><div><a href="https://forum.arduino.cc/t/how-to-convert-4-bytes-into-a-long/70425/9">https://forum.arduino.cc/t/how-to-convert-4-bytes-into-a-long/70425/9</a></div><div><br></div><div>z tohoto příkladu : </div><div><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">  adc_value += (</span><span class="gmail-hljs-type" style="font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">long</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">)d[</span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">0</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">] << </span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">24</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">;</span></div><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">  adc_value += (</span><span class="gmail-hljs-type" style="font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">long</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">)d[</span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">1</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">] << </span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">16</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">;
  adc_value += (</span><span class="gmail-hljs-type" style="font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">long</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">)d[</span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">2</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">] << </span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">8</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">; </span><div><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">  adc_value += (</span><span class="gmail-hljs-type" style="font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">long</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">)d[</span><span class="gmail-hljs-number" style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre">3</span><span style="color:rgb(67,67,67);font-family:ui-monospace,"Cascadia Mono","Segoe UI Mono","Liberation Mono",Menlo,Monaco,Consolas,monospace;font-size:14px;white-space:pre;background-color:rgb(248,248,248)">];</span> </div><div><br></div><div>ale warningy tam byly pořád. </div><div><br></div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Zdravi<br>Jirka Sloupenský  OK1MWW</div></div><br></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">st 18. 12. 2024 v 9:34 odesílatel Jindrich Fucik <<a href="mailto:FULDA@seznam.cz">FULDA@seznam.cz</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">... a vědělo to, že má vzniknout něco většího než bajt?<br>
<br>
---------- Původní e-mail ----------<br>
Od: Jirka Mww <<a href="mailto:jirka.mww@gmail.com" target="_blank">jirka.mww@gmail.com</a>><br>
Komu: HW-news <<a href="mailto:hw-list@list.hw.cz" target="_blank">hw-list@list.hw.cz</a>><br>
Datum: 18. 12. 2024 9:04:13<br>
Předmět: Re: Arduino - 32 bitu promenna ze 4 byte<br>
<br>
Uloženo to nemám, ale psalo to něco jako  že posouvat 8 bitové hodnoty o 24 nebo 16 bitů se nemá . <br>
<br>
Zdravi<br>
Jirka Sloupenský  OK1MWW<br>
_______________________________________________<br>
HW-list mailing list  -  sponsored by <a href="http://www.HW.cz" rel="noreferrer" target="_blank">www.HW.cz</a><br>
<a href="mailto:Hw-list@list.hw.cz" target="_blank">Hw-list@list.hw.cz</a><br>
<a href="http://list.hw.cz/mailman/listinfo/hw-list" rel="noreferrer" target="_blank">http://list.hw.cz/mailman/listinfo/hw-list</a><br>
</blockquote></div>