Skip to content

chrisdutz/RAPIRO

 
 

Repository files navigation

Rapiro firmware

##The difference between default sample firmware and this firmware. 1. Motion No. is 2 digits #Mnn. (evilbluechickens-san ) 2. Added Servo off command #H. (evilbluechickens-san ) 3. Added Read Analog port #An. n is 6 or 7. 4. Added Version Info #V. Response is #Ver00. 5. Motion data moved to Flash. Some motions can be added. 6. User trim data was separated into include file.

| |default| This | |-------|-------|------| |STOP | #M0 | #M00 | |Foward | #M1 | #M01 | |Back | #M2 | #M02 | |Left | #M4 | #M04 | |Right | #M3 | #M03 | |OFF | - | #H | |Analog | - | #A6 | |C | #C | #C | |Q | #Q | #Q | |5 | #M5 | #M05 | |M6 | #M6 | #M06 | |M7 | #M7 | #M07 | |M8 | #M8 | #M08 | |M9 | #M9 | #M09 | |M10 | - | #M10 |

Running the Server

In order to run the server, the following command should work:

java -Djava.library.path=/usr/lib/java -jar rapiro-server-core-1.0.0-SNAPSHOT-exec.war

Setting up Telemetry

In order to use access telemetry data, we need to install some native libraries on our system. The libs are all contained in the archive that can be downloaded from: https://sourceforge.net/projects/sigar/files/

MAC: Copy the file "sigar-bin/lib/libsigar-universal64-macosx.dylib" to "/Library/Java/Extensions". I had to do a "sudo cp" as copying the normal way was blocked by the system.

Edison: I have to fins out which lib I have to copy to "/usr/lib/java".

Serial communication on Raspberry PI

  1. Enable UART by adding the following line to /boot/config.txt

    enable_uart=1
  2. Disable the Rasberry using this port as console, by removing the following part from the file /boot/cmdline.txt:

    console=serial0,115200
  3. Set the baudrate to 57600 by adding the following line to /etc/rc.local

    stty -F /dev/ttyS0 57600

Now you should be able to send data to the Arduino using:

echo -ne '#M1' > /dev/ttyS0
echo -ne '#M0' > /dev/ttyS0
echo -ne '#H' > /dev/ttyS0

Or read data from the Serial port using the following command:

cat -v < /dev/ttyS0

Very helpful document:

Building OpenCV

cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D WITH_OPENCL=OFF \ -D BUILD_PERF_TESTS=OFF \ -D BUILD_SHARED_LIBS=OFF \ -D JAVA_INCLUDE_PATH=$JAVA_HOME/include \ -D JAVA_AWT_LIBRARY=$JAVA_HOME/jre/lib/arm/libawt.so \ -D JAVA_JVM_LIBRARY=$JAVA_HOME/jre/lib/arm/server/libjvm.so \ -D DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.3.0/modules \ -D CMAKE_INSTALL_PREFIX=/usr/local \ .. make sudo make install

Enable camera:

sudo modprobe bcm2835-v4l2

TEST

About

RAPIRO Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 89.8%
  • C++ 5.4%
  • Scala 3.0%
  • Groovy 1.6%
  • Other 0.2%