getting arduino to learn

Hello,

I have built a robot using arduino and L293D Motor shield, i have also coded a small program for windows in processing 2.2 that sends serial data to the arduino (forward,backwards,left and right) to control it. i would like to know how would i go about getting the arduino to record the sent data and play it back so it moves autonomously, any ideas on where to start?

thanks

Hmmm...

I think memory is gonna be an issue... Maybe look into sdcard interface...

I suspect @Qdeathstar meant "SD Card"

How many steps do you want to record ? How many bytes are there in the data for each step ? - post an example.

...R

Robin2:
I suspect @Qdeathstar meant “SD Card”

How many steps do you want to record ?
How many bytes are there in the data for each step ? - post an example.

…R

im not to sure but i am using myPort.write(‘W’); to send the data, i have little experience with sending data

How many steps do you want to record? Ten or a thousand?

How long do you want the Arduino to remember? Until the power is switched off or 'forever until I change it'?

MorganS: How many steps do you want to record? Ten or a thousand?

How long do you want the Arduino to remember? Until the power is switched off or 'forever until I change it'?

probably around about five just to start off with and last about 10 seconds

"10 seconds" is not the sort of answer I was expecting. You want to have a sequence of commands stored on the Arduino and it takes maybe 10 seconds to carry out those commands?

How does it know when to start? Do you push a button or send a different command from Processing?

Does it repeat forever; is there a command to stop or does it only carry out the sequence once when commanded?

Once it has stopped, is that sequence finished and forgotten or do you expect to pres 'start' again to re-do the sequence? If you unplug the batteries, is it OK for the sequence to be forgotten?

These may seem like incredibly invasive questions but when you're programming a computer you need to tell it what to do in excruciating detail.

Not that Morgan needs reassuring, but to the OP: Morgan is asking relevant questions that will need to be answered, and the more we know the faster we can get your project up and running :)

10s is something the arduino will deal with and is outside of the scope of your query... Hrrrrm, unless you also plan to send timing information along with directions? Do u plan on encoding velocity/time in your signals or is it this hardcoded in the bot?

Have you thought about the data protocol? Are you going to make your own, do you have one in mind or are you here asking about that?

Sounds scary, and its easy to get bogged down with technical terms but once you've made one you'll be like ' what's all the fuss about'. :)

Beware, there will be different opinions as to how to best make a protocol :)

ryisnelly10:
probably around about five just to start off with and last about 10 seconds

Maybe you can give us a sample of the data that your PC is sending to the Arduino over a short period of time.

I don’t know what you mean by “10 seconds”. I suspect you don’t mean the time you want your robot to operate because that is a very short time. But I can’t imagine what you do mean.

…R