Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: MicroWorlds Forum <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Fwd: manipulating text files and serial port communication
From: Rotem Kimchi <rotemk2@xxxxxxxxxxxxxxxx>
Date: Wed, 24 Nov 2010 13:02:22 +0200

Yes I built a robot and I want to communicate with him using ZigBee protocol
through the serial port with logo commands. For now I am using a cable to
burn a programs to the robot using Robotc program but I want to use logo
Pro.

At first I thought I could send logo's commands and then translate
them using the robot uP, but

I think that the command .send in logo cannot send chars only integers am I
correct?

If so I'll send numbers that will represent the commands using the first
bits to described the OPCODE (the command type: fd seth,bk..) or a value,
and after that I’ll send the number that described the command or the value
itself.

As far as the robot it's not a problem to teach him new command words and
make him do what i want him to do.



I created the text file before I knew about the logo ability to use the
serial port and I wanted to take a file that have a singal command and using
a c code in order to translate him to a binary code and send him in the same
way, through the serial port.

You told me "I think using text files is easier... but maybe just because
I've never used serial port communication"

 so i wanted to know how come? , but you probably didn't  understood the all
purpose of the application.


2010/11/24 Daniel Ajoy <da.ajoy@xxxxxxxxx>

> Hi Rotem,
>
> You built an actual robot. How are you currently communicating with it?
> Through the serial port?
>
>
>
> 1.
>>              I tried sending commands with the serial but with no success.
>>              The send command doesn't accept any logo command as an input
>> only numbers...
>>              Maybe I'll represent the commands using numbers in a table of
>> some sort?
>>
>> First command will be   "seth" second will be the value
>>
>
> This sound like a good idea. But only if the robot you built already
> understands those commands.
>
>
> 2.      Instead of using a table I thought of another way using microworlds
>> link library like malloc , db and so on, in order to create in the memory
>> the command I want to send and then to send their address through the
>> port,
>> there the commands are stored in bytes, but there isn't much info in the
>> help file on how to use those commands could you direct my to a better
>> source of information
>>
>
> this options seems like a lot of trouble.
>
>
> 3.      You mentioned that you think working with files his easier how
>> come?
>>
>> With your help I created a data (DB) base of commands but from that DB I
>> still need to translate the command into a binary code
>>
>
> you can send bytes through the serial port. That is what the ".send"
> command does:
>
>
>
> .send :byte
>
> This primitive sends a byte of information to the serial port. It accepts
> an integer between 0 and 255 inclusive as the information to send.
>
>
>
> You can create text files using MicroWorlds, but I don't see how those text
> files will be of any help in controlling your robot. You need to know what
> is it that your robot understands, and how it communicates with it's
> environment.
>
> Daniel
>
>
>

  • Previous by thread: Re: Fwd: manipulating text files and serial port communication
  • Next by thread: Re: Fwd: manipulating text files and serial port communication

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008