Me Shield for Raspberry Pi - Makeblock


#1

Since makeblock and distributors still sell this product, is there technical support for it? When I look at the forum, users ask questions but do not seem to get answers and then the topic closes in 30 days.

I have a starter kit and would like to connect a raspberry PI to it and program in python. Especially since the starter kit (orion) is not supported in mblock 5.

If there is technical support then:

  • is the “me shield” the only hardware I need on the PI board and a" me rj25 adapter" on the orion board?
  • what versions of the PI board are supported? 2, 3, A , B, B+
  • what software do I need on both boards?
  • is the library for python 2 or 3?

Connect a Me Auriga to a MegaPi - Possible? How?
Controlling my Ranger using Python
Python - bot.start not working
Stepper Motor Control with Me Shiel for Raspberry Pi
Controling Megapi via raspberry pi and python
#2

Hi dr-roboto,
When use Orion, you need me shield for Raspaberry Pi, Orion board, Raspaberry, RJ 25 cable;
Any version of Raspaberry will be working;
When use Orion, refer to this link;
If you use MegaPi python, python 2 or 3 are both working: https://github.com/Makeblock-official/PythonForMegaPi


#3

thanx for the response.
I have ordered the me shield for raspberry PI.
My board is a PI 3 B and I use python 3.

I will report back after everything is delivered and installed.


#4

The hardware is built.
The me shield is on the PI 3 B and connected to port 5 on the orion,

I used mblock 3.4.12 to upgrade the firmware.
I also used mblock scratch to test M1 and M2 motors

However it does not work. I ran the motorRunForOrion in the examples.

I removed statements until I received the following:

from megapi import *
if name == ‘main’:
bot = MegaPi()
bot.start()
bot.motorRun(M1,0);
sleep(1);

Python 3.5.3 (/usr/bin/python3)

%Run main-test3.py

Version:3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516]
init MegaPi
<megapi_python3.mSerial object at 0x76309690>
[Errno 25] Inappropriate ioctl for device

IF I add more sleep/delays:

from megapi import *
if name == ‘main’:
bot = MegaPi()
sleep(2)
bot.start()
sleep(2)
bot.motorRun(M1,0);
sleep(1)

========================= RESTART =========================

%Run main-test3.py

Version:3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516]
init MegaPi
<megapi_python3.mSerial object at 0x7632c790>
[Errno 25] Inappropriate ioctl for device
Traceback (most recent call last):
File “/home/pi/Documents/makeblock-link/main-test3.py”, line 7, in
bot.motorRun(M1,0);
File “/home/pi/.local/lib/python3.5/site-packages/megapi_python3.py”, line 202, in motorRun
self.__writePackage(bytearray([0xff,0x55,0x6,0x0,0x2,0xa,port]+self.short2bytes(speed)))
File “/home/pi/.local/lib/python3.5/site-packages/megapi_python3.py”, line 116, in __writePackage
self.device.writePackage(pack)
File “/home/pi/.local/lib/python3.5/site-packages/megapi_python3.py”, line 38, in writePackage
self.ser.write(package)
File “/usr/lib/python3/dist-packages/serial/serialposix.py”, line 517, in write
raise portNotOpenError
serial.serialutil.SerialException: Attempting to use a port that is not open

NOTE: if name == ‘main’ has two underscores before and after each word


#5

I have now been able to get the connection to work.

The “problem” is that the makeblock code was developed on a PI that did NOT have bluetooth. Bluetooth used ttyAMA0
These are the changes that I had to make to Raspian sketch OS on a raspberry PI 3B:

add the following lines to /boot/config.txt
dtoverlay=pi3-disable-bt
enable_uart=1

I also had to run the following command from the terminal window
sudo systemctl disable hciuart

then reboot

Now I can start to build “onion” a starter/orion robot connected to a raspberry PI and controlled thru a wifi connection.


#6

Here is the result of a $20USD investment. A raspberry PI zero WH with the Me Shield for Raspberry PI to control the sensors/motors on the Makeblock (arduino)

All programmed with python thru the free remote desktop (VNC) software and wifi.


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.