Okay, I have solved my problem. I reinstalled Python 3.6.
Then I used this command sudo apt-get install libhdf5-dev and then sudo pip install tensorflow and installed TensorFlow successfully!
I think the problem was with my Python installation.
Thanks to all of you for your kindness. Cheers!!!
12V pump will require 12V PSU. 20LPM is a pretty reasonable flow rate for a small pump so your pump PSU will need to have enough power to drive the pump - check the max current draw on startup (which will be higher than the running power draw) and size the PSU accordingly.
Check the contact handling voltage/current for your relays.
"5V" relays (as ...
What is a line follower robot?
Line follower or Line detector is an autonomous robot that follows either black line in white are or white line in the black area. The robot must be able to detect a particular line and keep following it. You can implement it by camera or IR.
As you specify, you want to do it by camera. In this case, you have a lot of options....
Depending how the ads1115 is connected to the PCA9546 there are several ways to approach.
For example if the 4 ads1115 is pinned out to have different address ( the ads1115 support upto 4 address; 0x48,0x49,0x4a,0x4b)
you may use this line of code to select 1 - 4 channels, assuming the address of the PCA9546 is 0x77
i2c.writeto(0x77, bytes([0x01]), stop=...
>>> from pythonwifi.iwlibs import Wireless
>>> wifi = Wireless('wlan')
""" Returns Iwscanresult objects, after a successful scan. """
>>> from ...
Is there a reason why you want to stream via your Python script, as opposed to streaming to VLC directly?
[socket] -> Python -> [pipe] -> VLC
[socket] -> VLC
You just add another interface (a pipe between Python and VLC) which adds some delay and jitter and doesn't seem to do any useful processing. Especially since you seem to read ...
CoderMike's Answer addressed the problems in your code, but if you are actually using the relay module pictured and have wired it in a similar manner there are more concerns.
There are a number of similar (poorly-designed) relay modules on the market - they seem to infect ebay!
They may work with Arduino (and TTL logic) BUT ARE A LOUSY DESIGN even for that ...
Firstly does the following turn your relay on then off?
import RPi.GPIO as GPIO,time
You also need to add timeouts to your distance sensing code otherwise your code could get stuck in a while ...
Firstly I am assuming that your program cao.py is actually locate in /home/pi/Desktop
Your question appears to have the path wrong and the Desktop folder spelt wrong.
I've create the following simple program as an example:
To run this program on its own open a 'Terminal' window and use:
Yes. You can do far better.
My pigpio Python module will give a million steps for frequencies less than 250 Hz.
pigpio will give a resolution of 250 million divided by the frequency in hertz that you want to use.
pi = pigpio.pi()
if not pi.connected:
How simultaneously do you need it to be? If "within a couple of seconds" is fine, then just call your scripts sequentially via SSH:
sshpass -p 'raspberry' ssh email@example.com python take_photo.py &
sshpass -p 'raspberry' ssh firstname.lastname@example.org python take_photo.py &
You may want to setup a passwordless login to make the commands simpler.
If you need to ...
If you do not have special requirements to compile OpenCV from source it is not a good idea to do it, in particular by newbies. You find the OpenCV library in the default Raspbian repository. Just look at it with:
rpi ~$ apt list *opencv*
You will find 75 packages. Just pick that one you need and install it.
rpi ~$ sudo apt install python3-opencv
may be ...
How to use Rpi4B to control multiple ADS1115 I2C ADCs, using PCA9546/TCA9548A I2C Multiplexer?
(1) PCA9645 Datasheet Section 6.1 explains the device slave address is 0x70 to 0x77. In other words, 7 PCA9645s can be placed on the same I2C bus. You use A2, A2, A0 address decode pins/bits to select which PCA9685 device (not channel) to use. ...
I've come up with a solution!
# check if
if os.environ.get('DISPLAY','') == '':
print('no display found. Using :0.0')
master = Tkinter.Tk()
# Lay out label
# Run forever!
Apparently the problem is noise on the PIR power line triggering the PIR. This can be caused by virtually any other device, even the MCU doing something. I have the same problem caused by the MCU going into sleep mode. Some suggest filters on the power line, some get away with delaying re-arming of the PIR until nothing else is happening which could cause a ...