I'm trying to connect raspberry pi with MatLab. I use the toolbox within matlab to configure raspberry pi. It automatically connects through network however it also gives you OS within that setup procedure, you can't connect to raspberry pi without it. Although the system it gives is technically Raspbian Jessie it comes with limited package.
When it launches and I input dir into console it only shows files such as: satkin_ws install ros_indigo.sh install_ros_package.sh and ros_catkin_ws. No other folders or files are pre-loaded onto the system. I tried to install some packages for display manager such as gdm3 and lightdm but I still have a problem with loading desktop environment. Can someone give me suggestions on how to resolve this issue?
Alright after doing some research I found that the system installed by Matlab is Raspbian Jessie Lite which does not come with GUI/Desktop environment by default but you can install it you want. Here is the link to get you going:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=133691
Related
I am trying to get tensorflow installed on a raspberry pi 4 which is running manjaro. It is to use the open source BNN library Larq, which recommended manjaro as an OS because it was 64bit as opposed to Raspbian. I have tried to install using yay from Archlinux user repository but got a couple different errors, like: "tensorflow/workspace.bzl: patch does not apply" and a failure to download. Any suggestions, I am very new to manjaro.
As a side note, I am not particularly stuck to Manjaro is anyone has experience using Larq and the larq compute engine on a RPi4 with a different OS any insight there would be helpful as well.
Thank you!
I cannot help you with Manjaro. However, I used Ubuntu 20.04 (64 bits) on my RPI4. I suppose you need the RPI4 to deploy and run your BNNs. If I am correct, I give you the following advice.
Please, note that the RPI4 is needed only to run LCE models (*.tflite). To this end, you don't need to install Tensorflow on your RPI4.
For everything else (see below) you can use a regular Linux box.
To check if everything is fine with your runtime environment (i.e. the RPI4), You can use your main Larq+LCE installation to convert one of your models into an LCE model and test it with the benchmark tool available here. For the RPI4+Ubuntu you should use lce_benchmark_model_aarch64.
If you need to compile your own BNN-based applications for your RPI4, you can follow the build guide on the LCE website. I did it once a long time ago. I used the LCE Docker to have a working environment. Then, from the inside of the docker, I followed the ARM guide: "Cross-compiling with Make" version.
I hope this helps.
I am working on my first Raspberry Pi project while following a course for creating a line-following robot. This is the course. I followed all the instructions and connected the pins as it describes but when I run the code on the Raspberry Pi OS it throws an error:
gpiozero.exc.PinPWMUnsupported: PWM is not supported on pin GPIO7
This is the code:
from gpiozero import Robot
from time import sleep
my_robot = Robot(left=(7,8), right=(9,10))
my_robot.forward()
sleep(1)
my_robot.stop()
I tried to search for solutions and checked the official documentation but it hasn't been helpful. How can I fix this?
The likely reason for this error is that the user has installed gpiozero into a virtual environment without installing a pin library. gpiozero's built-in pin interface does not support PWM. You need to install RPi.GPIO to get the normal experience:
pip install gpiozero rpi-gpio
This is mentioned in the docs: https://gpiozero.readthedocs.io/en/stable/faq.html#why-do-i-get-pinfactoryfallback-warnings-when-i-import-gpiozero
I had the same problem with gpiozero's CamJamKitRobot and Robot classes when trying to run it in a pipenv (same issue may occur with a virtual env, but I have not tried). Running the script outside of the pipenv (therefore just using the system installed pip packages) resolved the issue for me.
After many checks, it resulted that the GPIO pins and the software were ok. The motors were connected to a L289N Driver Motor module, which wasn't getting enough power from the batteries and this was the cause of the error. In case someone has the same or similar hardware connections and faces this issue, check if the L289N module is powered on (it should turn on the red LED that's on the module).
I was following the guide on https://www.raspberrypi-spy.co.uk/2018/02/basic-servo-use-with-the-raspberry-pi/ with Micro Servo WS-SG90 and Raspberry Pi 3B+ and used the gpiozero Python library and ran into the same exception. In my case this was caused by running the program as non-root user. Running the program with sudo made the servo turn. The other alternative would be to use PiGPIOFactory with pigpiod which does not require to run the program with elevated privileges.
Odroid running Ubuntu Mate 16.04 and ROS Kinetic. I have wiringPi2 installed for accessing the GPIO pins. I am able to use the GPIO pins through a Python script, but they require sudo access. I have a ROS node (written in Python) in which I want to access the GPIO pin data and publish to a topic. But, I am not able to do so, because wiringPi2 required sudo access, and ROS is not defined in root.
I have tried using wiringPiSetupSys() function which does not require sudo access, but that does not work i.e. I am not able to get the GPIO pin data without sudo access.
All the solutions to similar problems for Raspberry Pi platform don't seem to work for Odroid.
Thanks
Unfortunately, I could not find a fix to the problem with the exact specifications mentioned. However, when I tested the same code on a Raspberry Pi 3 with Raspbian, it works correctly.
So, I have concluded that the issue lies in the OS used i.e. Ubuntu Mate 16.04.
So, a solution might be to use Raspbian on Odroid itself. I am yet to test whether that works out.
Update : Raspbian doesn't exist as such for Odroid, so some other work around might be required.
Here is the situation:
Raspberry pi 2 running raspbian running python 3.5.2 with Opencv,Numpy,pyusb
Orange pi pc running Armbian.
Both boards are quad-core arm.
So the question is can i somehow transfer the libraries from one distro to another without recompiling them? It would save me hours.
If not can i just transfer Opencv as this is the main culprit.
Thanks in advance.
I'm really not familiar with make. So I don't understand the meaning of those steps in 2 tutorials ("TensorFlow Makefile" and "TensorFlow Raspberry Pi Examples") to make my project on laptop work on raspberry pi 2
TensorFlow Makefile:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/makefile
TensorFlow Raspberry Pi Examples:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/pi_examples
As far as i know,"TensorFlow Makefile" will convert the tensorflow source,lib to executable file. "TensorFlow Raspberry Pi Examples" means convert your project to executable file then run the file in your_project/gen/bin/your_project
tensorflow/contrib/pi_examples/label_image/gen/bin/label_image
Hence,if I have a project on my laptop and want to load my project into Pi 2 ("TensorFlow Makefile" is already done). I just copy it to my pi 2 and do :
make -f tensorflow/my_project/Makefile
then run :
tensorflow/my_project/gen/bin/my_project
This is how to make your project work on raspberry pi 2, right ?
This will only work for Makefiles which have the option to cross-compile from a (presumably) x86(_64?)-architecture laptop to an ARM-architecture Raspberry Pi.
You're in luck, though: Google's included options in TensorFlow's Makefile to cross-compile between architectures!
If you look at line 123 of the Makefile, you'll see a comment about this.
Default to running on the same system we're compiling on.
You should override TARGET on the command line if you're cross-compiling, e.g.
make -f tensorflow/contrib/makefile/Makefile TARGET=ANDROID
So, simply make the project like so:
$ make -f tensorflow/contrib/makefile/Makefile TARGET=PI
This will compile TensorFlow for the RPi.
Incidentally, if you can, it may be easier to simply compile TensorFlow on the RPi by either pulling the sources from git or transferring it onto the RPi via USB, and building there.