2.6.2 IoT Adapters based on Raspberry-Pi
Installation of the IoT Adapters
The provided IoT Adaptors for the Makeblock mbot and Dobot Magician are provided as Web-applications that run within the previously installed Application Server Tomcat on the Raspberry-Pi.
1. Installation of Makeblock mbot IoT Adaptor
To install the IoT Adaptor, the source code can be downloaded from the link below and compiled in the Web Application Resource (WAR) file manually.
Alternatively, there is an automated script to download and compile the corresponding WAR file. The prerequisite in order to build the WAR file is to have Maven and Git installed on your Raspberry-Pi:
sudo apt install maven
sudo apt install git
cd $HOME
git clone https://git.boc-group.eu/boc-innovation-lab/mbotAPI.git
cd mbotAPI
./buildAndDeployCLASSIC.sh
Alternatively, the pre-compiled WAR file can be downloaded the link below and copied into the “webapps” directory or deploy it from the management user interface within Tomcat.
2. Installation of Dobot Magician IoT Adaptor
The Raspberry-Pi for the Dobot Magician requires additional prerequisites in order to operate correctly.
2.1 Installation of Python 3 using the following commands:
sudo apt install python3
sudo apt-get install python3-pip
2.2 IoT Adaptor DLLs need to be copied onto the Raspberry-Pi:
First, a directory needs to be created. Then, the provided DLL for the Dobot Magician is copied into the directory.
mkdir /home/pi/dobot/dobotMagicianGitDLLs/CodeRasp/PythonMove/DobotDll/
cd /home/pi/dobot/dobotMagicianGitDLLs/CodeRasp/PythonMove/DobotDll/
- the following the sequence of commands are listed to copy the DLL files into the directory
wget https://git.boc-group.eu/boc-innovation-lab/dobot-magician/blob/master/DobotDLLs/Raspberry/libDobotDll.so
wget https://git.boc-group.eu/boc-innovation-lab/dobot-magician/blob/master/DobotDLLs/Raspberry/libDobotDll.so.1
wget https://git.boc-group.eu/boc-innovation-lab/dobot-magician/blob/master/DobotDLLs/Raspberry/libDobotDll.so.1.0
wget https://git.boc-group.eu/boc-innovation-lab/dobot-magician/blob/master/DobotDLLs/Raspberry/libDobotDll.so.1.0.0
2.3 Installation of the Web-Application:
To install the IoT Adaptor, the source code can be downloaded from GitLab, and compile the Web Application Resource (WAR) file manually.
Alternatively, there is an automated script to download and compile the corresponding WAR file. The prerequisite in order to build the WAR file is to have Maven and Git installed on your Raspberry-Pi:
sudo apt install maven
sudo apt install git
cd $HOME
git clone https://git.boc-group.eu/boc-innovation-lab/dobot-magician.git
cd dobot-magician
sudo mvn clean package
sudo mv target/dobot.war /opt/tomcat/latest/webapps/
sudo service tomcat restart
Alternatively, the pre-compiled WAR file can be downloaded from GitLab and copied into the “webapps” directory or deployed from the management user interface within Tomcat.