Go Down

Topic: Arduino robot controlled by PC  (Read 303 times) previous topic - next topic

EDOURDOT1406

Jun 17, 2019, 03:10 am Last Edit: Jun 17, 2019, 03:21 am by EDOURDOT1406
I have one of these

https://www.amazon.com/ELEGOO-Tracking-Ultrasonic-Intelligent-Educational/dp/B07KPZ8RSZ/ref=sr_1_2_sspa?keywords=elegoo+robot&qid=1560733517&s=gateway&sr=8-2-spons&psc=1

I want to be able to control (forward, backward, and turn left and right)  using the wasd keys on my PC.

Can anyone help?

Thanks in advance.

Paul_KD7HB

I have one of these

https://www.amazon.com/ELEGOO-Tracking-Ultrasonic-Intelligent-Educational/dp/B07KPZ8RSZ/ref=sr_1_2_sspa?keywords=elegoo+robot&qid=1560733517&s=gateway&sr=8-2-spons&psc=1

I want to be able to control (forward, backward, and turn left and right)  using the wasd keys on my PC.

Can anyone help?

Thanks in advance.
Most likely you will have to use the serial port on the Arduino and one on your PC to communicate. Are you up to adding that?

Paul

Robin2

You could probably use another Arduino (connected to your PC) to send appropriate IR signals to the robot.

There is an Arduino library that can generate the IR signals for different hand control units.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

moShellShocker

I want to be able to control (forward, backward, and turn left and right)  using the wasd keys on my PC.
I did exactly that using Pololu Wixels: basically just wireless usb.

The PC-end Wixel was plugged into the pc's usb, and it just wirelessly broadcasts whatever would normally go out the usb. If I recall correctly, I used the serial monitor and/or PuTTY to do that.

The Arduino-end Wixel was on a soft serial port, and just read the incoming characters from the other Wixel.

Get it working with a cable first, through the hardware Serial on the Arduino, then if you change to Wixels just change the code to read software serial.

(Wixels are a bit expensive, in my opinion, especially since you need two, and there may be other cheaper ways, but it was dead simple to implement.)

moShellShocker

PS if you do go the Wixel route, they are quite intelligent. If you configure them both in what they call serial_mode 0, they work correctly according to the way they are powered. So the PC one, which is powered by the usb port, automatically operates in usb to radio mode. The Arduino one, powered through the Wixel's Vin pin, automatically operates in its uart to radio mode. (Although you can over-ride that by explicitly setting a serial_mode other than 0; I have never needed to do that.)

There's also a downloadable configuration utility, to set eg that serial_mode. Great manual too.

Just a tad expensive I think, as I said.


EDOURDOT1406

Most likely you will have to use the serial port on the Arduino and one on your PC to communicate. Are you up to adding that?

Paul
Do you mean the usb?  I will probably do that so I don't have to buy anything else. Also what would the code look like I am very new to Arduino and coding in general for that matter

Robin2

Also what would the code look like I am very new to Arduino and coding in general for that matter
If you are planning to use the WASD keys on your PC then I would send 'W' to the Arduino when the key is pressed and 'w' (lower case) when it is released and the equivalent for the other keys.

...R
Serial Input Basics - simple reliable ways to receive data.
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up