<?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=47&amp;t=4373&amp;mode" />

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2015-11-06T12:23:03+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=47&amp;t=4373&amp;mode</id>
<entry>
<author><name><![CDATA[bss34]]></name></author>
<updated>2013-10-06T15:50:20+01:00</updated>
<published>2013-10-06T15:50:20+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=52130#p52130</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=52130#p52130"/>
<title type="html"><![CDATA[Re: problem z Serial.read() podczas używania Ethernet.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=52130#p52130"><![CDATA[
Temat można zamknąć. Na innej płytce wszystko OK. Prawdopodobnie uszkodzony pin0 czyli RX.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=519">bss34</a> — 6 paź 2013, o 15:50</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xor]]></name></author>
<updated>2015-11-06T12:23:03+01:00</updated>
<published>2013-10-04T17:39:30+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51909#p51909</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51909#p51909"/>
<title type="html"><![CDATA[Re: problem z Serial.read() podczas używania Ethernet.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51909#p51909"><![CDATA[
<span style="color: #BFFFBF">.</span><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1774">xor</a> — 4 paź 2013, o 17:39</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[bss34]]></name></author>
<updated>2013-10-04T17:01:27+01:00</updated>
<published>2013-10-04T17:01:27+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51904#p51904</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51904#p51904"/>
<title type="html"><![CDATA[Re: problem z Serial.read() podczas używania Ethernet.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51904#p51904"><![CDATA[
<div class="quotetitle">xor napisał(a):</div><div class="quotecontent"><br />Spróbuj zmienić typ inByte na int.<br /></div><br /><br /><br />zmiana typu nic nie da, w terminalu będą ciągi cyfr zamiast śmieci w ASCII. Problemem jest tu polecenie &quot;Serial.read()&quot;. Myślałem, że może ktoś miał do czynienia z przesyłaniem danych z portu szeregowego w ethernet i spotkał się ze śmieceniem. W drugą stronę tzn. z przesyłaniem danych z ethernetu do portu szeregowego problemów nie ma.<br /><br />pozdr<br />Bart<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=519">bss34</a> — 4 paź 2013, o 17:01</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[xor]]></name></author>
<updated>2015-11-06T12:22:41+01:00</updated>
<published>2013-10-04T15:59:22+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51900#p51900</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51900#p51900"/>
<title type="html"><![CDATA[Re: problem z Serial.read() podczas używania Ethernet.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51900#p51900"><![CDATA[
<span style="color: #BFFFBF">.</span><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1774">xor</a> — 4 paź 2013, o 15:59</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[bss34]]></name></author>
<updated>2013-10-04T14:44:10+01:00</updated>
<published>2013-10-04T14:44:10+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51896#p51896</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51896#p51896"/>
<title type="html"><![CDATA[problem z Serial.read() podczas używania Ethernet.]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=4373&amp;p=51896#p51896"><![CDATA[
Witam!<br /><br />W jednym z dostępnych przykładów w środowisku arduino znajduje się &quot;ChatServer&quot;. Przykład działa prawidłowo, tekst wpisany z terminala via telnet idzie do arduino. Z tamtąd komendami wraca ten sam tekst do terminala jak też jest wysyłany na serial. Po dopisaniu kawałka kodu dotyczącego odczytu z seriala zaczyna się problem. Nie działa prawidłowe wysyłanie &quot;thisChar&quot; i &quot;inByte&quot;. W terminalu wypisywane są same śmieci. Czy ktoś potrafi tak zmodyfikować podany poniżej przykład aby działała komunikacja ethernet&lt;&gt;serial jak i serial&lt;&gt;ethernet?<br /><br />[syntax=cpp]#include &lt;SPI.h&gt;<br />#include &lt;Ethernet.h&gt;<br /><br />byte mac&#91;&#93; = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };<br />IPAddress ip(192,168,1, 20);<br />IPAddress gateway(192,168,1, 1);<br />IPAddress subnet(255, 255, 0, 0);<br />EthernetServer server(23);<br />boolean alreadyConnected = false; // whether or not the client was connected previously<br /><br />void setup() {<br />  // initialize the ethernet device<br />  Ethernet.begin(mac, ip);<br />  // start listening for clients<br />  server.begin();<br /> // Open serial communications and wait for port to open:<br />  Serial.begin(9600);<br />   while (!Serial) {<br />    ; // wait for serial port to connect. Needed for Leonardo only<br />  }<br />  Serial.print(&quot;Chat server address:&quot;);<br />  Serial.println(Ethernet.localIP());<br />}<br /><br />void loop() {<br />  // wait for a new client:<br />  EthernetClient client = server.available();<br /><br />  // when the client sends the first byte, say hello:<br />  if (client) {<br />    if (!alreadyConnected) {<br />      // clead out the input buffer:<br />      client.flush();    <br />      Serial.println(&quot;We have a new client&quot;);<br />      client.println(&quot;Hello, client!&quot;); <br />      alreadyConnected = true;<br />    } <br /><br />    if (client.available() &gt; 0) {<br />      // read the bytes incoming from the client:<br />      char thisChar = client.read();<br />      // echo the bytes back to the client:<br />      server.write(thisChar);<br />      // echo the bytes to the server as well:<br />     Serial.write(thisChar);<br />    }<br />    //--------------------------------------dopisany kawałek-----------<br />if (Serial.available())<br /> {<br /> delay(10);<br /> char inByte;<br /> inByte = Serial.read();<br /> Serial.print(inByte);<br /> }<br /> <br />  }<br />}[/syntax]<br /><br />pozdr<br />Bart<br /><br /><br /><strong><span style="color: #FF0000">Kody umieszczamy w znacznikach SYNTAX  -- Poprawilem  ----&gt; SunRiver</span></strong><p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=519">bss34</a> — 4 paź 2013, o 14:44</p><hr />
]]></content>
</entry>
</feed>