Elegoo Smartcar v4 #12
Unanswered
antonioastro
asked this question in
Q&A
Replies: 1 comment
-
sorry for my late response but i was inactive for the last few months. I didnt mainntain this project for a year and i never tried it out with a v4. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to use the Elegoo SmartCar Shield v1.1 to control the Smartcar v4 (this all came as one package). I am attempting to code this entirely myself using an official Arduino Uno R3, given that the Arduino clone provided uses the CH340 chip and I haven't had much luck getting this working. Nor does their code online appear to work.
As an initial attempt, I have found your library and am trying to simply get it to control a motor to move forward, using your examples.
My code is as follows:
``
#include <Elegoo.h>
String version(4);
elegoo car(version);
void setup() {
// put your setup code here, to run once:
car.init();
}
void loop() {
// put your main code here, to run repeatedly:
car.forward();
}
``
Unfortunately this returns the error "Compilation error: 'class elegoo' has no member named 'init'; did you mean 'in1'?".
I have looked in the file elegoo.h and notice that there is no function named "init", though keywords.txt does contain INIT as a named function. Your README also mentions the need for car.init() to initialise the library. Upon removing this line, the code compiles with no action from the motors.
The shield uses the motor controller TB6612FNG, though I also notice your documentation suggests use of the L298N H-Bridge.
If you have any suggestions, please help.
Beta Was this translation helpful? Give feedback.
All reactions