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

<title>ATNEL tech-forum</title>
<link href="https://forum.atnel.pl/index.php" />
<updated>2014-03-02T21:17:39+01:00</updated>

<author><name><![CDATA[ATNEL tech-forum]]></name></author>
<id>https://forum.atnel.pl/feed.php?f=4&amp;t=6217&amp;mode</id>
<entry>
<author><name><![CDATA[eriksson]]></name></author>
<updated>2014-03-02T21:17:39+01:00</updated>
<published>2014-03-02T21:17:39+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72876#p72876</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72876#p72876"/>
<title type="html"><![CDATA[Re: Błąd kompilacji biblioteki ht1632c]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72876#p72876"><![CDATA[
Po dodaniu 2 linijek na początku i na końcu #endif wywala:<br /> <br />In file included from basicdemo.pde:1:<br />G:\AVR\Arduino\libraries\HT1632C/HT1632.h:110: error: stray '#' in program<br />In file included from basicdemo.pde:1:<br />G:\AVR\Arduino\libraries\HT1632C/HT1632.h:1:1: error: unterminated #ifndef<br />basicdemo:15: error: expected constructor, destructor, or type conversion before 'void'<br /><br /><br />[syntax=c]#if(ARDUINO &gt;= 100)<br /> #include &lt;Arduino.h&gt;<br />#else<br /> #include &lt;WProgram.h&gt;<br />#endif<br /><br /><br />#ifndef Included_HT1632_H<br />#define Included_HT1632_H // Existing code goes here #endif // Included_HT1632_H<br /><br />#define HT1632_READ  0x6<br />#define HT1632_WRITE 0x5<br />#define HT1632_COMMAND 0x4<br /><br />#define HT1632_SYS_DIS 0x00<br />#define HT1632_SYS_EN 0x01<br />#define HT1632_LED_OFF 0x02<br />#define HT1632_LED_ON 0x03<br />#define HT1632_BLINK_OFF 0x08<br />#define HT1632_BLINK_ON 0x09<br />#define HT1632_SLAVE_MODE 0x10<br />#define HT1632_MASTER_MODE 0x14<br />#define HT1632_INT_RC 0x18<br />#define HT1632_EXT_CLK 0x1C<br />#define HT1632_PWM_CONTROL 0xA0<br /><br />#define HT1632_COMMON_8NMOS  0x20<br />#define HT1632_COMMON_16NMOS  0x24<br />#define HT1632_COMMON_8PMOS  0x28<br />#define HT1632_COMMON_16PMOS  0x2C<br /><br />class HT1632 {<br /><br /> public:<br />  HT1632(int8_t data, int8_t wr, int8_t cs, int8_t rd = -1);<br /><br />  void begin(uint8_t type);<br />  <br />  void clrPixel(uint16_t i);<br />  void setPixel(uint16_t i);<br /><br />  void blink(boolean state);<br />  void setBrightness(uint8_t pwm);<br /><br />  void clearScreen();<br />  void fillScreen();<br />  void writeScreen();<br />  void dumpScreen();<br />  <br /> private:<br />  int8_t WIDTH, HEIGHT;<br />  int8_t _data, _cs, _wr, _rd;<br />  uint8_t ledmatrix&#91;48&#93;;     // 16 * 24 / 8<br />  void sendcommand(uint8_t c);<br />  void writedata(uint16_t d, uint8_t bits);<br />  void writeRAM(uint8_t addr, uint8_t data);<br />};<br /><br />class HT1632LEDMatrix : public Print {<br /> public:<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1);<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1, uint8_t cs2);<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1, <br />  uint8_t cs, uint8_t cs3);<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1, <br />  uint8_t cs2, uint8_t cs3, uint8_t cs4);<br /><br /> void begin(uint8_t type);<br /> void clearScreen(void);<br /> void fillScreen(void);<br /> void blink(boolean b);<br /> void setBrightness(uint8_t brightness);<br /> void writeScreen();<br /> uint8_t width();<br /> uint8_t height();<br /><br />  void clrPixel(uint8_t x, uint8_t y);<br />  void setPixel(uint8_t x, uint8_t y);<br />  void drawPixel(uint8_t x, uint8_t y, uint8_t color);<br /><br />  void drawLine(int8_t x0, int8_t y0, int8_t x1, int8_t y1, uint8_t color);<br />  void drawRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color);<br />  void fillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color);<br />  void drawCircle(uint8_t x0, uint8_t y0, uint8_t r, uint8_t color);<br />  void fillCircle(uint8_t x0, uint8_t y0, uint8_t r, uint8_t color);<br /><br />  // Printing<br />  void setCursor(uint8_t x, uint8_t y);<br />  void setTextSize(uint8_t s);<br />  void setTextColor(uint8_t c);<br />#if(ARDUINO &gt;= 100)<br />  size_t write(uint8_t c);<br />#else<br />  void write(uint8_t c);<br />#endif<br />  void drawChar(uint8_t x, uint8_t y, char c, uint16_t color, uint8_t size);<br /><br />  void drawBitmap(uint8_t x, uint8_t y, <br />  const uint8_t *bitmap, uint8_t w, uint8_t h,<br />  uint8_t color);<br /><br /><br /> private:<br />  HT1632 *matrices;<br />  uint8_t matrixNum, _width, _height;<br />  uint8_t cursor_x, cursor_y, textsize, textcolor;<br />};#endif // _HT1632_H_[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1067">eriksson</a> — 2 mar 2014, o 21:17</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[kicajek]]></name></author>
<updated>2014-03-02T21:03:12+01:00</updated>
<published>2014-03-02T21:03:12+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72874#p72874</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72874#p72874"/>
<title type="html"><![CDATA[Re: Błąd kompilacji biblioteki ht1632c]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72874#p72874"><![CDATA[
Witam <br />Mnie to nic nie mówi, ale może Ty domyślisz się o co chodzi<br /><div class="quotetitle"><b>Quote:</b></div><div class="quotecontent"><br />Biorąc pod uwagę definicje edycje są w tym samym pliku, wygląda na to, jesteś w tym tego samego nagłówkom wiele razy.  Więc trzeba dodać kod ochronny <br />[syntax=cpp]1  #ifndef Included_NameModel_H #define Included_NameModel_H // Existing code goes here #endif // Included_NameModel_H[/syntax]<br /></div><br />... ja znalazłem a TRANSLATOR to zmamlał <img src="https://forum.atnel.pl/images/smilies/icon_e_wink.gif" alt=";)" title="Puszcza oko" /> .<br /><br />Pozdr.<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=826">kicajek</a> — 2 mar 2014, o 21:03</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[eriksson]]></name></author>
<updated>2014-03-02T20:48:23+01:00</updated>
<published>2014-03-02T20:48:23+01:00</published>
<id>https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72870#p72870</id>
<link href="https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72870#p72870"/>
<title type="html"><![CDATA[Błąd kompilacji biblioteki ht1632c]]></title>

<content type="html" xml:base="https://forum.atnel.pl/viewtopic.php?t=6217&amp;p=72870#p72870"><![CDATA[
Witam. Próbuję uruchomić na Arduino matrycę led RGB na sterownikach HT1632C.<br /><br />Wie ktoś o co chodzi z tym CLASS?<br /><br />Podczas kompilacji wyskakuje mi błąd: <br /><br />In file included from basicdemo.pde:3:<br />G:\AVR\Arduino\libraries\HT1632C/HT1632.h:28: error: redefinition of 'class HT1632'<br />G:\AVR\Arduino\libraries\HT1632C/HT1632.h:28: error: previous definition of 'class HT1632'<br />G:\AVR\Arduino\libraries\HT1632C/HT1632.h:55: error: redefinition of 'class HT1632LEDMatrix'<br />G:\AVR\Arduino\libraries\HT1632C/HT1632.h:55: error: previous definition of 'class HT1632LEDMatrix'<br /><br />[syntax=c]#if(ARDUINO &gt;= 100)<br /> #include &lt;Arduino.h&gt;<br />#else<br /> #include &lt;WProgram.h&gt;<br />#endif<br /><br />#define HT1632_READ  0x6<br />#define HT1632_WRITE 0x5<br />#define HT1632_COMMAND 0x4<br /><br />#define HT1632_SYS_DIS 0x00<br />#define HT1632_SYS_EN 0x01<br />#define HT1632_LED_OFF 0x02<br />#define HT1632_LED_ON 0x03<br />#define HT1632_BLINK_OFF 0x08<br />#define HT1632_BLINK_ON 0x09<br />#define HT1632_SLAVE_MODE 0x10<br />#define HT1632_MASTER_MODE 0x14<br />#define HT1632_INT_RC 0x18<br />#define HT1632_EXT_CLK 0x1C<br />#define HT1632_PWM_CONTROL 0xA0<br /><br />#define HT1632_COMMON_8NMOS  0x20<br />#define HT1632_COMMON_16NMOS  0x24<br />#define HT1632_COMMON_8PMOS  0x28<br />#define HT1632_COMMON_16PMOS  0x2C<br /><br />class HT1632 {<br /><br /> public:<br />  HT1632(int8_t data, int8_t wr, int8_t cs, int8_t rd = -1);<br /><br />  void begin(uint8_t type);<br />  <br />  void clrPixel(uint16_t i);<br />  void setPixel(uint16_t i);<br /><br />  void blink(boolean state);<br />  void setBrightness(uint8_t pwm);<br /><br />  void clearScreen();<br />  void fillScreen();<br />  void writeScreen();<br />  void dumpScreen();<br />  <br /> private:<br />  int8_t WIDTH, HEIGHT;<br />  int8_t _data, _cs, _wr, _rd;<br />  uint8_t ledmatrix&#91;48&#93;;     // 16 * 24 / 8<br />  void sendcommand(uint8_t c);<br />  void writedata(uint16_t d, uint8_t bits);<br />  void writeRAM(uint8_t addr, uint8_t data);<br />};<br /><br />class HT1632LEDMatrix : public Print {<br /> public:<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1);<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1, uint8_t cs2);<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1, <br />  uint8_t cs, uint8_t cs3);<br />  HT1632LEDMatrix(uint8_t data, uint8_t wr, uint8_t cs1, <br />  uint8_t cs2, uint8_t cs3, uint8_t cs4);<br /><br /> void begin(uint8_t type);<br /> void clearScreen(void);<br /> void fillScreen(void);<br /> void blink(boolean b);<br /> void setBrightness(uint8_t brightness);<br /> void writeScreen();<br /> uint8_t width();<br /> uint8_t height();<br /><br />  void clrPixel(uint8_t x, uint8_t y);<br />  void setPixel(uint8_t x, uint8_t y);<br />  void drawPixel(uint8_t x, uint8_t y, uint8_t color);<br /><br />  void drawLine(int8_t x0, int8_t y0, int8_t x1, int8_t y1, uint8_t color);<br />  void drawRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color);<br />  void fillRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t color);<br />  void drawCircle(uint8_t x0, uint8_t y0, uint8_t r, uint8_t color);<br />  void fillCircle(uint8_t x0, uint8_t y0, uint8_t r, uint8_t color);<br /><br />  // Printing<br />  void setCursor(uint8_t x, uint8_t y);<br />  void setTextSize(uint8_t s);<br />  void setTextColor(uint8_t c);<br />#if(ARDUINO &gt;= 100)<br />  size_t write(uint8_t c);<br />#else<br />  void write(uint8_t c);<br />#endif<br />  void drawChar(uint8_t x, uint8_t y, char c, uint16_t color, uint8_t size);<br /><br />  void drawBitmap(uint8_t x, uint8_t y, <br />  const uint8_t *bitmap, uint8_t w, uint8_t h,<br />  uint8_t color);<br /><br /><br /> private:<br />  HT1632 *matrices;<br />  uint8_t matrixNum, _width, _height;<br />  uint8_t cursor_x, cursor_y, textsize, textcolor;<br />};[/syntax]<p>Statystyki: Napisane przez <a href="https://forum.atnel.pl/memberlist.php?mode=viewprofile&amp;u=1067">eriksson</a> — 2 mar 2014, o 20:48</p><hr />
]]></content>
</entry>
</feed>