Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call me stupid..... But
11-07-2018, 04:11 AM
Post: #1
Call me stupid..... But
I'm really feeling that way. (Ref subject line)

Arduino, the easy to learn simple code, right? hmmm.

Okay, I'm not a happy camper at this point, that's clear.

BRobot printed, all goes well.

I try getting the Arduino code all together. Nothing successfully verifiable. My solution? I contact JJRobots and purchase the Arduino Leonardo board from them supposedly preloaded with the Arduino code needed to run it.

I also purchase the proper shield board for control of the stepper motors and arm servo from JJRobots. Add 1 MPU 6070 and 2 A4988 for the stepper motors and I should be ready to go, right?

I'm not totally convinced JJRobots actually loaded the code into my purchased Leonardo. Why? All my attempts to run the BRobot can muster up is a wave of the servo arm as the Leonard boots? (Can't say I'm sure what's happening there.

Okay, so is the code isn't in the Leonardo why don't I just load it in myself? Errors, no matter what I try, errors. Here's what I copied from the attempted Arduino verify. (Leonard board set in tools menu.)

Arduino: 1.8.7 (Windows 7), Board: "Arduino Leonardo"

C:\Users\Recycled Roadkill\AppData\Loca\Temp\Temp2_BROBOT_EVO2_17.zip\BROBOT_EVO2_17\BROBOT_EVO2_1​7.ino: In function 'void setup()':

BROBOT_EVO2_17:211:12: error: 'OSC_init' was not declared in this scope

OSC_init();

^

BROBOT_EVO2_17:225:17: error: 'MPU6050_setup' was not declared in this scope

MPU6050_setup(); // setup MPU6050 IMU

^

BROBOT_EVO2_17:233:31: error: 'ESPsendCommand' was not declared in this scope

ESPsendCommand("AT", "OK", 1);

^

BROBOT_EVO2_17:235:21: error: 'ESPwait' was not declared in this scope

ESPwait("ready", 6);

^

BROBOT_EVO2_17:257:13: error: 'ESPgetMac' was not declared in this scope

ESPgetMac();

^

C:\Users\Chiller2000\AppData\Local\Temp\Temp2_BROBOT_EVO2_17.zip\BROBOT_EVO2_17\​BROBOT_EVO2_17.ino:264:16: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

char *cmd = "AT+CWSAP=\"JJROBOTS_XX\",\"87654321\",5,3";

^

BROBOT_EVO2_17:283:21: error: 'MPU6050_calibrate' was not declared in this scope

MPU6050_calibrate();

^

BROBOT_EVO2_17:289:20: error: 'BROBOT_initServo' was not declared in this scope

BROBOT_initServo();

^

BROBOT_EVO2_17:290:37: error: 'BROBOT_moveServo1' was not declared in this scope

BROBOT_moveServo1(SERVO_AUX_NEUTRO);

^

BROBOT_EVO2_17:320:22: error: 'setMotorSpeedM1' was not declared in this scope

setMotorSpeedM1(5);

^

BROBOT_EVO2_17:321:22: error: 'setMotorSpeedM2' was not declared in this scope

setMotorSpeedM2(5);

^

BROBOT_EVO2_17:332:41: error: 'BROBOT_readBattery' was not declared in this scope

BatteryValue = BROBOT_readBattery(true);

^

C:\Users\Chiller2000\AppData\Local\Temp\Temp2_BROBOT_EVO2_17.zip\BROBOT_EVO2_17\​BROBOT_EVO2_17.ino: In function 'void loop()':

BROBOT_EVO2_17:345:15: error: 'OSC_MsgRead' was not declared in this scope

OSC_MsgRead(); // Read UDP OSC messages

^

BROBOT_EVO2_17:408:29: error: 'readControlParameters' was not declared in this scope

readControlParameters();

^

BROBOT_EVO2_17:420:23: error: 'MPU6050_newData' was not declared in this scope

if (MPU6050_newData())

^

BROBOT_EVO2_17:422:24: error: 'MPU6050_read_3axis' was not declared in this scope

MPU6050_read_3axis();

^

BROBOT_EVO2_17:434:41: error: 'MPU6050_getAngle' was not declared in this scope

angle_adjusted = MPU6050_getAngle(dt) + ANGLE_OFFSET;

^

BROBOT_EVO2_17:463:100: error: 'positionPDControl3' was not declared in this scope

motor1_control = positionPDControl3(steps1, target_steps1, Kp_position, Kd_position, speed_M1);

^

BROBOT_EVO2_17:479:89: error: 'speedPIControl' was not declared in this scope

target_angle = speedPIControl(dt, estimated_speed_filtered, throttle, Kp_thr, Ki_thr);

^

BROBOT_EVO2_17:494:82: error: 'stabilityPDControl' was not declared in this scope

control_output += stabilityPDControl(dt, angle_adjusted, target_angle, Kp, Kd);

^

BROBOT_EVO2_17:515:29: error: 'setMotorSpeedM1' was not declared in this scope

setMotorSpeedM1(motor1);

^

BROBOT_EVO2_17:516:29: error: 'setMotorSpeedM2' was not declared in this scope

setMotorSpeedM2(motor2);

^

BROBOT_EVO2_17:521:24: error: 'setMotorSpeedM1' was not declared in this scope

setMotorSpeedM1(0);

^

BROBOT_EVO2_17:522:24: error: 'setMotorSpeedM2' was not declared in this scope

setMotorSpeedM2(0);

^

BROBOT_EVO2_17:537:47: error: 'BROBOT_moveServo1' was not declared in this scope

BROBOT_moveServo1(SERVO_MIN_PULSEWIDTH);

^

BROBOT_EVO2_17:539:47: error: 'BROBOT_moveServo1' was not declared in this scope

BROBOT_moveServo1(SERVO_MAX_PULSEWIDTH);

^

BROBOT_EVO2_17:542:41: error: 'BROBOT_moveServo1' was not declared in this scope

BROBOT_moveServo1(SERVO_AUX_NEUTRO);

^

BROBOT_EVO2_17:586:60: error: 'BROBOT_readBattery' was not declared in this scope

BatteryValue = (BatteryValue + BROBOT_readBattery(false)) / 2;

^

exit status 1
'OSC_init' was not declared in this scope

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Okay, I apologize for the long post but I've honestly tried to solve all of these problems by myself. I feel like I've paid the dues.

Why isn't a downloadable arduino code that actually works that I don't have to manually assemble in some manner unknown to me available for this?

Roadkill out....
               
Find all posts by this user
Quote this message in a reply
11-07-2018, 12:03 PM (This post was last modified: 11-07-2018 12:04 PM by JJrobots JP.)
Post: #2
RE: Call me stupid..... But
It looks like the libraries are not located in the same folder. Just extract everything in a folder called BROBOT_EVO2 (file attached) and try again. But if the Leonardo was already programmed, the error should be somewhere else...
.zip  BROBOT_EVO2.zip (Size: 18.81 KB / Downloads: 1)
Visit this user's website Find all posts by this user
Quote this message in a reply
11-08-2018, 05:59 PM
Post: #3
RE: Call me stupid..... But
(11-07-2018 12:03 PM)JJrobots JP Wrote:  It looks like the libraries are not located in the same folder. Just extract everything in a folder called BROBOT_EVO2 (file attached) and try again. But if the Leonardo was already programmed, the error should be somewhere else...

Maybe so, or me not knowing what I should expect with no communication outside BRobot.

AFTER firmly mounting the MPU6050 to the wifi chip on the Leonardo as suggested by Kareen. (There's no clear instruction on where or how to mount the MPU6050.) This is what happens with jjrobots original installed code:

Turn switch on, wait 10, 15, 20 seconds. Servo controlled arm waggles while stepper motors do the same.
Then arm stops and steppers make a 1/2 final turn each and begin to emit a medium pitched noise for as long as I'm willing to put up with it.

I'll cautiously say that this looks like progress as I've not successfully been able to make the jjrobots control app work yet?

Am I actually making progress?
Find all posts by this user
Quote this message in a reply
11-10-2018, 04:34 AM
Post: #4
RE: Call me stupid..... But
I'm overwhelmed (not really) with the help and response I'm getting.

Really?
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)