Issues with getting started in arduino


#1

I am having issues with the makeblock arduino examples. I am not sure if anyone could possibly help me figure this out, but it works perfectly fine with mblock and through the mobile app. For some reason though, i cannot get arduino to communicate with the robot. I keep getting errors saying that nothing is declared in the scope. I downloaded the arduino program directly from the makeblock website, i downloaded the libraries through the link, and also tried downloading the link that has the libraries already uploaded to it for windows(pictures attached of the links).

I know this sounds a little menial, but i am new to c language.


#2

mBlock includes an embedded Arduino IDE. If you are using a separate Arduino IDE, you may find that this will cause some issues for you. The Makeblock libraries have to be installed into the Sketchbook location the Arduino IDE is using, so a first check would be to ensure that the path for the sketchbook is the same for the embedded Arduino IDE and the externally installed Arduino IDE. Have you looked at the programming guide at this location?

Also, on questions like these it is often helpful to copy @tec_support on the message. :slight_smile:


#3

Thanks for your reply. i started following the directions on the link you provided, but when i get to the part about connecting megapi it gives me a different error.


#4

Hmm, it looks like you may have just done the whole Makeblock-Official-master folder based on what I’m seeing. Make sure that you only zip the makeblock folder in the Makeblock-Official-master folder and use the Install Library .ZIP option in the Sketchbook to install the makeblock.zip file.


#5

Sorry i know it sounds like i am playing dumb, but i am not sure where to unzip it to and if i try to upload the .zip file through sketch it gives me an invalid library error.


#6

Ok, let’s see if I can explain better. :slight_smile:

  1. Download the zip file into a temporary directory.
  2. Unzip the zip file.
  3. Change to the Makeblock-Official-master directory that should be created when you unzip the zip file.
  4. You should see a README.md file and a makeblock folder in this directory.
  5. In this directory, create a new zip file from the makeblock folder.
  6. Load the new makeblock.zip file you have created through the Arduino IDE.

:slight_smile:


#7

Hi shields94729,

Here is an instruction to guide put the latest version makeblock library to the Arduino IDE.How can I add the Makeblock library to my Arduino IDE.zip (489.5 KB)

If you are using the MegaPi board, please choose the Board under Tools to Arduino/Genuino Mega or Mega 2560.

@chuckmcknight, here is one correction in the step 5,6, you can copy the makeblock folder directly without creating a new zip file and put the makeblock folder to the libraries folder under the Arduino software installation path. :slight_smile:


#8

Yes, I know about copying the folder. :slight_smile:

However, for some folks it’s been easier to have them make the zip file and let the Arduino IDE do the install from that so that it sets it up correctly. One of the problems I’ve seen is that a lot of people seem to copy the entire Makeblock-Official-master folder into their Sketches/library folder rather than just the makeblock folder.

I’m on a Mac, so I cloned the Github repo and symlinked it to the right spot so that all I have to do is execute a ‘git pull’ to update my Makeblock libraries. :slight_smile:

By the way, were there any changes to the libraries to support the 3.4.0 release of mBlock and if so, can those changes be pushed to the Github repo?

Thanks!

Chuck


#9

Hi Charles,

Ok, thanks for the clarification.
There is no change for the makeblock library recently. The current library published on Github is the latest one.


#10

谢谢! :slight_smile:


#11