<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brick Labs &#187; programming</title>
	<atom:link href="http://brick-labs.com/tag/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://brick-labs.com</link>
	<description>The Source for LEGO Robotics and Educational Materials</description>
	<lastBuildDate>Thu, 10 Nov 2011 11:19:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What Programming Language do I use?</title>
		<link>http://brick-labs.com/reviews/17/what-programming-language-do-i-use/</link>
		<comments>http://brick-labs.com/reviews/17/what-programming-language-do-i-use/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 12:44:51 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[nxt brick]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brick-labs.com/?p=17</guid>
		<description><![CDATA[There are several available languages for programming the LEGO NXT MINDSTORMS brick. You can use C, Java, Lua, Assembly or one of the Graphical languages. Steve Hassenplug has put together a pretty good list of the available languages, and some comparisons between them. You can find the list here: NXT Programming Software]]></description>
			<content:encoded><![CDATA[<p>There are several available languages for programming the LEGO NXT MINDSTORMS brick.  You can use C, Java, Lua, Assembly or one of the Graphical languages.</p>
<p>Steve Hassenplug has put together a pretty good list of the available languages, and some comparisons between them.</p>
<p>You can find the list here: <a href="http://www.teamhassenplug.org/NXT/NXTSoftware.html">NXT Programming Software</a></p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/reviews/17/what-programming-language-do-i-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robot Programming Roundup &#8211; August Edition</title>
		<link>http://brick-labs.com/news/244/robot-programming-roundup-august-edition/</link>
		<comments>http://brick-labs.com/news/244/robot-programming-roundup-august-edition/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 14:53:11 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>

		<guid isPermaLink="false">http://brick-labs.com/news/244/robot-programming-roundup-august-edition/</guid>
		<description><![CDATA[Some neat bits about RobotC 1) Convert Ringtones to RobotC code http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html 2) Using a temperature sensor… has some great tips http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html 3) Arduino Alternative? http://mightor.wordpress.com/2010/06/24/the-new-arduino-alternative/]]></description>
			<content:encoded><![CDATA[<p>Some neat bits about RobotC</p>
<p>1) Convert Ringtones to RobotC code</p>
<p><a title="http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html" href="http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html">http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html</a></p>
<p>2) Using a temperature sensor… has some great tips</p>
<p><a title="http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html" href="http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html">http://tinkernology.blogspot.com/2010/07/ringtone-converter-for-robotc.html</a></p>
<p>3) Arduino Alternative?</p>
<p><a title="http://mightor.wordpress.com/2010/06/24/the-new-arduino-alternative/" href="http://mightor.wordpress.com/2010/06/24/the-new-arduino-alternative/">http://mightor.wordpress.com/2010/06/24/the-new-arduino-alternative/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/news/244/robot-programming-roundup-august-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Released: 3rd Party ROBOTC Driver Suite V1.4</title>
		<link>http://brick-labs.com/news/237/released-3rd-party-robotc-driver-suite-v1-4/</link>
		<comments>http://brick-labs.com/news/237/released-3rd-party-robotc-driver-suite-v1-4/#comments</comments>
		<pubDate>Wed, 12 May 2010 00:22:12 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[HiTechnic]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>
		<category><![CDATA[RobotC Driver Suite]]></category>

		<guid isPermaLink="false">http://brick-labs.com/?p=237</guid>
		<description><![CDATA[v1.4 of the RobotC Driver Suite has been released. You can download it here: RobotC Driver Suite v1.4 Details of the release are found here at Xanders Blog. I&#8217;m in the processing of trying it out, and working my way through some RobotC samples. Especially for using the HiTechnic Experimenters board.]]></description>
			<content:encoded><![CDATA[<p>v1.4 of the RobotC Driver Suite has been released.  You can download it here:  <a href="http://rdpartyrobotcdr.sourceforge.net/">RobotC Driver Suite v1.4</a></p>
<p>Details of the release are found here at <a href="http://mightor.wordpress.com/2010/05/11/released-3rd-party-robotc-driver-suite-v1-4/">Xanders Blog</a>.  </p>
<p>I&#8217;m in the processing of trying it out, and working my way through some RobotC samples.  Especially for using the HiTechnic Experimenters board.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/news/237/released-3rd-party-robotc-driver-suite-v1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimenters Kit &#8211; RobotC Example 3</title>
		<link>http://brick-labs.com/tutorials/236/experimenters-kit-robotc-example-3/</link>
		<comments>http://brick-labs.com/tutorials/236/experimenters-kit-robotc-example-3/#comments</comments>
		<pubDate>Wed, 05 May 2010 02:47:33 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>

		<guid isPermaLink="false">http://brick-labs.com/tutorials/236/experimenters-kit-robotc-example-3/</guid>
		<description><![CDATA[This example takes the project from Example 2, and replaces the potentiometer with a sound sensor from LEGO. Here is the project (same exact one from the prior example). And here is the robot with the attached sound sensor.&#160; Please note… I’ve only put the sound sensor in this location since the robot isn’t actually [...]]]></description>
			<content:encoded><![CDATA[<p>This example takes the project from <a href="http://brick-labs.com/tutorials/231/experimenters-kit-robotc-example-2/">Example 2</a>, and replaces the potentiometer with a sound sensor from LEGO.</p>
<p>Here is the project (same exact one from the prior example).</p>
<p><a href="http://brick-labs.com/wp-content/uploads/2010/05/ExperimentsKitProject21.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Experiments-Kit-Project-2" border="0" alt="Experiments-Kit-Project-2" src="http://brick-labs.com/wp-content/uploads/2010/05/ExperimentsKitProject2_thumb1.png" width="244" height="184" /></a></p>
<p>And here is the robot with the attached sound sensor.&#160; Please note… I’ve only put the sound sensor in this location since the robot isn’t actually driving.&#160; If it was going to be driving, I’d probably not bother with the sound sensor.&#160; They are notorious for picking up the sound of the motors.</p>
<p><a href="http://brick-labs.com/wp-content/uploads/2010/05/JenToosound.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="JenToo-sound" border="0" alt="JenToo-sound" src="http://brick-labs.com/wp-content/uploads/2010/05/JenToosound_thumb.png" width="184" height="244" /></a>This time, everything worked perfect.&#160; The LEDs almost pulse in time to your speaking, which is a neat effect.</p>
<p>My son came in to see what was going on.&#160; He near broke my eardrum trying to get a nice loud noise to spike the LEDs.&#160; <em>Loud claps less than 6 inches from your ear tend to hurt.</em></p>
<p>This project was a very simple one.&#160; I didn’t have to do any debugging or tweaking, since it just worked.</p>
<p>Example 5 deals with a home-made light sensor.&#160; Should be a good project for tomorrow.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/tutorials/236/experimenters-kit-robotc-example-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experimenters Kit &#8211; RobotC Example 2</title>
		<link>http://brick-labs.com/tutorials/231/experimenters-kit-robotc-example-2/</link>
		<comments>http://brick-labs.com/tutorials/231/experimenters-kit-robotc-example-2/#comments</comments>
		<pubDate>Wed, 05 May 2010 02:38:10 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>

		<guid isPermaLink="false">http://brick-labs.com/tutorials/231/experimenters-kit-robotc-example-2/</guid>
		<description><![CDATA[The second example in the Experimenters Kit takes 6 LEDs (2 green, 4 red) and a potentiometer. Depending on the value you turn the potentiometer to, a different LED lights up. Here is the 2nd project (completed).&#160; The 4 LEDs are there.&#160; The Experimenters kit ships with 2 Green and 4 Red LEDs.&#160; So that’s [...]]]></description>
			<content:encoded><![CDATA[<p>The second example in the Experimenters Kit takes 6 LEDs (2 green, 4 red) and a potentiometer.</p>
<p>Depending on the value you turn the potentiometer to, a different LED lights up.</p>
<p><a href="http://brick-labs.com/wp-content/uploads/2010/05/ExperimentsKitProject2.png"><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="Experiments-Kit-Project-2" border="0" alt="Experiments-Kit-Project-2" src="http://brick-labs.com/wp-content/uploads/2010/05/ExperimentsKitProject2_thumb.png" width="244" height="184" /></a> </p>
<p>Here is the 2nd project (completed).&#160; The 4 LEDs are there.&#160; The Experimenters kit ships with 2 Green and 4 Red LEDs.&#160; So that’s why I have mixed colors.   <br />The blue piece (above the first green LED) is the potentiometer.&#160; You’ll want to use a small screwdriver to turn it.&#160; It’s a fairly precise pot.&#160; There are also 6 resistors (identical in value).&#160; One for each LED.</p>
<p><a href="http://brick-labs.com/wp-content/uploads/2010/05/JenToo.png"><img style="border-bottom: 0px; border-left: 0px; margin: 0px 10px 0px 0px; display: inline; border-top: 0px; border-right: 0px" title="JenToo" border="0" alt="JenToo" align="left" src="http://brick-labs.com/wp-content/uploads/2010/05/JenToo_thumb.png" width="184" height="244" /></a>BTW, here is the robot I used for these projects.&#160; I know Brian will recognize it.&#160; All three of my NXT’s were in use, so I just grabbed one to use.</p>
<p>I started playing with this one once it was built.&#160; It seemed to work right off… except for one thing.&#160; The last LED on the right never lit up.</p>
<p>So, I started debugging.&#160; The NXT display shows the value of the pot at any given time.&#160; So I started matching numbers up to what was in the code.</p>
<p>The last LED should light up if the value of the pot exceeds 511.&#160; However, the pot never exceeds 511.&#160; The highest I was seeing was like 508 or so.&#160; Then it looped around into the negative.</p>
<p>So, I changed the code to make the last LED light up after 325.&#160; And everything worked beautifully.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/tutorials/231/experimenters-kit-robotc-example-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RobotC &#8211; Mini Tutorial #1 &#8211; Displaying Battery Power</title>
		<link>http://brick-labs.com/tutorials/226/robotc-mini-tutorial-1-displaying-battery-power/</link>
		<comments>http://brick-labs.com/tutorials/226/robotc-mini-tutorial-1-displaying-battery-power/#comments</comments>
		<pubDate>Wed, 05 May 2010 02:25:43 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[nxt brick]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>

		<guid isPermaLink="false">http://brick-labs.com/tutorials/226/robotc-mini-tutorial-1-displaying-battery-power/</guid>
		<description><![CDATA[Today, while trying to debug the Example 1 from the Experimenters kit, I thought I might be having battery issues.&#160; So I wanted to see what the battery level was. Being new to RobotC, I figured this might be a fun little mini-project (and I do mean mini) to tackle. So, first thing I did, [...]]]></description>
			<content:encoded><![CDATA[<p>Today, while trying to debug the <a href="http://brick-labs.com/tutorials/225/experimenters-kit-robotc-example-1/">Example 1 from the Experimenters kit</a>, I thought I might be having battery issues.&#160; So I wanted to see what the battery level was.</p>
<p>Being new to RobotC, I figured this might be a fun little mini-project (and I do mean mini) to tackle.</p>
<p>So, first thing I did, was start checking the functions and such in RobotC.&#160; I found a neat value you can read.</p>
<p>nImmediateBatteryLevel </p>
<p>It returns an integer of the battery level.&#160; If your battery level was 7.499, then this value returns 7499.</p>
<p>So I copied a line of code to display this value on the NXT, like this below:</p>
<p> nxtDisplayTextLine(1, &quot;%d&quot;, nImmediateBatteryLevel); </p>
<p>Perfect!&#160; But wasn’t quite satisfied.&#160; I wanted to display this on the NXT with the decimal.&#160; And a bit of text so I knew what the value was.</p>
<p>Well, with a bit of math, you can divide a integer by a factor of 10 to get a decimal.&#160; Since I wanted 3 decimal places, I divided by 1000.&#160; In order to do the division, you need to convert (or cast) the integer to a float.&#160; So that&#8217;s where the (float) code comes in. I also found you can include plain text in the <strong>nxtDisplayTextLine()</strong> function, and it will display that.</p>
<p>So here is what I came up with.</p>
<p>nxtDisplayTextLine(1, &quot;Battery: %.3f&quot;, (float)nImmediateBatteryLevel / 1000);</p>
<p>That code puts the word &quot;Battery: 7.499&quot; on Line 1 of the NXT screen.&#160; The 7.499 is the actual battery value.&#160; The %.3f means I want a value with 3 decimal places, of type Float.</p>
<p>For those of you with a C background, this is common knowledge.&#160; For those with a Basic background, type conversions are usually automatically done for you.&#160; In RobotC, you have to be explicit about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/tutorials/226/robotc-mini-tutorial-1-displaying-battery-power/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LEGO Mindstorms and RobotC</title>
		<link>http://brick-labs.com/general/219/lego-mindstorms-and-robotc/</link>
		<comments>http://brick-labs.com/general/219/lego-mindstorms-and-robotc/#comments</comments>
		<pubDate>Mon, 03 May 2010 23:49:59 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[NXT]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>

		<guid isPermaLink="false">http://brick-labs.com/general/219/lego-mindstorms-and-robotc/</guid>
		<description><![CDATA[I recently downloaded the 30 day trial of RobotC.&#160; I’m a programmer by trade (mostly in the .NET languages) and the NXT-G graphical interface has always bugged me.&#160; For me, it’s very foreign, since I’m used to a text based programming language. My other choice that I looked at was leJOS.&#160; But I’m not much [...]]]></description>
			<content:encoded><![CDATA[<p>I recently downloaded the 30 day trial of RobotC.&#160; </p>
<p>I’m a programmer by trade (mostly in the .NET languages) and the NXT-G graphical interface has always bugged me.&#160; For me, it’s very foreign, since I’m used to a text based programming language.</p>
<p>My other choice that I looked at was leJOS.&#160; But I’m not much of a Java guy… so I went the C route.</p>
<p>First impressions?&#160; I’m liking it.</p>
<p>The IDE is pretty nice.&#160;&#160; Has some decent features and works well.&#160; Not as robust as Visual Studio .NET 2010, but that’s asking a bit much, right?</p>
<p>I like the debugging interaction.&#160; I can step through my code as it runs.&#160; Check variables, etc.&#160; And, I can do this with Bluetooth or USB.</p>
<p>I plan on buying the full version soon, since my 30 days has about 2 weeks left.</p>
<p>Another nice feature, is that the firmware is similar in functionality on the Brick.&#160; That means my son can run the applications already on the brick, and not have to worry about learning a new system.</p>
<p>Right now, I’m still learning… and looking for some good RobotC tutorials.&#160; Haven’t found many yet.&#160; Maybe I’ll have to start posting some samples.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/general/219/lego-mindstorms-and-robotc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>RobotC &#8211; Tutorials and Drivers</title>
		<link>http://brick-labs.com/languages/146/robotc-tutorials-and-drivers/</link>
		<comments>http://brick-labs.com/languages/146/robotc-tutorials-and-drivers/#comments</comments>
		<pubDate>Fri, 15 May 2009 11:55:19 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Languages]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RobotC]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://brick-labs.com/languages/146/robotc-tutorials-and-drivers/</guid>
		<description><![CDATA[Xander over at “I’d Rather Be Building Robots” has posted a few links recently. The first is for a great RobotC tutorial written by professor Albert Schueller from Whitmore College.&#160; You can read Xander’s post here, or download the RobotC Tutorial PDF directly. Xander also writes drivers for RobotC.&#160; He’s recently updated his project page, [...]]]></description>
			<content:encoded><![CDATA[<p>Xander over at “I’d Rather Be Building Robots” has posted a few links recently.</p>
<p>The first is for a great RobotC tutorial written by professor <a href="http://carrot.whitman.edu/">Albert Schueller</a> from Whitmore College.&#160; You can read <a href="http://mightor.wordpress.com/2009/05/14/robotc-tutorial/" target="_blank">Xander’s post here</a>, or download the <a href="http://carrot.whitman.edu/Robots/notes.pdf" target="_blank">RobotC Tutorial PDF</a> directly.</p>
<p>Xander also writes drivers for RobotC.&#160; He’s recently updated his project page, to show the new drivers and what they cover.&#160; You can see the <a href="http://rdpartyrobotcdr.sourceforge.net/" target="_blank">RobotC Drivers here</a>.</p>
<p>And, if you are interested in using RobotC, you can purchase a license, or read more on the official <a href="http://www.robotc.net/" target="_blank">RobotC website</a>.&#160; They do have a 30 day trial.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/languages/146/robotc-tutorials-and-drivers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NXT++ &#8211; A new programming language to control the NXT</title>
		<link>http://brick-labs.com/languages/49/nxt-a-new-programming-language-to-control-the-nxt/</link>
		<comments>http://brick-labs.com/languages/49/nxt-a-new-programming-language-to-control-the-nxt/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 13:14:53 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Languages]]></category>
		<category><![CDATA[NXT]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://brick-labs.com/languages/49/nxt-a-new-programming-language-to-control-the-nxt/</guid>
		<description><![CDATA[Cory Walker has developed a new set of libraries for working with your NXT from a C++ program.&#160; He calls it NXT++. NXT++ is an interface written in C++ that allows the control LEGO MINDSTORMS robots directly through USB or Bluetooth connections. The interface is intended to be simple and easy to use. The code [...]]]></description>
			<content:encoded><![CDATA[<p>Cory Walker has developed a new set of libraries for working with your NXT from a C++ program.&#160; He calls it NXT++.</p>
<blockquote><p>NXT++ is an interface written in C++ that allows the control LEGO MINDSTORMS robots directly through USB or Bluetooth connections. The interface is intended to be simple and easy to use. The code can be used in any C++ program.</p>
</blockquote>
<p>Remember! This isn&#8217;t a replacement language for running on the NXT brick itself.&#160; It&#8217;s a means of controlling the brick from USB or Bluetooth.</p>
<p>You can download the project from the <a href="http://nxtpp.sourceforge.net/doc.php">NXT++ SourceForge website</a>.&#160; And there are some tutorials available in the <a href="http://nxtpp.wetter61169.de/mediawiki-1.6.9/index.php/Tutorials">NXT++ Wiki</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://brick-labs.com/languages/49/nxt-a-new-programming-language-to-control-the-nxt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

