I've found that Arduino code can be written using AI. As a test case, I created the following in a Word document:
Given an Arduino mega and Arduino motor shield
Pins 23, 25, 27, 46, 47, 48 and 49 are inputs
If pin 25 is high, both motors are on
If pin 23 is high, the left motor is on forward and right motor is on reverse
If pin 27 is high the right motor is on forward and left motor is on reverse
If pin 46 or 47 or 48 or 49 is high, both motors are off
What is the Arduino code
I did a query using Google and received workable Arduino code--just had to copy it and paste it into the Arduino space.
Beware that this is not perfect. When I did the same thing for the "find the trashcan, back up, then find the human," I received six pages of code. The code didn't work. For some reason, the second attempt assumed PWMA to use pin 10 instead of pin 3.
Mike Rigsby
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.