How to program starter kit with arm to be controlled by raspberry pi


#1

So I currently have the makeblock starter kit (IR VERSION) and purchased the robotic Arm separately. I was able to program this to work with the IR remote and it works fine.

I used this code to make it happen:

github.com/Makeblock-official/Robotic-Arm-Add-On-Pack-For-Starter-Robot-Kit

This is what it currently looks like:

However, I want to have my raspberry pi control this instead of the IR remote. I found an example of this at:

github.com/Makeblock-official/PythonForMegaPi

The third configuration calls for simply connecting a usb into the Pi and connecting the micro usb portion to the Arduino Orion board. Like so:

However, I dont think this was necessarily meant for my configuration as I get an error message trying to upload the megapi firmware as outlined in the instructions.

Arduino: 1.8.1 (Windows 7), Board: "Arduino/Genuino Uno"

In file included from C:\Users\chris\Documents\Arduino\libraries\makeblock\examples\Firmware_for_MegaPi\Firmware_for_MegaPi.ino:28:0:

C:\Users\chris\Documents\Arduino\libraries\makeblock\src/MeMegaPi.h:92:19: error: 'A8' was not declared in this scope

    { 16, 17 }, {  A8,  A9 }, { A10, A11 }, { A13, A12 }, {  NC,  NC }, 

                   ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\src/MeMegaPi.h:92:24: error: 'A9' was not declared in this scope

    { 16, 17 }, {  A8,  A9 }, { A10, A11 }, { A13, A12 }, {  NC,  NC }, 

                        ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\src/MeMegaPi.h:92:32: error: 'A10' was not declared in this scope

    { 16, 17 }, {  A8,  A9 }, { A10, A11 }, { A13, A12 }, {  NC,  NC }, 

                                ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\src/MeMegaPi.h:92:37: error: 'A11' was not declared in this scope

    { 16, 17 }, {  A8,  A9 }, { A10, A11 }, { A13, A12 }, {  NC,  NC }, 

                                     ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\src/MeMegaPi.h:92:46: error: 'A13' was not declared in this scope

    { 16, 17 }, {  A8,  A9 }, { A10, A11 }, { A13, A12 }, {  NC,  NC }, 

                                              ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\src/MeMegaPi.h:92:51: error: 'A12' was not declared in this scope

    { 16, 17 }, {  A8,  A9 }, { A10, A11 }, { A13, A12 }, {  NC,  NC }, 

                                                   ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\examples\Firmware_for_MegaPi\Firmware_for_MegaPi.ino: In function 'void writeEnd()':

Firmware_for_MegaPi:806: error: 'Serial2' was not declared in this scope

     Serial2.println();

     ^

Firmware_for_MegaPi:810: error: 'Serial3' was not declared in this scope

     Serial3.println();

     ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\examples\Firmware_for_MegaPi\Firmware_for_MegaPi.ino: In function 'void writeSerial(uint8_t)':

Firmware_for_MegaPi:836: error: 'Serial2' was not declared in this scope

     Serial2.write(c);

     ^

Firmware_for_MegaPi:840: error: 'Serial3' was not declared in this scope

     Serial3.write(c);

     ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\examples\Firmware_for_MegaPi\Firmware_for_MegaPi.ino: In function 'void readSerial()':

Firmware_for_MegaPi:869: error: 'Serial2' was not declared in this scope

   else if(Serial2.available() > 0)

           ^

Firmware_for_MegaPi:875: error: 'Serial3' was not declared in this scope

   else if(Serial3.available() > 0)

           ^

C:\Users\chris\Documents\Arduino\libraries\makeblock\examples\Firmware_for_MegaPi\Firmware_for_MegaPi.ino: In function 'void setup()':

Firmware_for_MegaPi:2682: error: 'Serial2' was not declared in this scope

   Serial2.begin(115200);

   ^

Firmware_for_MegaPi:2683: error: 'Serial3' was not declared in this scope

   Serial3.begin(115200);

   ^

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

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

How can I make it so I can control the starter makeblock with the arm addition via my raspberry pi over a usb cable (like the example I gave above)?


#2