<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: AdaFruit HR1632 16x24 display</title>
		<link>http://forums.leaflabs.com/topic.php?id=9681</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:19:56 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=9681" rel="self" type="application/rss+xml" />

		<item>
			<title>Molex1701 on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-23902</link>
			<pubDate>Tue, 26 Mar 2013 11:43:28 +0000</pubDate>
			<dc:creator>Molex1701</dc:creator>
			<guid isPermaLink="false">23902@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello,&#60;br /&#62;
  Just had to create an account for this site so I could say thanks for this information.  Had same trouble with this library as well an making a constructor with no arguments worked for it.  Noticed some other libraries I use dont make a plane one like that either.  Think I'll go add them to save trouble down the line.&#60;br /&#62;
Good day.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tfcroft4 on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-21290</link>
			<pubDate>Mon, 26 Nov 2012 10:17:14 +0000</pubDate>
			<dc:creator>tfcroft4</dc:creator>
			<guid isPermaLink="false">21290@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Here is an update.&#60;/p&#62;
&#60;p&#62;I now have a 3 unit display i.e. 16x72 running the example matrixshapes.pde on my Olimex OLIMEXINO-STM32 board the Olimex Maple Clone.&#60;/p&#62;
&#60;p&#62;The AdaFruit library above is driving 3 chained Holtek HT1632C display boards.&#60;/p&#62;
&#60;p&#62;I had to play around with the output pins but this works.&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
    #define WR   9   // Olimex WR is CLOCK when writing YELLOW&#60;br /&#62;
    #define DATA 10  // Olimex BLUE&#60;br /&#62;
    #define CS1  11  // Olimex WHITE 1&#60;br /&#62;
    #define CS2  12  // Olimex WHITE 2&#60;br /&#62;
    #define CS3  14  // Olimex WHITE 3&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;I added:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
    #include &#38;lt;stdlib.h&#38;gt;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;to HT1632.h as well to enable the call to malloc
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tfcroft4 on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-21250</link>
			<pubDate>Fri, 23 Nov 2012 13:17:25 +0000</pubDate>
			<dc:creator>tfcroft4</dc:creator>
			<guid isPermaLink="false">21250@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;V&#60;/p&#62;
&#60;p&#62;Thanks for the advice. It is taking my C++ knowledge forward.&#60;/p&#62;
&#60;p&#62;I added&#60;br /&#62;
`HT1632::HT1632() {&#60;br /&#62;
}'&#60;br /&#62;
To the HT1632.h and HT1632.cpp files and the basicdemo.pde now compiles OK with the MAPLE IDE.&#60;/p&#62;
&#60;p&#62;Now to upload the file and test with the display to see if the magic works.&#60;br /&#62;
Cheeers&#60;br /&#62;
TF
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-21248</link>
			<pubDate>Fri, 23 Nov 2012 05:27:24 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">21248@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;C++ wants to call a constructor of HT1632 without parameters upon array initialization, but none is defined. So you may just have to add a definition to the header:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;HT1632::HT1632() {...}&#60;/code&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tfcroft4 on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-21233</link>
			<pubDate>Thu, 22 Nov 2012 19:23:50 +0000</pubDate>
			<dc:creator>tfcroft4</dc:creator>
			<guid isPermaLink="false">21233@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;V&#60;br /&#62;
Thanks for that pointer.&#60;/p&#62;
&#60;p&#62;Allocating as a static array by changing  &#60;/p&#62;
&#60;p&#62;class HT1632LEDMatrix : public Print {&#60;br /&#62;
...&#60;br /&#62;
 private:&#60;br /&#62;
HT1632 *matrices ; to  &#60;/p&#62;
&#60;p&#62;HT1632 matrices[NUM_OF_BOARDS];&#60;br /&#62;
};&#60;br /&#62;
makes some progress.&#60;/p&#62;
&#60;p&#62;However the constructor call (?)&#60;/p&#62;
&#60;p&#62;// use this line for single matrix&#60;br /&#62;
&#60;code&#62;HT1632LEDMatrix matrix = HT1632LEDMatrix(DATA, WR, CS1);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;to&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;HT1632LEDMatrix::HT1632LEDMatrix(uint8  data, uint8  wr, uint8  cs1) {
  matrices[0] = HT1632(data, wr, cs1);
  matrixNum  = 1;
  _width = 24 * matrixNum;
  _height = 16;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;gives this compiler error&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\HT1632.cpp: In constructor 'HT1632LEDMatrix::HT1632LEDMatrix(uint8, uint8, uint8)':&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\HT1632.cpp:7: error: no matching function for call to 'HT1632::HT1632()'&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\/HT1632.h:34: note: candidates are: HT1632::HT1632(int8, int8, int8, int8)&#60;br /&#62;
&#38;lt;BUILD&#38;gt;\/HT1632.h:30: note:                 HT1632::HT1632(const HT1632&#38;amp;)&#60;/p&#62;
&#60;p&#62;HT1632.h line 34 has this definition:&#60;/p&#62;
&#60;p&#62;HT1632(int8 data, int8 wr, int8 cs, int8 rd = -1);&#60;/p&#62;
&#60;p&#62;I would welcome your thoughts.&#60;/p&#62;
&#60;p&#62;TF
&#60;/p&#62;</description>
		</item>
		<item>
			<title>ventosus on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-21232</link>
			<pubDate>Thu, 22 Nov 2012 18:00:41 +0000</pubDate>
			<dc:creator>ventosus</dc:creator>
			<guid isPermaLink="false">21232@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;malloc is part of newlib (C library your code is linked to), so you should be able to use it.&#60;/p&#62;
&#60;p&#62;have you included stdlib.h?&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
#include &#38;lt;stdlib.h&#38;gt;&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;if you don't want to use malloc (which is a good thing on microcontrollers IMHO), allocate the maximal space for 'matrices' statically in your class definition.&#60;/p&#62;
&#60;p&#62;I guess 'matrices' may be defined as a pointer right now:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
class  HT1632LEDMatirx {&#60;br /&#62;
  ...&#60;br /&#62;
  HT1632 *matrices;&#60;br /&#62;
  ...&#60;br /&#62;
};&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;If the maximal number of boards you cascade is 2, then simply change it to a static array:&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
  ...&#60;br /&#62;
  HT1632 matrices[2];&#60;br /&#62;
  ...&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and get rid of the lines with malloc.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>tfcroft4 on "AdaFruit HR1632 16x24 display"</title>
			<link>http://forums.leaflabs.com/topic.php?id=9681#post-21231</link>
			<pubDate>Thu, 22 Nov 2012 16:48:24 +0000</pubDate>
			<dc:creator>tfcroft4</dc:creator>
			<guid isPermaLink="false">21231@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Adafruit have 16x24 LED displays with Ht1632C chip, they supply an Arduino library.&#60;br /&#62;
&#60;a href=&#34;https://github.com/adafruit/HT1632&#34; rel=&#34;nofollow&#34;&#62;https://github.com/adafruit/HT1632&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;The library has the following code to initialise the board - it is possible to cascade a number of boards with different select lines 'cs1' 'cs2' hence the different parameters.&#60;br /&#62;
&#60;code&#62;&#60;br /&#62;
HT1632LEDMatrix::HT1632LEDMatrix(uint8  data, uint8  wr, uint8  cs1) {&#60;br /&#62;
  matrices = (HT1632 *)malloc(sizeof(HT1632));&#60;/p&#62;
&#60;p&#62;  matrices[0] = HT1632(data, wr, cs1);&#60;br /&#62;
  matrixNum  = 1;&#60;br /&#62;
  _width = 24 * matrixNum;&#60;br /&#62;
  _height = 16;&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;HT1632LEDMatrix::HT1632LEDMatrix(uint8  data, uint8  wr,&#60;br /&#62;
				 uint8  cs1, uint8  cs2) {&#60;br /&#62;
  matrices = (HT1632 *)malloc(2 * sizeof(HT1632));&#60;/p&#62;
&#60;p&#62;  matrices[0] = HT1632(data, wr, cs1);&#60;br /&#62;
  matrices[1] = HT1632(data, wr, cs2);&#60;br /&#62;
  matrixNum  = 2;&#60;br /&#62;
  _width = 24 * matrixNum;&#60;br /&#62;
  _height = 16;&#60;br /&#62;
}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;In the Maple environment we don't have malloc. Could any one suggest a work around to initialise the array matrices[] with the HT1632 objects.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Ted
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
