<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Learning Mbed (Blog #6)</title><link>/challenges-projects/design-challenges/connected-cloud-challenge-with-cypress-and-aws-iot/b/blog/posts/learning-mbed-blog-6</link><description>Learning Mbed To get started with Mbed I began programming a non-trivial but not complex LED library. The Pioneer PSOC6 board contains 3 user programmable LEDs: an RGB LED, an orange LED and a red LED. The source code runs 2 threads: ...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Learning Mbed (Blog #6)</title><link>https://community.element14.com/challenges-projects/design-challenges/connected-cloud-challenge-with-cypress-and-aws-iot/b/blog/posts/learning-mbed-blog-6</link><pubDate>Wed, 20 May 2020 09:44:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:5e2d86e4-72f4-46d9-89c8-30bf230588d1</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;I&amp;#39;m checking why you have to static cast here. I&amp;#39;ve been porting the MBED Digitalxxx classes to another platform - requiring static casting points to something sometimes is odd....(it&amp;#39;s equivalent to typecasting in C, but in C++ often a sign that a class is used differently than intended).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;oo musings:&lt;/p&gt;&lt;p&gt;As an oo fanboy, I would put the 5 LEDs in a container (an array would work) and have an iterator walk over them instead of the for... Loop.&lt;/p&gt;&lt;p&gt;And have the properties as LED class members instead of a parallel external array,&lt;/p&gt;&lt;p&gt;and have the iterator call a method of the LED class do the right thing for the properties applicable to that very led.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9249&amp;AppID=253&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>