New answers tagged

3

IN219 current sensor breakout might be a option. you basically insert this where with want to measure the current, usually the power to the Rasberry pi. It connects to the PI with I2C. should meet what you want. You can carefully split the usb power cord open cut the red wire and attach it to the board. You need a soldering iron and some hook up wire but it'...


2

Yes - there is a world of test instruments in the market that are capable of measuring current, voltage and time (Energy = V * I * t) consumed by a Raspberry Pi. Here's one example of such an instrument, and you can find many others by searching the Internet. You asked about using the GPIO for this measurement. That is rather vague, and would likely be ...


0

Are you trying to run a graphical program over ssh or with putty? If so you either need to use vnc or run directly on the Pi within the Desktop.


0

Figured it out, not 100 sure on the reason but GPIO is not a valid pin to use switched to 18 and working. Also had to edited the code, updated syntax for python 3 called the function in the while block


0

If a GPIO set as an INPUT is not connected to a fixed voltage it is said to be floating and will randomly return 0 or 1 when tested. In your case this shouldn't happen as it is connected to ground via the weak internal pull-down (pull_up_down=GPIO.PUD_DOWN). The internal pulls are about 50K. That suggests there is a wire attached to that GPIO which is ...


2

The following is simplified code which prints a single reading. Unless DHT.py is in the same directory it should be in a directory on the PYTHONPATH #!/usr/bin/env python3 # 2020-09-27 """ A Program to read the DHTXX temperature/humidity sensors. REQUIREMENTS DHT.py download "module" from http://abyz.me.uk/rpi/pigpio/...


1

This is NOT Pi specific, and you have NOT provided sufficient detail to actually provide a definitive solution. The following is most likely the cause. Unless pydub.py is in the same directory as your program it should be in a directory on the PYTHONPATH, BUT it is preferable to install with sudo pip3 install pydub so it is available to all users/programs.


1

The first is not fully incorrect but it's not correct either! Yes the Pi is ARM but a lot of repositories for programs are compiled C or C++ and built ready by the distribution maintainers. Other code (e.g.PHP) does not care what the chipset is and then more source is compiled by users on their own machine. Instructions for building from source is here As ...


-2

Following instructions on this post I got it working. https://stackoverflow.com/questions/44168415/raspbian-python-script-eof-error-at-startup Just make sure you boot to CLI. Go to: sudo nano /home/pi/.bashrc and add this to the end of the script: echo Running at boot sudo python3 /home/pi/filename.py


Top 50 recent answers are included