I have an idea for a small little four wheeled bot powered by an Arduino. I'd like to be able to get the bot to follow a simple set of instructions that I upload to it in a text file either by USB or bluetooth. Some commands like, LEFT, STOP, RIGHT, etc.
What would be the best way to approach this? Can arbitrary strings be sent to the Arduino whilst it's running that it could then execute?
The point of this is to teach simple programming to my daughter.
You can easily send data to an Arduino from a PC either using the USB cable or, perhaps, using Bluetooth with a suitable Bluetooth module attached to the Arduino.
Have a look at Serial Input Basics - the technique in the 3rd example will be the most reliable.
If you want to store a lot of movements in the Arduino's limited memory I suggest you abbreviate the commands to a single letter - e.g. L, S, R. That also simplifies the Arduino code to figure out what to do.
Another way is to connect via a Bluetooth smartphone app to the Bluetooth module and Arduino on the robot. The instructions on https://play.google.com/store/apps/details?id=braulio.calle.bluetoothRCcontroller&hl=en
The instructions are good, and he has several related apps, one of those has proportional steering. I tried it, and the robot received left, right, forward and back commands very well.
Robin2:
You can easily send data to an Arduino from a PC either using the USB cable or, perhaps, using Bluetooth with a suitable Bluetooth module attached to the Arduino.
Have a look at Serial Input Basics - the technique in the 3rd example will be the most reliable.
If you want to store a lot of movements in the Arduino's limited memory I suggest you abbreviate the commands to a single letter - e.g. L, S, R. That also simplifies the Arduino code to figure out what to do.
...R
Thank you, that is a very helpful and clear post and a great starting point for me. Much appreciated.