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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2018-01-15T21:45:20+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=47&amp;t=19533&amp;mode</id>
<entry>
<author><name><![CDATA[jacabe]]></name></author>
<updated>2018-01-15T21:45:20+01:00</updated>
<published>2018-01-15T21:45:20+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19533&amp;p=202096#p202096</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19533&amp;p=202096#p202096"/>
<title type="html"><![CDATA[Re: biblioteka arduino. Problem]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19533&amp;p=202096#p202096"><![CDATA[
biblioteka jest i dziala  <img src="https://forum.atnel.pl/images/smilies/icon_e_biggrin.gif" alt=":D" title="Bardzo szczęśliwy" /> prosze o konstruktywna krytyke i podpowiedzi jak ulepszyc <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> <br /><br />Sevenseg.h<br /><br />[syntax=cpp]#ifndef _Sevenseg_H<br />#define _Sevenseg_H<br /><br />#include &lt;TFTLCD.h&gt;<br /><br />#define NoDecimal       0<br />#define Decimal         1<br />#define NoColon         0<br />#define Colon           1<br /><br />#define ON  1<br />#define OFF 0<br /><br />#define pusty 10<br />#define BRAK 0xFFF1<br /><br />#define seg_a (1&lt;&lt;0)<br />#define seg_b (1&lt;&lt;1)<br />#define seg_c (1&lt;&lt;2)<br />#define seg_d (1&lt;&lt;3)<br />#define seg_e (1&lt;&lt;4)<br />#define seg_f (1&lt;&lt;5)<br />#define seg_g (1&lt;&lt;6)<br />#define seg_dp (1&lt;&lt;7)<br /><br /><br /><br /><br />const PROGMEM uint8_t znaki&#91;&#93;  = {<br /><br />  ~(seg_a | seg_b | seg_c | seg_d | seg_e | seg_f),                     //&quot;0&quot;<br />  ~(seg_b | seg_c),                                                     //&quot;1&quot;<br />  ~(seg_a | seg_b | seg_d | seg_e | seg_g),                             //&quot;2&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_g),                             //&quot;3&quot;<br />  ~(seg_b | seg_c | seg_f | seg_g),                                     //&quot;4&quot;<br />  ~(seg_a | seg_c | seg_d | seg_f | seg_g),                             //&quot;5&quot;<br />  ~(seg_a | seg_c | seg_d | seg_e | seg_f | seg_g),                     //&quot;6&quot;<br />  ~(seg_a | seg_b | seg_c),                                             //&quot;7&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g),             //&quot;8&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_f | seg_g),                             //&quot;9&quot;<br />  (seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g | seg_dp),    //pusty<br />  ~(seg_g),                                                             //&quot;-&quot;<br />  ~(seg_a | seg_b | seg_f | seg_g),                                     //stopien<br />  ~(seg_a | seg_d | seg_e | seg_f),                                     //C<br />};<br /><br /><br />class Sevenseg <br />{<br /><br />public:<br /><br /><br />Sevenseg(TFTLCD *out, uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2);<br />/* <br />- output<br />- upper left corner coordinates x<br />- upper left corner coordinates y<br />- size of display 7seg<br />- count of digits<br />- decimal point of digit on/off_type<br />- colon after 2nd digit on/off_type<br />- color display on<br />- color display off<br />*/<br /><br />//~Sevenseg();<br /><br />void drawsign(uint8_t x, uint8_t y, uint8_t data, uint16_t col1, uint16_t col2);<br />void drawsegment(uint16_t x, uint16_t y, uint8_t number, uint16_t color);<br />void display(int data, uint8_t pos, bool firstzero, uint8_t zeros, uint16_t c1, uint16_t c2);<br />void display(uint8_t data, uint8_t pos, bool firstzero, uint16_t c1);<br />void display_sign(uint8_t data, uint8_t pos, uint16_t c1);<br />void decimal_onof(uint8_t pos, bool onof, uint16_t c1);<br />void colon_onof(bool onof, uint16_t c1);<br /><br /><br />private:<br /><br />  TFTLCD *output;<br />  uint16_t x;<br />  uint16_t y;<br />  uint8_t sizeofdisp;<br />  uint8_t dispcount;<br />  uint16_t coloron;<br />  uint16_t colorof;<br />  bool decimal;<br />  bool colon;<br />  <br />};<br />#endif // _Sevenseg_H[/syntax]<br /><br />Sevenseg.cpp<br /><br />[syntax=cpp]#include &lt;avr/pgmspace.h&gt;<br />#include &lt;Arduino.h&gt;<br />#include &lt;avr/io.h&gt;<br />#include&quot;sevenseg.h&quot;<br /><br /><br /><br />Sevenseg::Sevenseg(TFTLCD *out, uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2){<br /><br />x =            sx;<br />y =            sy;<br />sizeofdisp =   sod;<br />dispcount =    dc;<br />decimal =      dec;<br />colon =        col;<br />coloron =      c1;<br />colorof =      c2;<br />output =       out; <br /><br />}<br /><br /> <br />void Sevenseg::drawsign(uint8_t x, uint8_t y, uint8_t data, uint16_t col1, uint16_t col2) {<br /><br />  uint16_t color;<br />  const uint8_t hsegmh   = 11 * sizeofdisp;<br />  const uint8_t hsegmv   = 8 * sizeofdisp;<br />  const uint8_t wsegm   = 2 * sizeofdisp;<br />  const uint8_t margin  = 4 * sizeofdisp;<br />  const uint8_t space   = 1 * sizeofdisp;<br />  const uint8_t segmenth = (2 * wsegm) + hsegmh;<br />  const uint8_t segmentv = (2 * wsegm) + hsegmv;<br />  uint8_t px1 = x + margin;<br />  uint8_t py1 = y + margin;<br />  uint8_t py2 = y + margin + wsegm;<br />  <br />  <br />  for ( uint8_t a = 1; a &lt; 8; a++) {<br />    if (!(data &amp; 0x01)) color = col1;<br />    else color = col2;<br /><br /><br />    switch (a) {<br /><br />      case 1:<br />        output-&gt;fillTriangl(px1, py1, px1 + segmenth, py1, px1 + segmenth - wsegm, py2, color);<br />        output-&gt;fillTriangl(px1 + segmenth - wsegm, py2, px1 + wsegm, py2, px1, py1, color);<br />        break;<br /><br />      case 2:<br />        output-&gt;fillTriangl(px1 + segmenth, py1 + space, px1 + segmenth - wsegm, py1 + space + wsegm, px1 + segmenth - wsegm - space, py1 + space + segmentv - wsegm, color);<br />        output-&gt;fillTriangl(px1 + segmenth - wsegm - space, py1 + space + segmentv - wsegm, px1 + segmenth - space, py1 + space + segmentv, px1 + segmenth, py1 + space, color);<br />        break;<br /><br />      case 3:<br />        output-&gt;fillTriangl(px1 + segmenth - space, py1 + (space * 2) + segmentv, px1 + segmenth - (space * 2), py1 + (space * 2) + (segmentv * 2), px1 + segmenth - wsegm - (space * 2), py1 + (space * 2) + (segmentv * 2) - wsegm, color);<br />        output-&gt;fillTriangl(px1 + segmenth - wsegm - (space * 2), py1 + (space * 2) + (segmentv * 2) - wsegm, px1 + segmenth - wsegm - space, py1 + (space * 2) + segmentv + wsegm, px1 + segmenth - space, py1 + (space * 2) + segmentv, color);<br />        break;<br /><br />      case 4:<br />        output-&gt;fillTriangl(px1 + segmenth - (space * 2), py1 + (space * 3) + (segmentv * 2), px1 - wsegm,  py1 + (space * 3) + (segmentv * 2), px1,  py1 + (space * 3) + (segmentv * 2) - wsegm,  color);<br />        output-&gt;fillTriangl(px1,  py1 + (space * 3) + (segmentv * 2) - wsegm, px1 + segmenth - wsegm - (space * 2),  py1 + (space * 3) + (segmentv * 2) - wsegm, px1 + segmenth - (space * 2), py1 + (space * 3) + (segmentv * 2), color);<br />        break;<br /><br />      case 5:<br />        output-&gt;fillTriangl(px1 - wsegm, py1 + (space * 2) + (segmentv * 2), px1 - wsegm + space, py1 + (space * 2) + segmentv, px1 + space, py1 + (space * 2) + segmentv + (wsegm / 2), color);<br />        output-&gt;fillTriangl(px1 - wsegm, py1 + (space * 2) + (segmentv * 2), px1, py1 + (space * 2) + (segmentv * 2) - wsegm, px1 + space, py1 + (space * 2) + segmentv + (wsegm / 2), color);<br />        break;<br /><br />      case 6:<br />        output-&gt;fillTriangl(px1 - wsegm + space, py1 + (space * 1) + segmentv, px1, py1 + space, px1 + wsegm, py2 + space, color);<br />        output-&gt;fillTriangl(px1 + wsegm, py2 + space, px1 + wsegm - space, py1 + (space * 1) + segmentv - (wsegm / 2), px1 - wsegm + space, py1 + (space * 1) + segmentv, color);<br />        break;<br /><br />      case 7:<br />        output-&gt;fillTriangl(px1 - wsegm + (space * 2), py1 + (space * 1) + 1 + segmentv, px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 + (wsegm / 2) + space,  py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />        output-&gt;fillTriangl(px1 - wsegm + segmenth, py1 + (space * 1) + 1 + segmentv, px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2),  py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />        output-&gt;fillTriangl(px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />        output-&gt;fillTriangl(px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv + (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv + (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), color);<br />        break;<br /><br />     <br /><br />    }<br />    data &gt;&gt;= 1;<br />  }<br />}<br /><br /> <br /><br /> void Sevenseg::drawsegment(uint16_t x, uint16_t y, uint8_t number, uint16_t color){<br /><br />  const uint8_t hsegmh   = 11 * sizeofdisp;<br />  const uint8_t hsegmv   = 8 * sizeofdisp;<br />  const uint8_t wsegm   = 2 * sizeofdisp;<br />  const uint8_t margin  = 4 * sizeofdisp;<br />  const uint8_t space   = 1 * sizeofdisp;<br />  const uint8_t segmenth = (2 * wsegm) + hsegmh;<br />  const uint8_t segmentv = (2 * wsegm) + hsegmv;<br />  uint8_t px1 = x + margin;<br />  uint8_t py1 = y + margin;<br /><br />  switch (number) {<br /><br />    case 8:<br />      output-&gt;fillCircle(px1 + segmenth + (space * 2),  py1 + (space * 3) + (segmentv * 2), wsegm / 2, color);<br />      break;<br /><br />    case 9:<br />      output-&gt;fillCircle(px1 + segmenth + (space * 3),  py1 + (space * 3) + segmentv + (segmentv / 2) - wsegm, wsegm / 2, color);<br />      output-&gt;fillCircle(px1 + segmenth + (space * 4),  py1 + (space * 3) + (segmentv / 2) + wsegm, wsegm / 2, color);<br />      break;<br /><br />  }<br />}<br /><br /><br /><br />//void Sevenseg::display(int data, uint8_t pos, bool firstzero, uint8_t zeros, uint16_t c1, uint16_t c2){<br /><br />//}<br /><br /><br /><br />void Sevenseg::display(uint8_t data, uint8_t pos, bool firstzero, uint16_t c1){<br /><br />if (pos &gt; dispcount) return;<br />  uint8_t _x = x + ((23 * (pos - 1)) * sizeofdisp);<br />  uint8_t _y = y;<br />  uint8_t tmp;<br /><br />  if (!data &amp;&amp;  firstzero == 1) data = pusty;<br />  tmp = pgm_read_byte_near(znaki + data);<br /><br />  if (c1==0xFFF1)  drawsign(_x, _y, tmp, coloron, colorof);<br />  else drawsign(_x, _y, tmp, c1, colorof);<br />}<br /><br /><br />void Sevenseg::display_sign(uint8_t data, uint8_t pos, uint16_t c1){<br /><br />  uint8_t _x = x + ((23 * (pos - 1)) * sizeofdisp);<br />  uint8_t _y = y;<br /><br />    if (c1==0xFFF1)  drawsign(_x, _y, data, coloron, colorof);<br />else drawsign(_x, _y, data, c1, colorof);<br />}<br /><br /><br />void Sevenseg::decimal_onof(uint8_t pos, bool onof, uint16_t c1){<br /><br />  if (!decimal) return;<br /><br />  uint8_t _x = x + ((23 * (pos - 1)) * sizeofdisp);<br />  uint8_t _y = y;<br /> <br /><br />  if (onof){<br />  if (c1==0xFFF1) drawsegment(_x, _y, 8, coloron);<br />  else drawsegment(_x, _y, 8, c1);<br />  }<br />  <br />  else drawsegment(_x, _y, 8, colorof);<br /><br />}<br /><br /><br />void Sevenseg::colon_onof(bool onof, uint16_t c1){<br /><br />  if (!colon) return;<br /><br />  uint8_t _x = x + (23 * sizeofdisp);<br />  uint8_t _y = y;<br /> <br /><br />  if (onof){<br />  if (c1==0xFFF1) drawsegment(_x, _y, 9, coloron);<br />  else drawsegment(_x, _y, 9, c1);<br /> }<br />  <br />  else drawsegment(_x, _y, 9, colorof);<br />}[/syntax]<br /><br />w main tworzymy obiekt: Sevenseg Termo(&amp;tft, 34, 80, 3, 4, ON, OFF, RED, BACKGROUND);<br />gdzie:<br />1 - obiekt na ktorym wyswietlamy<br />2 - pozycja startowa x <br />3 - pozycja startowa y<br />4 - ilosc cyfr<br />5 - wielkosc wyswietlacza<br />6 - czy dwukropek<br />7 - czy kropki dziesietne<br />8 - kolor zalaczonego segmentu<br />9- kolor wygaszonego segmentu <br /><br />wyswietlanie cyfr: Termo.display(t1, 1, ON, BRAK);<br />gdzie:<br />1 - cyfra 0-9<br />2 - na ktorym miejscu<br />3 - czy zero ma byc wyswietlone<br />4 - kolor inny niz ustawiony<br />wyswietlanie znaku: Termo.display_sign(0b10011100, 4, BRAK);<br /> gdzie 0 w bicie odpowiada za zapalony element a 1 wygaszony<br />bity: 7 - nc, 6 - g, 5 - f, 4 - e, 3 - d, 2 - c, 1 - b, 0 - a.<br />zapalenie/zgaszenie kropki przy cyfrze: Termo.decimal_onof(2, ON, BRAK);<br />zapalenie/zgaszenie dwukropka: Termo.colon_onof(ON, BRAK);<br /><br />Prosze o uwagi.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=12296">jacabe</a> — 15 sty 2018, o 21:45</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[jacabe]]></name></author>
<updated>2017-11-05T17:03:51+01:00</updated>
<published>2017-11-04T15:17:52+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=19533&amp;p=198282#p198282</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=19533&amp;p=198282#p198282"/>
<title type="html"><![CDATA[biblioteka arduino. Problem]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=19533&amp;p=198282#p198282"><![CDATA[
Witajcie. napisalem sobie program, ktory tworzy wyswoetlacz siedmiosegmentowy na wyswietlaczu TFT. \<br /><a href="https://obrazkiforum.atnel.pl/12296/e1a4f595b7800e1a9166eb74a1a64b91.jpg"  class="postlink"><img src="https://obrazkiforum.atnel.pl/thumb/12296/e1a4f595b7800e1a9166eb74a1a64b91.jpg" alt="Obrazek" /></a><br />[syntax=cpp]#include &quot;TFTLCD.h&quot;<br />#include &lt;avr/pgmspace.h&gt;<br /><br /><br />#define LCD_CS A3<br />#define LCD_CD A2<br />#define LCD_WR A1<br />#define LCD_RD A0<br />// you can also just connect RESET to the arduino RESET pin<br />#define LCD_RESET A4<br /><br />// Color definitions<br />#defineBLACK           0x0000<br />#defineBLUE            0x001F<br />#defineRED             0xF800<br />#defineGREEN           0x07E0<br />#define CYAN            0x07FF<br />#define MAGENTA         0xF81F<br />#define YELLOW          0xFFE0<br />#define WHITE           0xFFFF<br />#define GREY            0x5AEB<br />#define DARKGREY        0x0101<br /><br />#define BACKGROUND      BLACK<br /><br />#define NoDecimal       0<br />#define Decimal         1<br />#define NoColon         0<br />#define Colon           1<br /><br />#define ON  1<br />#define OFF 0<br /><br />#define seg_a (1&lt;&lt;0)<br />#define seg_b (1&lt;&lt;1)<br />#define seg_c (1&lt;&lt;2)<br />#define seg_d (1&lt;&lt;3)<br />#define seg_e (1&lt;&lt;4)<br />#define seg_f (1&lt;&lt;5)<br />#define seg_g (1&lt;&lt;6)<br />#define seg_dp (1&lt;&lt;7)<br /><br />const PROGMEM byte znaki&#91;&#93;  = {<br /><br />  ~(seg_a | seg_b | seg_c | seg_d | seg_e | seg_f),                     //&quot;0&quot;<br />  ~(seg_b | seg_c),                                                     //&quot;1&quot;<br />  ~(seg_a | seg_b | seg_d | seg_e | seg_g),                             //&quot;2&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_g),                             //&quot;3&quot;<br />  ~(seg_b | seg_c | seg_f | seg_g),                                     //&quot;4&quot;<br />  ~(seg_a | seg_c | seg_d | seg_f | seg_g),                             //&quot;5&quot;<br />  ~(seg_a | seg_c | seg_d | seg_e | seg_f | seg_g),                     //&quot;6&quot;<br />  ~(seg_a | seg_b | seg_c),                                             //&quot;7&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g),             //&quot;8&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_f | seg_g),                             //&quot;9&quot;<br />  (seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g | seg_dp),    //pusty<br />  ~(seg_g),                                                             //&quot;-&quot;<br />  ~(seg_a | seg_b | seg_f | seg_g),                                     //stopien<br />  ~(seg_a | seg_d | seg_e | seg_f),                                     //C<br />};<br />#define pusty 10<br /><br /><br />//bool colon_on = true;<br /><br />//void drawCentreString(const char *string, int dX, int poY, int siz);<br /><br />TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);<br /><br /><br />typedef struct {<br />  uint16_t x;<br />  uint16_t y;<br />  byte sizeofdisp;<br />  byte dispcount;<br />  bool decimal;<br />  bool colon;<br />  uint16_t coloron;<br />  uint16_t colorof;<br />} SSD;<br /><br />SSD clockdisp, tempdisp, counterdisp, twodigit;<br /><br />void setup(void) {<br />  tft.initDisplay();<br />  tft.setRotation(1);<br />  Serial.begin(57600); // For debug<br />  tft.fillScreen(BACKGROUND);<br /><br />  disp7segm_init(&amp;clockdisp , 5, 5, 1, 4, NoDecimal, Colon, GREEN, DARKGREY);       // build a 7 segment display size 1, 4 digits, coord. x&amp;y = 5<br />  disp7segm_init(&amp;tempdisp, 155, 5, 2, 3, Decimal, NoColon, YELLOW, DARKGREY);<br />  //disp7segm_init(&amp;counterdisp, 5, 45, 3, 2, NoDecimal, NoColon, RED, DARKGREY);<br />  disp7segm_init(&amp;twodigit, 130, 100, 4, 2, NoDecimal, NoColon, MAGENTA, DARKGREY);<br />  // 1 param. are pointer for object to create<br />  // 2, 3 param. x &amp; y coordinates<br />  // 4 param. display size<br />  // 5 param. number of digits<br />  // 6 param. decimal point all digits on or off<br />  // 7 param. colon for clock on or off<br /><br />}<br /><br />byte t1, t2, t3, t4 = 0;<br />byte minutes = 34;<br />byte hours = 23;<br />uint16_t temp = 261;<br />byte waitaminute = 50;<br />uint16_t kolor = 0;<br />bool f_min = true;<br />bool f_hr = true;<br />bool f_temp = true;<br /><br />void loop() {<br /><br /><br /><br />  t1 = hours / 10;<br />  t2 = hours % 10;<br />  t3 = minutes / 10;<br />  t4 = minutes % 10;<br /><br />  //_7segm (temp, ON, 2, RED);<br />  if (f_hr) {<br />    _7segm (&amp;clockdisp, t1, ON, 1, 1);<br />    _7segm (&amp;clockdisp, t2, OFF, 0, 2);<br />    f_hr = false;<br />  }<br /><br />  if (f_min) {<br />    _7segm (&amp;clockdisp, t3, OFF, 0, 3);<br />    _7segm (&amp;clockdisp, t4, OFF, 0, 4);<br />    f_min = false;<br />  }<br /><br />  if (f_temp) {<br />    t1 = temp / 100;<br />    t2 = (temp % 100) / 10;<br />    t3 = (temp / 100) % 10;<br /><br />    _7segm (&amp;tempdisp, t1, ON, 1, 1);<br />    _7segm (&amp;tempdisp, t2, OFF, 0, 2);<br />    _7segm (&amp;tempdisp, t3, OFF, 0, 3);<br />    decimal_onof(&amp;tempdisp, 2, ON);<br /><br />    _7segm_sign(&amp;twodigit, 0b11100000, 1);<br />    _7segm_sign(&amp;twodigit, 0b10000011, 2);<br />    f_temp = false;<br />  }<br /><br />  //  t1 = waitaminute / 10;<br />  //  t2 = waitaminute % 10;<br />  //<br />  //  _7segm (&amp;counterdisp, t1, OFF, 0, 1);<br />  //  _7segm (&amp;counterdisp, t2, OFF, 0, 2);<br /><br /><br />  //  _7segm_sign(t1, 1, YELLOW);<br />  //  _7segm_sign(t2, 2, YELLOW);<br />  //  _7segm_sign(t3, 3, YELLOW);<br />  //  _7segm_sign(t4, 4, YELLOW);<br />  //decimal_onof(3, ON, YELLOW);<br />  colon_onof(&amp;clockdisp, ON);<br />  delay(500);<br />  colon_onof(&amp;clockdisp, OFF);<br />  delay(500);<br />  waitaminute++;<br />  if(waitaminute == 30) display_onof(&amp;twodigit,OFF);<br />  //kolor = kolor+100;<br />  //Serial.println(kolor, HEX);<br /><br /><br />  if (waitaminute == 60) {<br />    waitaminute = 0;<br />    minutes++;<br />    f_min = true;<br />    if (minutes == 60) {<br />      minutes = 0;<br />      hours++;<br />      f_hr = true;<br />      if (hours == 24) hours = 0;<br />    }<br />  }<br />  //while (1) {}<br /><br />}<br /><br />void disp7segm_init(SSD * obj, uint16_t x, uint16_t y, byte sizedisp, byte dgt, bool dot, bool colon, uint16_t coloron,  uint16_t colorof) {<br />  //draw display 7 segments<br /><br />  obj-&gt;x = x;<br />  obj-&gt;y = y;<br />  obj-&gt;sizeofdisp = sizedisp;<br />  obj-&gt;dispcount = dgt;<br />  obj-&gt;decimal = dot;<br />  obj-&gt;colon = colon;<br />  obj-&gt;coloron = coloron;<br />  obj-&gt;colorof = colorof;<br />  //  _Decimal = dot;<br />  //  _Colon = colon;<br /><br />  for (uint8_t a = 0; a &lt; dgt; a++) {<br />    for (byte i = 1; i &lt; 8; i++) {<br /><br />      //Serial.println(x);<br />      //Serial.println(y);<br />      //Serial.println(x1);<br />      //Serial.println(y1);<br />      //Serial.println(a);<br />      drawsegment(x, y, obj-&gt;sizeofdisp, i, colorof);<br />      //<br />    }<br />    if (dot) drawsegment(x, y, obj-&gt;sizeofdisp, 8, colorof);<br />    if (colon &amp;&amp; a == 1) drawsegment(x, y, obj-&gt;sizeofdisp, 9, colorof);<br /><br />    x = x + (23 * sizedisp);<br /><br />  }<br /><br />}<br /><br />void drawsegment(uint16_t x, uint16_t y, byte sizedisp, byte number, uint16_t color) {<br /><br />  const byte hsegmh   = 11 * sizedisp;<br />  const byte hsegmv   = 8 * sizedisp;<br />  const byte wsegm   = 2 * sizedisp;<br />  const byte margin  = 4 * sizedisp;<br />  const byte space   = 1 * sizedisp;<br />  const byte segmenth = (2 * wsegm) + hsegmh;<br />  const byte segmentv = (2 * wsegm) + hsegmv;<br />  byte widsegm = hsegmh + (wsegm * 2) + (margin / 2) + margin;<br />  byte heisegm = (hsegmv * 2) + (space * 3) + (margin * 2);<br /><br />  byte px1 = x + margin;<br />  // byte px2 = x + margin + wsegm;<br />  // byte px3 = x + widsegm - (margin / 2);<br />  byte py1 = y + margin;<br />  byte py2 = y + margin + wsegm;<br />  //byte py3 = y + heisegm - margin;<br /><br />  //  Serial.println(widsegm);<br />  //  Serial.println(heisegm);<br />  //  Serial.println(px1);<br />  //  Serial.println(px2);<br />  //  Serial.println(px3);<br />  //  Serial.println(py1);<br />  //  Serial.println(py2);<br />  //  Serial.println(py3);<br /><br />  switch (number) {<br /><br />    case 1:<br />      tft.fillTriangl(px1, py1, px1 + segmenth, py1, px1 + segmenth - wsegm, py2, color);<br />      tft.fillTriangl(px1 + segmenth - wsegm, py2, px1 + wsegm, py2, px1, py1, color);<br />      break;<br /><br />    case 2:<br />      tft.fillTriangl(px1 + segmenth, py1 + space, px1 + segmenth - wsegm, py1 + space + wsegm, px1 + segmenth - wsegm - space, py1 + space + segmentv - wsegm, color);<br />      tft.fillTriangl(px1 + segmenth - wsegm - space, py1 + space + segmentv - wsegm, px1 + segmenth - space, py1 + space + segmentv, px1 + segmenth, py1 + space, color);<br />      break;<br /><br />    case 3:<br />      tft.fillTriangl(px1 + segmenth - space, py1 + (space * 2) + segmentv, px1 + segmenth - (space * 2), py1 + (space * 2) + (segmentv * 2), px1 + segmenth - wsegm - (space * 2), py1 + (space * 2) + (segmentv * 2) - wsegm, color);<br />      tft.fillTriangl(px1 + segmenth - wsegm - (space * 2), py1 + (space * 2) + (segmentv * 2) - wsegm, px1 + segmenth - wsegm - space, py1 + (space * 2) + segmentv + wsegm, px1 + segmenth - space, py1 + (space * 2) + segmentv, color);<br />      break;<br /><br />    case 4:<br />      tft.fillTriangl(px1 + segmenth - (space * 2), py1 + (space * 3) + (segmentv * 2), px1 - wsegm,  py1 + (space * 3) + (segmentv * 2), px1,  py1 + (space * 3) + (segmentv * 2) - wsegm,  color);<br />      tft.fillTriangl(px1,  py1 + (space * 3) + (segmentv * 2) - wsegm, px1 + segmenth - wsegm - (space * 2),  py1 + (space * 3) + (segmentv * 2) - wsegm, px1 + segmenth - (space * 2), py1 + (space * 3) + (segmentv * 2), color);<br />      break;<br /><br />    case 5:<br />      tft.fillTriangl(px1 - wsegm, py1 + (space * 2) + (segmentv * 2), px1 - wsegm + space, py1 + (space * 2) + segmentv, px1 + space, py1 + (space * 2) + segmentv + (wsegm / 2), color);<br />      tft.fillTriangl(px1 - wsegm, py1 + (space * 2) + (segmentv * 2), px1, py1 + (space * 2) + (segmentv * 2) - wsegm, px1 + space, py1 + (space * 2) + segmentv + (wsegm / 2), color);<br />      break;<br /><br />    case 6:<br />      tft.fillTriangl(px1 - wsegm + space, py1 + (space * 1) + segmentv, px1, py1 + space, px1 + wsegm, py2 + space, color);<br />      tft.fillTriangl(px1 + wsegm, py2 + space, px1 + wsegm - space, py1 + (space * 1) + segmentv - (wsegm / 2), px1 - wsegm + space, py1 + (space * 1) + segmentv, color);<br />      break;<br /><br />    case 7:<br />      tft.fillTriangl(px1 - wsegm + (space * 2), py1 + (space * 1) + 1 + segmentv, px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 + (wsegm / 2) + space,  py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />      tft.fillTriangl(px1 - wsegm + segmenth, py1 + (space * 1) + 1 + segmentv, px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2),  py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />      tft.fillTriangl(px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />      tft.fillTriangl(px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv + (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv + (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), color);<br />      break;<br /><br />    case 8:<br />      tft.fillCircle(px1 + segmenth + (space * 2),  py1 + (space * 3) + (segmentv * 2), wsegm / 2, color);<br />      break;<br /><br />    case 9:<br />      tft.fillCircle(px1 + segmenth + (space * 3),  py1 + (space * 3) + segmentv + (segmentv / 2) - wsegm, wsegm / 2, color);<br />      tft.fillCircle(px1 + segmenth + (space * 4),  py1 + (space * 3) + (segmentv / 2) + wsegm, wsegm / 2, color);<br />      break;<br /><br />  }<br />}<br /><br />void _7segm(SSD *obj, uint16_t data, bool firstzero, byte zeros) {<br />  byte x = obj-&gt;x;<br />  byte y = obj-&gt;y;<br />  byte sizedisp = obj-&gt;sizeofdisp;<br />  byte maxDisp = obj-&gt;dispcount;<br />  uint16_t color1 = obj-&gt;coloron;<br />  uint16_t color2 = obj-&gt;colorof;<br />  byte tmp;<br /><br />  for (byte i = 0; i &lt; maxDisp; i++) {<br />    switch (i) {<br /><br />      case 0:<br />        tmp = data / 1000;<br />        //Serial.println(tmp);<br />        break;<br /><br />      case 1:<br />        tmp = (data % 1000) / 100;<br />        //Serial.println(tmp);<br />        x = obj-&gt;x + ((23 * i) * sizedisp) ;<br />        break;<br /><br />      case 2:<br />        tmp = data % 100;<br />        tmp = tmp / 10;<br />        x = obj-&gt;x + ((23 * i) * sizedisp) ;<br />        // Serial.println(tmp);<br />        break;<br /><br />      case 3:<br />        tmp = data % 100;<br />        tmp = tmp % 10;<br />        x = obj-&gt;x + ((23 * i) * sizedisp) ;<br />        //Serial.println(tmp);<br />        break;<br />    }<br />    if (!tmp &amp;&amp; i &lt; zeros &amp;&amp; firstzero == 1) tmp = pusty;<br />    tmp = pgm_read_byte_near(znaki + tmp);<br />    //Serial.println(tmp, BIN);<br />    for ( byte a = 1; a &lt; 8; a++) {<br />      //Serial.println(a);<br />      if (!(tmp &amp; 0x01)) {<br />        drawsegment(x, y, obj-&gt;sizeofdisp, a, color1);<br />        // Serial.println(&quot;0&quot;);<br />      }<br />      else {<br />        drawsegment(x, y, obj-&gt;sizeofdisp, a, color2);<br />        // Serial.println(&quot;1&quot;);<br />      }<br />      tmp &gt;&gt;= 1;<br />    }<br /><br />    //while(1){}<br />  }<br /><br /><br />}<br /><br /><br />void _7segm(SSD *obj, byte data, bool firstzero, byte zeros, byte pos) {<br /><br />  byte x = obj-&gt;x + ((23 * (pos - 1)) * obj-&gt;sizeofdisp);<br />  byte y = obj-&gt;y;<br />  uint16_t color1 = obj-&gt;coloron;<br />  uint16_t color2 = obj-&gt;colorof;<br />  byte tmp;<br />  byte i;<br /><br />  if (!data &amp;&amp;  firstzero == 1) data = pusty;<br />  tmp = pgm_read_byte_near(znaki + data);<br />  //Serial.println(tmp, BIN);<br />  for ( byte a = 1; a &lt; 8; a++) {<br />    //Serial.println(a);<br />    if (!(tmp &amp; 0x01)) {<br />      drawsegment(x, y, obj-&gt;sizeofdisp, a, color1);<br />      //Serial.println(&quot;0&quot;);<br />    }<br />    else {<br />      drawsegment(x, y, obj-&gt;sizeofdisp, a, color2);<br />      // Serial.println(&quot;1&quot;);<br />    }<br />    tmp &gt;&gt;= 1;<br />  }<br /><br />  //while(1){}<br />}<br /><br /><br />void _7segm_sign(SSD *obj, byte data, byte pos) {<br /><br />  byte x = obj-&gt;x + ((23 * (pos - 1)) * obj-&gt;sizeofdisp);<br />  byte y = obj-&gt;y;<br />  uint16_t color1 = obj-&gt;coloron;<br />  uint16_t color2 = obj-&gt;colorof;<br /><br />  for ( byte a = 1; a &lt; 8; a++) {<br />    //Serial.println(a);<br />    if (!(data &amp; 0x01)) {<br />      drawsegment(x, y, obj-&gt;sizeofdisp, a, obj-&gt;coloron);<br />      //Serial.println(&quot;0&quot;);<br />    }<br />    else {<br />      drawsegment(x, y, obj-&gt;sizeofdisp, a, obj-&gt;colorof);<br />      //Serial.println(&quot;1&quot;);<br />    }<br />    data &gt;&gt;= 1;<br />  }<br />}<br /><br /><br />void decimal_onof(SSD *obj, byte pos, bool onof) {<br /><br />  if (!obj-&gt;decimal) return;<br /><br />  byte x = obj-&gt;x + ((23 * (pos - 1)) * obj-&gt;sizeofdisp);<br />  byte y = obj-&gt;y;<br />  byte sizeofdisp = obj-&gt;sizeofdisp;<br />  uint16_t color1 = obj-&gt;coloron;<br />  uint16_t color2 = obj-&gt;colorof;<br /><br />  if (onof) drawsegment(x, y, obj-&gt;sizeofdisp, 8, color1);<br />  else drawsegment(x, y, obj-&gt;sizeofdisp, 8, color2);<br /><br />}<br /><br />void colon_onof(SSD *obj, bool onof) {<br /><br />  if (!obj-&gt;colon) return;<br /><br />  byte x = obj-&gt;x + (23 * obj-&gt;sizeofdisp);<br />  byte y = obj-&gt;y;<br />  //byte sizeofdisp = obj-&gt;sizeofdisp;<br />  //uint16_t color1 = obj-&gt;coloron;<br />  //uint16_t color2 = obj-&gt;colorof;<br /><br />  if (onof) drawsegment(x, y, obj-&gt;sizeofdisp, 9, obj-&gt;coloron);<br />  else drawsegment(x, y, obj-&gt;sizeofdisp, 9, obj-&gt;colorof);<br />}<br /><br /><br />void display_onof(SSD *obj, bool onof) {<br /><br />  for (byte pos = 1; pos &lt;= obj-&gt;dispcount; pos++) {<br />    byte x = obj-&gt;x + ((23 * (pos - 1)) * obj-&gt;sizeofdisp);<br />    byte y = obj-&gt;y;<br />    //byte sizeofdisp = obj-&gt;sizeofdisp;<br /><br />    for ( byte a = 1; a &lt; 10; a++) {<br /><br />      drawsegment(x, y, obj-&gt;sizeofdisp, a, BACKGROUND);<br /><br />    }<br />  }<br />}[/syntax]<br /> Korzystam z biblioteki MEGA TFTLCD ktora mi dziala. ale chcialbym przerobic program na biblioteke i tu juz rozowo nie jest. poleglem.<br />program ktory ma stworzyc wyswietlacz:<br />[syntax=cpp]#include &quot;TFTLCD.h&quot;<br />#include &quot;sevenseg.h&quot;<br />#include &lt;avr/pgmspace.h&gt;<br /><br /><br />#define LCD_CS A3<br />#define LCD_CD A2<br />#define LCD_WR A1<br />#define LCD_RD A0<br />// you can also just connect RESET to the arduino RESET pin<br />#define LCD_RESET A4<br /><br />// Color definitions<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 GREY            0x5AEB<br />#define DARKGREY        0x0101<br /><br /><br />//TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);<br />Sevenseg zegar(5, 5, 1, 4, 0, 1, WHITE, BLACK);<br /><br />void setup() {<br />  // put your setup code here, to run once:<br /> <br /> while(1){}<br /> <br />}<br /><br />void loop() {<br />  // put your main code here, to run repeatedly:<br /><br />}[/syntax]<br />A tu bledy po kompilacji.<br /><br />[syntax=c]Arduino:1.8.4 (Windows 7), Płytka:&quot;Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)&quot;<br /><br />C:\Program Files\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\jacabe\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\jacabe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\jacabe\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10804 -build-path C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074 -warnings=all -build-cache C:\Users\jacabe\AppData\Local\Temp\arduino_cache_426645 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -verbose C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino<br />C:\Program Files\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files\Arduino\hardware -hardware C:\Users\jacabe\AppData\Local\Arduino15\packages -tools C:\Program Files\Arduino\tools-builder -tools C:\Program Files\Arduino\hardware\tools\avr -tools C:\Users\jacabe\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files\Arduino\libraries -libraries C:\Users\jacabe\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10804 -build-path C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074 -warnings=all -build-cache C:\Users\jacabe\AppData\Local\Temp\arduino_cache_426645 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.arduinoOTA.path=C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -verbose C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino<br />Using board 'mega' from platform in folder: C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18<br />Using core 'arduino' from platform in folder: C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18<br />Detecting libraries used...<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\sketch\sketch_nov01a.ino.cpp&quot; -o &quot;nul&quot;<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\sketch\sketch_nov01a.ino.cpp&quot; -o &quot;nul&quot;<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay&quot; &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\sketch\sketch_nov01a.ino.cpp&quot; -o &quot;nul&quot;<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay&quot; &quot;C:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master\TFTLCD.cpp&quot; -o &quot;nul&quot;<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay&quot; &quot;C:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master\glcdfont.c&quot; -o &quot;nul&quot;<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay&quot; &quot;C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay\sevenseg.cpp&quot; -o &quot;nul&quot;<br />Generating function prototypes...<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay&quot; &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\sketch\sketch_nov01a.ino.cpp&quot; -o &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\preproc\ctags_target_for_gcc_minus_e.cpp&quot;<br />&quot;C:\Program Files\Arduino\tools-builder\ctags\5.8-arduino11/ctags&quot; -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\preproc\ctags_target_for_gcc_minus_e.cpp&quot;<br />Kompilowanie szkicu...<br />&quot;C:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++&quot; -c -g -Os -Wall -Wextra -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10804 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR   &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\cores\arduino&quot; &quot;-IC:\Users\jacabe\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.18\variants\mega&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master&quot; &quot;-IC:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay&quot; &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\sketch\sketch_nov01a.ino.cpp&quot; -o &quot;C:\Users\jacabe\AppData\Local\Temp\arduino_build_544074\sketch\sketch_nov01a.ino.cpp.o&quot;<br />In file included from C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino:1:0:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master/TFTLCD.h:174:7: warning: extra qualification 'TFTLCD::' on member 'drawCentreString' &#91;-fpermissive&#93;<br /><br />   int TFTLCD::drawCentreString(const char *string, int dX, int    poY, int font);<br /><br />       ^<br /><br />In file included from C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:4:0,<br /><br />                 from C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino:2:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master/TFTLCD.h:83:7: error: redefinition of 'class TFTLCD'<br /><br /> class TFTLCD : public Print {<br /><br />       ^<br /><br />In file included from C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino:1:0:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master/TFTLCD.h:83:7: error: previous definition of 'class TFTLCD'<br /><br /> class TFTLCD : public Print {<br /><br />       ^<br /><br />In file included from C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino:2:0:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-64' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br /> };<br /><br /> ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-7' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-92' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-80' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-103' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-110' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-126' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-8' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-128' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-112' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-65' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-100' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:44:1: warning: narrowing conversion of '-58' from 'int' to 'const byte {aka const unsigned char}' inside { } &#91;-Wnarrowing&#93;<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h: In constructor 'Sevenseg::Sevenseg(uint16_t, uint16_t, uint8_t, uint8_t, bool, bool, uint16_t, uint16_t)':<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:122: error: expected primary-expression before 'cs'<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                                          ^<br /><br />In file included from C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino:2:0:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:134: error: expected primary-expression before 'cd'<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                                                      ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:146: error: expected primary-expression before 'wr'<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                                                                  ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:158: error: expected primary-expression before 'rd'<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                                                                              ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:170: error: expected primary-expression before 'reset'<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                                                                                          ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:175: error: expected '{' at end of input<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                                                                                               ^<br /><br />In file included from C:\Users\jacabe\Desktop\sketch_nov01a\sketch_nov01a.ino:2:0:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h: At global scope:<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:19: warning: unused parameter 'sx' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                   ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:32: warning: unused parameter 'sy' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:44: warning: unused parameter 'sod' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                            ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:57: warning: unused parameter 'dc' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                         ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:66: warning: unused parameter 'dec' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                  ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:76: warning: unused parameter 'col' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                            ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:90: warning: unused parameter 'c1' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                          ^<br /><br />C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay/sevenseg.h:52:103: warning: unused parameter 'c2' &#91;-Wunused-parameter&#93;<br /><br /> Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br /><br />                                                                                                       ^<br /><br />Użycie biblioteki TFTLCD2MEGA-master z folderu C:\Users\jacabe\Documents\Arduino\libraries\TFTLCD2MEGA-master (legacy)<br />Użycie biblioteki sevensegmdisplay z folderu C:\Users\jacabe\Documents\Arduino\libraries\sevensegmdisplay (legacy)<br />exit status 1<br />Błąd kompilacji dla płytki Arduino/Genuino Mega or Mega 2560.[/syntax]<br />takie bledy podczas kompilacji.<br />Musze skorzystac w klasie Sevensegdisp z metody z klasy TFTLCD oraz stworzyc obiekt tego TFT. i niestety nie umiem sobie poradzic.<br /> czy bylby ktos tak dobry i mnie nauczyl?. nie chce rozwiazania( ryby). chce wiedzy (wedke). bardzo prosze o pomoc madrzejszych forumowiczow. Z gory dziekuje.<br /><br /><br /> dodaje pliki sevsnseg.h:<br />[syntax=cpp]#include &lt;avr/pgmspace.h&gt;<br />#include &lt;Arduino.h&gt;<br />#include &lt;avr/io.h&gt;<br />#include &quot;TFTLCD.h&quot;<br /><br />#define NoDecimal       0<br />#define Decimal         1<br />#define NoColon         0<br />#define Colon           1<br /><br />#define ON  1<br />#define OFF 0<br /><br />#define pusty 10<br /><br />#define seg_a (1&lt;&lt;0)<br />#define seg_b (1&lt;&lt;1)<br />#define seg_c (1&lt;&lt;2)<br />#define seg_d (1&lt;&lt;3)<br />#define seg_e (1&lt;&lt;4)<br />#define seg_f (1&lt;&lt;5)<br />#define seg_g (1&lt;&lt;6)<br />#define seg_dp (1&lt;&lt;7)<br /><br /><br /><br /><br />const PROGMEM byte znaki&#91;&#93;  = {<br /><br />  ~(seg_a | seg_b | seg_c | seg_d | seg_e | seg_f),                     //&quot;0&quot;<br />  ~(seg_b | seg_c),                                                     //&quot;1&quot;<br />  ~(seg_a | seg_b | seg_d | seg_e | seg_g),                             //&quot;2&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_g),                             //&quot;3&quot;<br />  ~(seg_b | seg_c | seg_f | seg_g),                                     //&quot;4&quot;<br />  ~(seg_a | seg_c | seg_d | seg_f | seg_g),                             //&quot;5&quot;<br />  ~(seg_a | seg_c | seg_d | seg_e | seg_f | seg_g),                     //&quot;6&quot;<br />  ~(seg_a | seg_b | seg_c),                                             //&quot;7&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g),             //&quot;8&quot;<br />  ~(seg_a | seg_b | seg_c | seg_d | seg_f | seg_g),                             //&quot;9&quot;<br />  (seg_a | seg_b | seg_c | seg_d | seg_e | seg_f | seg_g | seg_dp),    //pusty<br />  ~(seg_g),                                                             //&quot;-&quot;<br />  ~(seg_a | seg_b | seg_f | seg_g),                                     //stopien<br />  ~(seg_a | seg_d | seg_e | seg_f),                                     //C<br />};<br /><br /><br />class Sevenseg :public TFTLCD<br />{<br /><br />public:<br /><br />Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD::TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset);<br />~Sevenseg();<br /><br />void drawsegment(uint16_t x, uint16_t y, uint8_t sizedisp, uint8_t number, uint16_t color);<br />void display(uint16_t data, bool firstzero, uint8_t zeros);<br />void display(uint8_t data, bool firstzero, uint8_t zeros, uint8_t pos);<br />void display_sign(uint8_t data, uint8_t pos);<br />void decimal_onof(uint8_t pos, bool onof);<br />void colon_onof(bool onof);<br /><br /><br />private:<br /><br />  uint16_t x;<br />  uint16_t y;<br />  uint8_t sizeofdisp;<br />  uint8_t dispcount;<br />  uint16_t coloron;<br />  uint16_t colorof;<br />  bool decimal;<br />  bool colon;<br />  <br />  <br />};[/syntax]<br /><br />oraz sevenseg.cpp[syntax=cpp]#include&quot;sevenseg.h&quot;<br />#include &lt;avr/pgmspace.h&gt;<br />#include &lt;Arduino.h&gt;<br />#include &lt;avr/io.h&gt;<br />#include &quot;TFTLCD.h&quot;<br /><br /><br />Sevenseg::Sevenseg(uint16_t sx, uint16_t sy, uint8_t sod, uint8_t dc, bool dec, bool col, uint16_t c1, uint16_t c2):TFTLCD::TFTLCD(uint8_t cs, uint8_t cd, uint8_t wr, uint8_t rd, uint8_t reset){<br /><br />x =            sx;<br />y =            sy;<br />sizeofdisp =   sod;<br />dispcount =    dc;<br />decimal =      dec;<br />colon =        col;<br />coloron =      c1;<br />colorof =      c2;<br /><br /><br />for (uint8_t a = 0; a &lt; dc; a++) {<br />    for (uint8_t i = 1; i &lt; 8; i++) {<br /><br />      drawsegment(sx, sy, sod, i, c2);<br />      //<br />    }<br />    if (dec) drawsegment(sx, sy, sod, 8, c2);<br />    if (col &amp;&amp; a == 1) drawsegment(sx, sy, sod, 9, c2);<br /><br />    sx = sx + (23 * sod);<br /><br />  }<br />}<br />  <br />void Sevenseg::drawsegment(uint16_t x, uint16_t y, uint8_t sizedisp, uint8_t number, uint16_t color){<br /><br />  const byte hsegmh   = 11 * sizedisp;<br />  const byte hsegmv   = 8 * sizedisp;<br />  const byte wsegm   = 2 * sizedisp;<br />  const byte margin  = 4 * sizedisp;<br />  const byte space   = 1 * sizedisp;<br />  const byte segmenth = (2 * wsegm) + hsegmh;<br />  const byte segmentv = (2 * wsegm) + hsegmv;<br />  byte widsegm = hsegmh + (wsegm * 2) + (margin / 2) + margin;<br />  byte heisegm = (hsegmv * 2) + (space * 3) + (margin * 2);<br /><br />  byte px1 = x + margin;<br />  byte py1 = y + margin;<br /><br />  switch (number) {<br /><br />    case 1:<br />      TFTLCD::fillTriangl(px1, py1, px1 + segmenth, py1, px1 + segmenth - wsegm, py1+wsegm, color);<br />      TFTLCD::fillTriangl(px1 + segmenth - wsegm, py1+wsegm, px1 + wsegm, py1+wsegm, px1, py1, color);<br />      break;<br /><br />    case 2:<br />      TFTLCD::fillTriangl(px1 + segmenth, py1 + space, px1 + segmenth - wsegm, py1 + space + wsegm, px1 + segmenth - wsegm - space, py1 + space + segmentv - wsegm, color);<br />      TFTLCD::fillTriangl(px1 + segmenth - wsegm - space, py1 + space + segmentv - wsegm, px1 + segmenth - space, py1 + space + segmentv, px1 + segmenth, py1 + space, color);<br />      break;<br /><br />    case 3:<br />      TFTLCD::fillTriangl(px1 + segmenth - space, py1 + (space * 2) + segmentv, px1 + segmenth - (space * 2), py1 + (space * 2) + (segmentv * 2), px1 + segmenth - wsegm - (space * 2), py1 + (space * 2) + (segmentv * 2) - wsegm, color);<br />      TFTLCD::fillTriangl(px1 + segmenth - wsegm - (space * 2), py1 + (space * 2) + (segmentv * 2) - wsegm, px1 + segmenth - wsegm - space, py1 + (space * 2) + segmentv + wsegm, px1 + segmenth - space, py1 + (space * 2) + segmentv, color);<br />      break;<br /><br />    case 4:<br />      TFTLCD::fillTriangl(px1 + segmenth - (space * 2), py1 + (space * 3) + (segmentv * 2), px1 - wsegm,  py1 + (space * 3) + (segmentv * 2), px1,  py1 + (space * 3) + (segmentv * 2) - wsegm,  color);<br />      TFTLCD::fillTriangl(px1,  py1 + (space * 3) + (segmentv * 2) - wsegm, px1 + segmenth - wsegm - (space * 2),  py1 + (space * 3) + (segmentv * 2) - wsegm, px1 + segmenth - (space * 2), py1 + (space * 3) + (segmentv * 2), color);<br />      break;<br /><br />    case 5:<br />      TFTLCD::fillTriangl(px1 - wsegm, py1 + (space * 2) + (segmentv * 2), px1 - wsegm + space, py1 + (space * 2) + segmentv, px1 + space, py1 + (space * 2) + segmentv + (wsegm / 2), color);<br />      TFTLCD::fillTriangl(px1 - wsegm, py1 + (space * 2) + (segmentv * 2), px1, py1 + (space * 2) + (segmentv * 2) - wsegm, px1 + space, py1 + (space * 2) + segmentv + (wsegm / 2), color);<br />      break;<br /><br />    case 6:<br />      TFTLCD::fillTriangl(px1 - wsegm + space, py1 + (space * 1) + segmentv, px1, py1 + space, px1 + wsegm, py1+wsegm + space, color);<br />      TFTLCD::fillTriangl(px1 + wsegm, py1+wsegm + space, px1 + wsegm - space, py1 + (space * 1) + segmentv - (wsegm / 2), px1 - wsegm + space, py1 + (space * 1) + segmentv, color);<br />      break;<br /><br />    case 7:<br />      TFTLCD::fillTriangl(px1 - wsegm + (space * 2), py1 + (space * 1) + 1 + segmentv, px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 + (wsegm / 2) + space,  py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />      TFTLCD::fillTriangl(px1 - wsegm + segmenth, py1 + (space * 1) + 1 + segmentv, px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2),  py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />      TFTLCD::fillTriangl(px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv + (wsegm / 2), color);<br />      TFTLCD::fillTriangl(px1 + (wsegm / 2) + space, py1 + (space * 1) + 1 + segmentv + (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv + (wsegm / 2), px1 - wsegm + segmenth - (wsegm / 2), py1 + (space * 1) + 1 + segmentv - (wsegm / 2), color);<br />      break;<br /><br />    case 8:<br />      TFTLCD::fillCircle(px1 + segmenth + (space * 2),  py1 + (space * 3) + (segmentv * 2), wsegm / 2, color);<br />      break;<br /><br />    case 9:<br />      TFTLCD::fillCircle(px1 + segmenth + (space * 3),  py1 + (space * 3) + segmentv + (segmentv / 2) - wsegm, wsegm / 2, color);<br />      TFTLCD::fillCircle(px1 + segmenth + (space * 4),  py1 + (space * 3) + (segmentv / 2) + wsegm, wsegm / 2, color);<br />      break;<br /><br />  }<br />}<br /><br /><br />void Sevenseg::display(uint16_t data, bool firstzero, uint8_t zeros){<br /><br />}<br /><br />void Sevenseg::display(uint8_t data, bool firstzero, uint8_t zeros, uint8_t pos){<br /><br />}<br /><br />void Sevenseg::display_sign(uint8_t data, uint8_t pos){<br /><br />}<br /><br />void Sevenseg::decimal_onof(uint8_t pos, bool onof){<br /><br />}<br /><br />void Sevenseg::colon_onof(bool onof){<br /><br />}[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=12296">jacabe</a> — 4 lis 2017, o 15:17</p><hr />
]]></content>
</entry>
</feed>