Teensy interface: Difference between revisions

From Rsewiki
No edit summary
No edit summary
Line 3: Line 3:
== Installation packages ==
== Installation packages ==


On Raspberry PI 5 (running 64bit OS) Paho Mqtt can be installed with C++ support.
See installation notes for needed OS-packages.
This failed on Raspberry pi 4 (running 32 bit OK - due to Lidar support for YD Lidar S4B).


However, the C interface API works on Raspberry 32bit OS (Bullseye).
For the Teensy interface fetch the software here:


Install:
mkdir -p ~/svn
  sudo apt install libpaho-mqtt-dev libpaho-mqttpp-dev mosquitto-dev mosquitto-clients
cd ~/svn
  svn checkout svn://repos.gbar.dtu.dk/jcan/scorpi


- in addition to other packages required for normal compile
Then go to the Teensy_interface and compile


This should allow the teensy interface to compile.
cd scorpi/teensy_interface
mkdir build
cd build
cmake ..
-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr (found version "4.5.1")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in thread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
# Is a RASPBERRY; CPU=aarch64 (Pi3=armv7l, pi4=aarch64)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/local/svn/scorpi/teensy_interface/build


=== Documentation MQTT API ===


For Paho-mqtt, see https://eclipse.dev/paho/files/paho.mqtt.python/html/index.html
If everything is installed (including CLI11) a Makefile should be generated. To compile:


=== Configure Mosquitto ===
make -j3


Copy the full option list example to /etc/mosquitto/conf.d/:
After a while, all should be compiles
 
  sudo cp /usr/share/doc/mosquitto/examples/mosquitto.conf /etc/mosquitto/conf.d/
 
Uncomment and change in the 'listener' group:
 
#listener
listener 1883
 
In the security group:
#allow_anonymous false
allow_anonymous true
 
Restart mosquitto to take effect.
 
sudo service mosquitto restart

Revision as of 11:53, 21 July 2024

Back to Scorpi

Installation packages

See installation notes for needed OS-packages.

For the Teensy interface fetch the software here:

mkdir -p ~/svn
cd ~/svn
svn checkout svn://repos.gbar.dtu.dk/jcan/scorpi

Then go to the Teensy_interface and compile

cd scorpi/teensy_interface
mkdir build
cd build
cmake ..

-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenCV: /usr (found version "4.5.1") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in thread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
# Is a RASPBERRY; CPU=aarch64 (Pi3=armv7l, pi4=aarch64)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/local/svn/scorpi/teensy_interface/build


If everything is installed (including CLI11) a Makefile should be generated. To compile:

make -j3

After a while, all should be compiles