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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2017-09-27T17:58:52+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=30&amp;t=19272&amp;mode</id>
<entry>
<author><name><![CDATA[Kuba323]]></name></author>
<updated>2017-09-27T17:58:52+01:00</updated>
<published>2017-09-27T17:58:52+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195898#p195898</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195898#p195898"/>
<title type="html"><![CDATA[Re: Stacja meteo]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195898#p195898"><![CDATA[
No właśnie po wyświetleniu pierwszych danych &quot;kursor&quot; ustawiam przed danymi.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=17740">Kuba323</a> — 27 wrz 2017, o 17:58</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[majster]]></name></author>
<updated>2017-09-27T17:35:17+01:00</updated>
<published>2017-09-27T17:35:17+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195896#p195896</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195896#p195896"/>
<title type="html"><![CDATA[Re: Stacja meteo]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195896#p195896"><![CDATA[
A po wyświetleniu pierwszych danych ustawiasz &quot;kursor&quot; przed danymi czy dajesz komendę nowej linii ?<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1628">majster</a> — 27 wrz 2017, o 17:35</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Kuba323]]></name></author>
<updated>2017-09-27T14:07:25+01:00</updated>
<published>2017-09-27T14:07:25+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195892#p195892</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195892#p195892"/>
<title type="html"><![CDATA[Re: Stacja meteo]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195892#p195892"><![CDATA[
Tak jest to arduino, a tu lepsza jakość filmu<br /><a href="https://www.youtube.com/watch?v=fXOY-WuHRoc"  class="postlink">https://www.youtube.com/watch?v=fXOY-WuHRoc</a><br />A z wyświetlaczem mam to, że dane pokazuje jak w Serial monitorze mimo, że w kodzie mam zapisane w których miejscach ma mi wyświetlać  i nie wiem jak zrobić żeby mi normalnie wyświetlało dane<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=17740">Kuba323</a> — 27 wrz 2017, o 14:07</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[skalarro]]></name></author>
<updated>2017-09-26T17:42:20+01:00</updated>
<published>2017-09-26T17:42:20+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195876#p195876</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195876#p195876"/>
<title type="html"><![CDATA[Re: Stacja meteo]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195876#p195876"><![CDATA[
Wiesz co? Co Ty masz z tym wyświetlaczem?? Popsuty? Zrób jakoś bardziej czytelnie typu czarne tło i białe litery czy jakoś tak. Na razie to jest mega nieczytelne. Nie wiem jak na komputerze ale na telefonie nic nie widać. Szare napisy na szarym...<br />Zrób na dobry początek:<br />tft.fillScreen(BLACK);<br />tft.setTextColor(WHITE);  <br /><br />to jest w arduino??<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=4850">skalarro</a> — 26 wrz 2017, o 17:42</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Kuba323]]></name></author>
<updated>2017-09-26T16:27:05+01:00</updated>
<published>2017-09-26T16:27:05+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195869#p195869</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195869#p195869"/>
<title type="html"><![CDATA[Stacja meteo]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19272&amp;p=195869#p195869"><![CDATA[
Witam <br />Mówiąc konkretnie mam problem z uporządkowaniem danych wysyłanych do mojego wyświetlacza.<br />Kod nadajnika[syntax=cpp]#include &lt;VirtualWire.h&gt;<br />#include &lt;DallasTemperature.h&gt;<br />#include &lt;OneWire.h&gt;<br />#include &lt;DHT.h&gt;<br />#include &lt;SoftwareSerial.h&gt;<br />SoftwareSerial radio(4, 5);<br />DHT dht;<br />OneWire oneWire(A4); <br />DallasTemperature sensors(&amp;oneWire);<br />String hum;<br />String temp;<br />String tempe;<br />void setup() {<br />  radio.begin(9600);<br />Serial.begin(9600);<br />  dht.setup(A5);<br /> sensors.begin();<br /><br />}<br /><br />void loop() {<br />   sensors.requestTemperatures();   <br /> int a = (sensors.getTempCByIndex(0));<br />int b = dht.getTemperature();<br />int c = dht.getHumidity();<br />String temp1 = temp + a;<br />String tempe1 = temp + b;<br />String hum1 = hum + c;<br />radio.println(temp1);<br />radio.println(tempe1);<br />radio.println(hum1);<br /><br />  delay(4000);<br />}[/syntax]<br />Kod odbiornika:<br />[syntax=cpp]#include &lt;DS3231.h&gt;<br />#include &lt;SPFD5408_Adafruit_GFX.h&gt;<br />#include &lt;SPFD5408_Adafruit_TFTLCD.h&gt; <br />#include &lt;SPFD5408_TouchScreen.h&gt;<br />#include &lt;SoftwareSerial.h&gt;<br />SoftwareSerial radio(10, 11);<br />DS3231 clock;<br />RTCDateTime dt;<br /><br />#define LCD_CS A3<br />#define LCD_CD A2<br />#define LCD_WR A1<br />#define LCD_RD A0<br />#define LCD_RT A4<br /><br />#define Lekkoczarny 0x31A6<br />#define BLACK   0x0000<br />#define BLUE    0x001F<br />#define RED     0xF800<br />#define GREEN   0x07E0<br />#define CYAN    0x07FF<br />#define MAGENTA 0xF81F<br />#define YELLOW  0xFFE0<br />#define WHITE   0xFFFF<br />#define Orange  0xFD20      <br />#define GreenYellow 0xAFE5<br />#define Navy     0x000F      <br />#define DarkGreen   0x03E0     <br />#define DarkCyan  0x03EF    <br />#define Maroon   0x7800    <br />#define Purple  0x780F     <br />#define Olive  0x7BE0      <br />#define LightGrey  0xC618      <br />#define DarkGrey  0x7BEF<br />#define LightBlue 0x879F<br /><br />#define TS_MINX 100<br />#define TS_MINY 100<br />#define TS_MAXX 1000<br />#define TS_MAXY 1000<br /><br /><br />Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RT); <br /><br />#define YP A2<br />#define XM A3 <br />#define YM 8  <br />#define XP 9<br /><br />#define MINPRESSURE 200<br />#define MAXPRESSURE 350<br /><br />TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);<br />unsigned long currentMillis;<br />unsigned long previousMillis = 0;    <br />unsigned long interval = 60000;       <br />char page;<br />String hum1;<br />String tempe1;<br />String temp1;<br />void setup() {<br />tft.reset();<br />tft.begin(0x9341);<br />page = 0;<br />Serial.begin(9600);<br />radio.begin(9600);<br /> Serial.println(&quot;Initialize DS3231&quot;);<br /><br />      clock.begin();<br />      <br />  clock.setDateTime(__DATE__, __TIME__);<br /> tft.setRotation(0);<br />   <br />}<br />void loop() {<br />dotyk();<br />  unsigned long currentMillis = millis();<br /> if(currentMillis - previousMillis &gt; interval){<br />    previousMillis = currentMillis;<br />  dt = clock.getDateTime();<br />ekranstartowy();<br /> }<br />} <br /><br /><br /><br />void dotyk () {<br />   digitalWrite(13, HIGH);<br />TSPoint p = ts.getPoint();<br />digitalWrite(13, LOW);<br /> pinMode(XM, OUTPUT);<br />    pinMode(YP, OUTPUT);<br /> if (p.z &gt; MINPRESSURE &amp;&amp; p.z &lt; MAXPRESSURE){<br /> p.x = map(p.x, TS_MAXX, TS_MINX, 240, 0);<br />   p.y = map(p.y, TS_MAXY, TS_MINY,320, 0);<br /> if (page == 0) {       <br />   if(p.x&gt;120 &amp;&amp; p.x&lt;150 &amp;&amp; p.y&gt;50 &amp;&amp; p.y&lt;300){      <br />   <br />drawpg ();<br />  page = 1;   <br />}    <br />if(p.x&gt;150 &amp;&amp; p.x&lt;200 &amp;&amp; p.y&gt;50 &amp;&amp; p.y&lt;300){        <br /><br />drawtemp ();<br /> page = 2;<br />  }<br />}<br /> <br />else  if (page == 1) {   <br />if(p.x&gt;50 &amp;&amp; p.x&lt;100 &amp;&amp; p.y&gt;50 &amp;&amp; p.y&lt;300){       <br />   <br />ekranstartowy(); <br />  page = 0; <br /> }<br />}<br />else if (page == 2) {  <br />if(p.x&gt;50 &amp;&amp; p.x&lt;100 &amp;&amp; p.y&gt;50 &amp;&amp; p.y&lt;300);    <br />ekranstartowy(); <br />page = 0;<br />}<br />}<br />}<br /><br /><br /><br />void ekranstartowy (){<br />tft.fillScreen(Lekkoczarny);<br />tft.setTextSize(2);<br />tft.setTextColor(LightBlue);<br />tft.setCursor(30,10);<br />tft.print(clock.dateFormat(&quot;d F Y &quot;,  dt));<br />tft.setTextSize(4);<br />tft.setCursor(60,40);<br />tft.print(clock.dateFormat(&quot;H:i&quot;,dt));<br />tft.setTextSize(4);<br />tft.setCursor(45,90);<br />tft.print(clock.readTemperature()); <br />tft.drawCircle(170, 93, 4, LightBlue);<br />tft.setCursor(180,90);<br />tft.println(&quot;C&quot;);<br />tft.fillRect(10,150, 220, 70, DarkGrey);<br />tft.setTextSize(3);<br />tft.setTextColor(LightBlue);<br />tft.setCursor(20,160);<br />tft.print(&quot;Pogoda na &quot;);<br />tft.setCursor(20, 190);<br />tft.print(&quot;polu&quot;);<br />tft.fillRect(10,230, 220, 70, DarkGrey);<br />tft.setTextSize(3);<br />tft.setTextColor(LightBlue);<br />tft.setCursor(20,240);<br />tft.print(&quot;Temperatura&quot;);<br />tft.setCursor(20, 270);<br />tft.print(&quot;na piecu&quot;);<br /><br />}<br />void drawpg () {      <br />if(radio.available()){<br />   String tempe1 = radio.readString();<br />   String hum1 = radio.readString();<br />tft.fillScreen(Lekkoczarny);<br />tft.setTextSize(3);<br />tft.fillRect(10,20,220,80, DarkGrey);<br />tft.setTextColor(LightBlue);<br />tft.setCursor(80,50);<br />tft.print(&quot;&lt;-&quot;);<br />tft.setTextColor (LightBlue);<br />tft.setCursor(10, 210);<br />tft.print(&quot;Wilgotnosc:&quot;);<br />tft.setCursor(10, 240);<br />tft.print(hum1);<br />tft.println(&quot;%&quot;);<br />tft.setTextColor(LightBlue);<br />tft.setCursor(10,120);<br />tft.print(&quot;Temperatura:&quot;);<br />tft.setCursor(10, 150);<br />tft.print(tempe1);<br />tft.drawCircle(50, 152, 4, LightBlue);<br />tft.setCursor(58, 150);<br />tft.print(&quot;C&quot;);<br />} <br />}<br /><br />void drawtemp (){<br /> if(radio.available()){<br />String temp1 = radio.readString();<br />tft.fillScreen(Lekkoczarny);<br />tft.setTextColor(LightBlue);<br />tft.setTextSize(3);<br />tft.setCursor(10,150);<br />tft.print(&quot;Temperatura:&quot;);<br />tft.setCursor(10, 180);<br />tft.print(temp1);<br />tft.drawCircle(123, 180, 4, LightBlue);<br />tft.setCursor(130, 180);<br />tft.print(&quot;C&quot;);<br />tft.fillRect(10,20,220,80, LightGrey);<br />tft.setTextColor(LightBlue);<br />tft.setCursor(80,50);<br />tft.print(&quot;&lt;-&quot;);<br />  }  <br />}[/syntax]<br />dzieje się tak jak na filmiku:<br /><a href="https://www.youtube.com/channel/UC8Tkeb64QnKSr1XT2egaMfg?view_as=subscriber"  class="postlink">https://www.youtube.com/channel/UC8Tkeb64QnKSr1XT2egaMfg?view_as=subscriber</a><br />Chciałbym, żeby temperatura wyświetlała się tam gdzie ma być temperatura, a wilgotność tam gdzie wilgotność tylko nie wiem jak rozdzielić dane, ponieważ programowanie nie jest moją mocną stroną. Z góry dziękuje za pomoc.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=17740">Kuba323</a> — 26 wrz 2017, o 16:27</p><hr />
]]></content>
</entry>
</feed>