Go to advanced search

by MoonChin
Tue Jul 14, 2020 10:33 am
Forum: Beginners
Topic: Start Terminal and execute command on boot
Replies: 1
Views: 90

Start Terminal and execute command on boot

I have a Python script that hosts a web server, and I want to execute the script via the Terminal on boot of my Pi. I want it to run in the Terminal so that I can easily kill it when I make updates to the script or the html/css files to reload it (unless there's a better way to reload it? I'm using ...
by MoonChin
Sun Jul 12, 2020 9:28 am
Forum: Troubleshooting
Topic: Rpi3B GPIO don't seem to be working
Replies: 5
Views: 151

Re: Rpi3B GPIO don't seem to be working

Run wiringPi's pintest or pigpio's gpiotest (with nothing connected to the expansion header). For gpiotest see https://elinux.org/R-Pi_Troubleshooting#Testing I ran the test with nothing connected (no hat either) and... everything failed :( I'll get in touch with the place I bought the hat from. Th...
by MoonChin
Sun Jul 12, 2020 8:48 am
Forum: Troubleshooting
Topic: Rpi3B GPIO don't seem to be working
Replies: 5
Views: 151

Re: Rpi3B GPIO don't seem to be working

I tried that but no luck :( I changed them to event detection: from datetime import datetime import RPi.GPIO as GPIO import time mode = GPIO.BCM GPIO.setwarnings(False) GPIO.setmode(mode) # general purpose GPIO pin definitions io_pins_BCM = [17,27,22,5,6,13,26, 18,23,24,25,12,16] #GPIO number 4 io_p...
by MoonChin
Sun Jul 12, 2020 12:24 am
Forum: Troubleshooting
Topic: Rpi3B GPIO don't seem to be working
Replies: 5
Views: 151

Rpi3B GPIO don't seem to be working

I had my rpi running with a flowmeter perfectly prior to purchasing an add-on board ( https://czh-labs.com/hcdc-rpi-gpio-terminal-block-breakout-board-hat-for-raspberry-pi-p1288.html?gclid=CjwKCAjwxqX4BRBhEiwAYtJX7UNu9zdRXK6HW6M1J2RGaaQlaKi10h_hcIsF3GP1cI7ZJEJ9QemSQxoCssAQAvD_BwE ). However after in...
by MoonChin
Sun Jun 21, 2020 2:16 pm
Forum: Beginners
Topic: Connecting single flowmeter to two devices (an RPi + other)
Replies: 1
Views: 78

Connecting single flowmeter to two devices (an RPi + other)

I have an RPi3 and another device (a Hunter Hyrdawise HC wifi irrigation controller) and I want to connect a single flow meter to both. The first issue is that the Hydrawise uses 5V sensor inputs which would kill the Pi. How can I safely connect the two inputs from the flowmeter to both devices? Can...
by MoonChin
Tue Jun 16, 2020 11:28 pm
Forum: Beginners
Topic: Flow meter - Calculating average (instantaneous) flowrate
Replies: 7
Views: 286

Re: Flow meter - Calculating average (instantaneous) flowrate

FWIW, I've attached my code if it's useful to anyone. It has comments, but could do with some more + function headers. All in good time.. It includes my super basic web server as well which serves up the current flowrate, flow total, and 5 entries from the pulse history. (Feel free to let me know if...
by MoonChin
Sun Jun 14, 2020 11:15 pm
Forum: Beginners
Topic: Flow meter - Calculating average (instantaneous) flowrate
Replies: 7
Views: 286

Re: Flow meter - Calculating average (instantaneous) flowrate

You probably want to take a measurement every (say) 10 minutes, counting the pulses that have occurred. If none, we can see the flow rate in last 10 minutes was zero. Hmm, interesting suggestion. Instead of discarding every X samples (which now that I think about it is probably the cause of my issu...
by MoonChin
Sun Jun 14, 2020 10:41 pm
Forum: Beginners
Topic: Flow meter - Calculating average (instantaneous) flowrate
Replies: 7
Views: 286

Re: Flow meter - Calculating average (instantaneous) flowrate

Trouble is, with the data you've got (signal every 10l), you can't get real-time flow. The nearest you can get is the average flow over the period of the last 10l. That is never going to look pretty -- imagine you wash the car, using 10l every few minutes, stopping with 9l of the 10l interval gone....
by MoonChin
Sun Jun 14, 2020 10:38 pm
Forum: Beginners
Topic: Flow meter - Calculating average (instantaneous) flowrate
Replies: 7
Views: 286

Re: Flow meter - Calculating average (instantaneous) flowrate

Presumably the device is counting more frequent impulses than one every 10 litres. The only one I've seen, in my coffee machine, is a tiny turbine with a magnet and a hall effect sensor. Is there any chance of getting inside yours and intercepting the signals directly from it's sensor? I have a hal...
by MoonChin
Sun Jun 14, 2020 10:54 am
Forum: Beginners
Topic: Flow meter - Calculating average (instantaneous) flowrate
Replies: 7
Views: 286

Flow meter - Calculating average (instantaneous) flowrate

I have a 2-wire flowmeter that changes output between open and closed every 10 L(itres) of water volume that goes through. E.g. 0-10L open circuit, 10-20L closed circuit, 20-30L open circuit... Therefore I have it connected to a GPIO and have enabled the internal pull-up resistor. The flowmeter is b...

Go to advanced search