How to use Multiple camera with an Raspberry Pi Compute Module 4? - raspberry-pi4

I have RPI CM4 and I would like to use 2 cameras on his board. I have noticed that the RPI CM4 have 2 CSI port camera but I can't found any informations on how to select the right camera on the right CSI port camera.
Thank you.

Related

QT Bluetooth Peripheral and Central role possible?

I'm running a programm on a Raspberry Pie which is based on QT and uses a bluetooth adapter to connect to some peripheral devices as a central role.
I also have another device, which only can act as a Central bluetooth device and needs to be connected to my Raspberry.
Is it possible with QT to first build a connection to my second device by advertising itself and acting as a peripheral, and afterwards swaping to central mode, to connect to the other devices?
I didn't find any evidence for or against this. So i hope you guys can help me out.
What you want to do is not related to Qt/software, but rather something that depends on the hardware, specifically the version of Bluetooth of your hardware. A device can advertise (act as a peripheral) and scan/connect (act as a central) at the same time if it supports the "LE Dual Mode Topology", which was added in Bluetooth v4.1 (please see figure below).
Therefore, if this is a Raspberry Pi 3 Model B or B+, then it has Bluetooth v4.1 or v4.2 (respectively) built-in and it should be capable of acting as both central and peripheral. If it is an older Raspberry Pi then this depends on the Bluetooth dongle that you attach to it.
I hope this helps.

Testing Microchip RN4871 BLE Module with Raspberry Pi 3

I got a Microchip RN4871 BLE Module and want it to act as beacon.
So, I connected over UART and executed the following commands:
SS,20
SC,2
NB,09,656667
I am able to scan and connect to it using hcitool and gattool command. Now I want to verify whether the beacon functionality is working or not. I mean the device is periodically broadcasting Beacon packets or not..
How can I verify that.. Is there any android application which can help or can i do with raspberry pi 3 as it has in built Bluetooth Chip
There are some really nice apps from nordic for free available. I like the nrF connect app. I guess it will help you.

Raspberryy pi 3 BLE Devices

I am new to android.I have Raspberry pi 3 device.I can connect mobile device to Raspberry pi 3 over classic Bluetooth.now i am confused about Raspberry how to connect mobile device to Raspberry over bluetooth low energy.we can connect BLE device to android device and get Characteristics and can write Characteristics.now i want to do same thing in Raspberry pi 3 like (heart rate monitor,MI band 2)
Do it using a program
You can do it programmatically using DBus Calls. DBus is an interprocess Communication method used in linux. You can use DBus bindings for different languages such as python or C to make the DBus calls and do the operations.
A few links to help you get started :
DBus tutorial - https://dbus.freedesktop.org/doc/dbus-tutorial.html
BLE DBus API - https://elinux.org/images/3/32/Doing_Bluetooth_Low_Energy_on_Linux.pdf
Using Gatttool from terminal
Gatttool is a terminal tool just like hcitool. You can use the following commands to get the thing working:
hcitool lescan Gives you the list of nearby Low Energy Devices
gatttool -b mac_adress_of_le_device -I gives you an interactive session with the mentioned LE device
From the interactive session give connect to connect to the device
primary to get the primary services.
From this result, you can use the handle values to get the list of characteristics of a specific service. characteristics handle
To get the value of a characteristic use char-read-hnd handle
To get the characteristic descriptor, use char-desc handle
to write to a characteristic char-write-req handle value
Hope This helps!

Prevent Raspberry Pi 3 from automatically connecting to bluetooth le device

I have a TI SensorTag bluetooth le device. It is not paired with my raspberry Pi. I installed bluez, but I don't have any applications of my own running. The second I power on the device, something on the Pi instantly connects to it. If I disable bluetooth on the Pi, the device becomes available for connections.
This is a problem for me because my own application can't connect to the device because something on the Pi has aggressively connected to it.
I am not sure what the reason is but this worked for me. Try following steps.
Go to terminal and type bluetoothctl.
Then type disconnect <device_address>

Bridge shield between Arduino and Raspberry Pi (to wirelessly upload the measurements of analog sensors to a webpage)?

I like to build a project to make my gardening work smarter! My goal is to measure soil temperature, soil water content, light intensity and also taking a picture, and then wirelessly upload these datasets to a webpage. I can also control the irrigation system (turn on/off the pump switch) via the webpage.
These sensors are anagogic! However, the Raspberry Pi Face (PiFace) Digital Interface is only able to take care of digital signals. The PiFace comes with the relaies, which is pretty handy for a startup project. I just like to get some premade boards and ensemble them easily without too work.
Can I layer up a Raspberry Pi board, an Arduino bridge shield, an Arduino board and a PiFace (or a relay board) without wiring?
I really need a recommended "shopping list" to start with. What should I choose?
I suggest you try following the steps outlined in Arduino and the Raspberry Pi.
I agree that you should involve an Arduino as your conduit to the outside world. Then do a simple serial connection between the two. If you get any Arduino except for the new Due, you have got to get from 5 V (Arduino) to 3.3 V (Raspberry Pi). I'd suggest Sparkfun's Logic Level converter.
Sparkfun also has a good light sensor, TEMT6000 Breakout Board.
While you're there, you can grab a couple of thermistors to measure temperature, Thermistor 10K.
Also, Make did an article on almost exactly what you intend on doing (from the Arduino side), Microcontroller-assisted gardening.
On the Raspberry Pi side, Pygame will give you a huge head-start on connecting to the Arduino and taking webcam shots. A Halloween Sound Trigger with Raspberry Pi and Arduino should get you started.
According to what you describe, you may achieve this with only an Arduino UNO, an Ethernet Shield, sensors (at least temperature and light) and a cheap CMOS camera.
If you want to take advantage of the two worlds (Raspberry with Arduino I/O capabilities), you may also consider the Raspberry Pi to Arduino shields connection bridge from Cooking-Hacks: they provide both library and tutorial to start with.

Resources