Noob question <SOLVED>
jknilinux
Posts: 26
Hello,
I am working on a laptop-based robot, and I would like to interface the propeller to it for sensor/motor control. Could I have a setup where my laptop can just tell the propeller "Have cog 1 loop until this condition, and let me know when it is reached. Now make cog 2 drive both motors forward until I tell it to stop." etc... What possibilities are out of the question? Thanks!
Post Edited (jknilinux) : 3/18/2008 8:58:29 PM GMT
I am working on a laptop-based robot, and I would like to interface the propeller to it for sensor/motor control. Could I have a setup where my laptop can just tell the propeller "Have cog 1 loop until this condition, and let me know when it is reached. Now make cog 2 drive both motors forward until I tell it to stop." etc... What possibilities are out of the question? Thanks!
Post Edited (jknilinux) : 3/18/2008 8:58:29 PM GMT
Comments
How does the Hyperterminal/full duplex serial connection work, and how do I set it up? Or, how do I make the propeller a slave USB device? Sorry, I'm a bit of a noob with microcontrollers. Thanks!
where Serial refers to the FullDuplexSerial object, and GoForward and GoBack are your own routines that do the actual moving.
-Phil
Update: Of course that's Serial.rx, not Serial.getc. So much for memory.
Post Edited (Phil Pilgrim (PhiPi)) : 3/18/2008 6:23:26 PM GMT
The programming USB interface can be used for serial comms because it emulates a serial port at the PC end.
Graham
I should finish my program that is slightly better than hyper terminal for others to use
Thanks for the help, but can anyone give me a quick example or how-to with the full duplex serial object/USB interface?
make sure you have the Fullduplexserial object
This code will work with the default hyperterminal settings.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1010, so be surprised!
How could I make the computer talk to different Cogs, though? Great answers!
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 3/18/2008 7:23:09 PM GMT
-Martin
You have a good point, martin, and I will start small. I was just asking these questions to see if it what I wanted to do was possible, before I buy a whole propeller dev kit. Last question: How hard will it be to do all this? I don't want to be working on communication for two weekends or something. Sorry about the newb questions... Thanks!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I am 1010, so be surprised!
Seriously, it sounds like a worthwhile goal, regardless of the time spent. Besides, if any of us knew ahead of time how much was involved with the projects we do, we probably wouldn't start most of them! Such is life.
Good luck with your project!
-Phil
tell us about your programming skills on PCs. This will help to adjust the level of the answers that were posted here in the forum.
Minimum would be to answer with one o the following choices:
a.) i'm a complete newbie to programming at all on PCs and for microcontrollers
b.) i made some simple programs in a high level language like visual basic, delphi, java
c.) i made quite a lot programs in a high level language like visual basic, delphi, java
d.) i have developed a lot of applications in c/c++ using the windows API but never programmed a serial connection
So make a choice for one of the letters a-d.
Even better would be to answer in complete sentences what kind of programs in which language you made on a PC
It's sure possible to start learning programming with SPIN - the propellerlanguage.
But it will start with lower things than controlling a robot.
Your former questions showed that your understanding of the propeller is not very deep.
That's REALLY REALLY OK. But asking for quick examples for controlling a robot is NOT possible, because this is a quite complex thing.
There are NO QUICK examples for doing that. Except somebody has finished a project and could paste "quickly" his complete sourcecode
which will have hundreds or thousands of commands in summary.
Without a deeper knowledge about programming and the propellerhardware you would be only able to rebuild exact the same robot
loading up the software and maybe making small changes like changing some words showing on a LC-Display
If you ask for specific and concrete details you will get a lot of help here. As long as we (all the other members of the forum) can see
that YOU thought about the last answer and made some steps forward BY YOURSELF and then comes up a new but CONCRETE question
you can ask three times every day and you will get answers.
I guess most of us do not like to write a one week tutorial about programming a robot as ONE PIECE for you.
And even then it would not be clear where your specific problems are. Maybe the tutorial would say a lot of about things you know
very well and things you do not now are short in two sentences. So the best way is if you are asking very CONCRETE questions
best regards
Stefan
I have some experience with C, C++, Java, PBasic, and Assembly, but never used I/O such as serial ports. I certainly never wanted anyone to write a one-week tutorial; when I asked for a small example I meant 5 lines of pseudocode. Sorry about the dumb questions. I know my understanding of the propeller will improve when I get one. Thanks!