<?xml version="1.0" encoding="ISO-8859-1" ?><rss version="2.0">
<channel>
    <title>RoboRealm Forum</title>
    <link>http://www.RoboRealm.com/</link>
    <description>The newest forum threads.</description>
    <lastBuildDate>Tue, 30 Nov 1999 00:11:00 EST</lastBuildDate>
    <language>en-us</language>
    <copyright>Copyright: (C) RoboRealm, http://www.RoboRealm.com/</copyright>
    <docs>http://www.RoboRealm.com/</docs>

    <item>
        <title>No Title</title>
        <description>
        If I understand your question/comment, you desire to integrate your Ultrasonic range finder code to the Mega module. You can add an additional array of range data to the existing Mega data stream. Perhaps 2 more bytes representing the sensor bearing and range. The receiving software must parse out the data for display in addition to any collision avoidance scheme you may plan if incorporating the sensor in a robot. I have done a similar concept with a range sensor, Arduino, and Visual Basic. You can view this on my YouTube Channel.&lt;br&gt;&lt;a href=&quot;http://www.youtube.com/watch?v=sfBOC980KYA&amp;context=C3d9cd65ADOEgsToPDskLKccf1j8tb2lK_1qgeYpqD&quot; target=&quot;_blank&quot;&gt;http://www.youtube.com/&lt;wbr&gt;watch?v=sfBOC980KYA&amp;context=C3d9cd65ADOEgsToPDskLKccf1j8tb2lK_&lt;wbr&gt;1qgeYpqD&lt;/a&gt;&lt;br&gt;&lt;br&gt;If I missed your point, please provide clarification. &lt;br&gt;&lt;br&gt;Good luck!&lt;br&gt;Doyle&lt;br&gt;        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4320</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4320</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
    <item>
        <title>Arduino Module Combined with User Code</title>
        <description>
        Steven-&lt;br&gt;&lt;br&gt;The Arduino module works great for my project.&amp;nbsp;&amp;nbsp;I just have one problem with it.&amp;nbsp;&amp;nbsp;I am using an ultrasonic sensor that needs special code on the Arduino Mega to output the distance.&amp;nbsp;&amp;nbsp;This code is:&lt;br&gt;**************************************&lt;br&gt;const int pingPin = 8;//output cable&lt;br&gt;const int inputPin = 31;//input cable&lt;br&gt;&lt;br&gt;&lt;br&gt;void setup() {&lt;br&gt;&amp;nbsp;&amp;nbsp;// initialize serial communication:&lt;br&gt;&amp;nbsp;&amp;nbsp;Serial.begin(9600);&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;}&lt;br&gt;&lt;br&gt;void loop()&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;long duration, inches, cm;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt;&amp;nbsp;&amp;nbsp;pinMode(inputPin, OUTPUT);&lt;br&gt;&amp;nbsp;&amp;nbsp;digitalWrite(inputPin, LOW);&lt;br&gt;&amp;nbsp;&amp;nbsp;delayMicroseconds(2);&lt;br&gt;&amp;nbsp;&amp;nbsp;digitalWrite(inputPin, HIGH);&lt;br&gt;&amp;nbsp;&amp;nbsp;delayMicroseconds(5);&lt;br&gt;&amp;nbsp;&amp;nbsp;digitalWrite(inputPin, LOW);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;/&lt;br&gt;&amp;nbsp;&amp;nbsp;pinMode(pingPin, INPUT);&lt;br&gt;&amp;nbsp;&amp;nbsp;duration = pulseIn(pingPin, HIGH);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;// convert the time into a distance&lt;br&gt;&amp;nbsp;&amp;nbsp;inches = microsecondsToInches(duration);&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&lt;br&gt; Serial.print(inches);&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Serial.println();&lt;br&gt;&amp;nbsp;&amp;nbsp; delay(100);&lt;br&gt;}&lt;br&gt;&lt;br&gt;long microsecondsToInches(long microseconds)&lt;br&gt;{&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return microseconds / 74 / 2;&lt;br&gt;}&lt;br&gt;*************************************&lt;br&gt;&lt;br&gt;I am unsure how to combine this code with the RoboRealm Mega Sketch.&lt;br&gt;&lt;br&gt;Or to be more broad, is there any way a user can add their own custom code to the Mega Sketch and have it implemented in the Mega Module? i.e. combining the MCU Communicator and Arduino Mega modules?&lt;br&gt;&lt;br&gt;Thanks a lot,&lt;br&gt;&lt;br&gt;-Carl H.        </description>
        <link>http://www.roborealm.com/forum/index.php?thread_id=4320</link>
        <guid>http://www.roborealm.com/forum/index.php?thread_id=4320</guid>
        <pubDate>Tue, 30 Nov 1999 00:11:00 EST</pubDate>
    </item>
</channel>
</rss>
