Go to advanced search

by joan
Thu Feb 27, 2020 9:28 am
Forum: Advanced users
Topic: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings
Replies: 19
Views: 474

Re: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings

You suspect the code falls over after a time. Perhaps provide a small script which demonstrates the problem and tell us what inputs are required to make it fall over. That would gives us something to look at.
by joan
Thu Feb 27, 2020 8:54 am
Forum: Python
Topic: event detection response
Replies: 5
Views: 136

Re: event detection response

No point guessing. We would have to see all the code.

The response seems slow. I'd expect circa 50 µs latency between level change and Python being notified. Between Python and callback is anyone's guess, but your times seem extreme.
by joan
Thu Feb 27, 2020 8:50 am
Forum: Troubleshooting
Topic: I2C device detected with i2cdetect, still getting "No I2C device at address" error
Replies: 7
Views: 225

Re: I2C device detected with i2cdetect, still getting "No I2C device at address" error

I do not think that is an I2C device. At a guess I'd say it provides analogue outputs (which would need to be read by an ADC).
by joan
Wed Feb 26, 2020 5:42 pm
Forum: Beginners
Topic: Turn on/off LCD backlight using GPIO pin
Replies: 1
Views: 39

Re: Turn on/off LCD backlight using GPIO pin

All the GPIO are equal in this respect. As long as you can connect the GPIO to the backlight it will work.
by joan
Wed Feb 26, 2020 11:43 am
Forum: Troubleshooting
Topic: GPIO.wait_for_edge
Replies: 7
Views: 102

Re: GPIO.wait_for_edge

An hour? Minute? Second? Millisecond?
by joan
Wed Feb 26, 2020 11:10 am
Forum: Troubleshooting
Topic: GPIO.wait_for_edge
Replies: 7
Views: 102

Re: GPIO.wait_for_edge

Why do you expect the edge to be high still? Typically how long do you expect vlez to stay high?
by joan
Tue Feb 25, 2020 9:33 am
Forum: Troubleshooting
Topic: I2C device detected with i2cdetect, still getting "No I2C device at address" error
Replies: 7
Views: 225

Re: I2C device detected with i2cdetect, still getting "No I2C device at address" error

Are there any markings at the sensor contacts which indicate their purpose? A clear close-up front and back may help.

I am not aware of a device that uses I2C address 0x03.
by joan
Mon Feb 24, 2020 6:40 pm
Forum: Advanced users
Topic: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings
Replies: 19
Views: 474

Re: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings

Alternatively see if it works with PUD_DOWN. If it does not work with PUD_DOWN but does with PUD_UP I would assume it is open collector.
by joan
Mon Feb 24, 2020 6:37 pm
Forum: Advanced users
Topic: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings
Replies: 19
Views: 474

Re: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings

The PUD_UP is suggestive but not conclusive. If you have a meter measure the voltage on the output line when the output line is not connected to the Pi. If it stays at 0V during flow then it is likely open collector.
by joan
Mon Feb 24, 2020 10:45 am
Forum: Beginners
Topic: Generate PWM on raspberry pi3
Replies: 2
Views: 78

Re: Generate PWM on raspberry pi3

Why, what are you going to use this PWM for? 10 seconds seems awfully long for a cycle. What dutycycles do you expect to use?
by joan
Mon Feb 24, 2020 9:48 am
Forum: Troubleshooting
Topic: I2C device detected with i2cdetect, still getting "No I2C device at address" error
Replies: 7
Views: 225

Re: I2C device detected with i2cdetect, still getting "No I2C device at address" error

You have not explained why you think it is an I2C device. Clear photos of the connections would be useful as well as links to the device specs.
by joan
Mon Feb 24, 2020 9:23 am
Forum: Troubleshooting
Topic: Raspbian update: getting notification 'buster InRelease' doesn't support architecture 'i386'
Replies: 16
Views: 444

Re: Raspbian update: getting notification 'buster InRelease' doesn't support architecture 'i386'

If you didn't add the 386 architecture it follows someone else did. Given that you don't know what else they did the only safe thing to do is to start from scratch with a fresh image. Perhaps this time set a new password before connecting to the internet.
by joan
Sun Feb 23, 2020 4:29 pm
Forum: Advanced users
Topic: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings
Replies: 19
Views: 474

Re: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings

Look up open collector on wiki. If the sensor has an open collector output it will not feed 5V into the Pi.
by joan
Sun Feb 23, 2020 9:44 am
Forum: Advanced users
Topic: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings
Replies: 19
Views: 474

Re: pigpio vs. RPi.GPIO Hall sensor interrupt odd readings

Flow meters and Hall effect sensors are often open collector outputs. That means the output line is either pulled to ground (low) or allowed to float to the external voltage (high). If that is the case with your sensor you can quite safely power it from 5V. The external voltage in this case is any p...
by joan
Sat Feb 22, 2020 11:10 pm
Forum: Automation, sensing and robotics
Topic: TFMini I2C Using Python?
Replies: 9
Views: 209

Re: TFMini I2C Using Python?

I'm not convinced you have the model associated with the PDF. I looked at the github and found an example which sends commands identical to those I suggested. https://github.com/TFmini/Others/blob/master/3%E3%80%81Reference-Scheme-for-Multiple-TFmini-I2C-Used-in-Arduino/Multiple-TFmini-I2C/Multiple-...
by joan
Sat Feb 22, 2020 9:24 pm
Forum: Automation, sensing and robotics
Topic: TFMini I2C Using Python?
Replies: 9
Views: 209

Re: TFMini I2C Using Python?

pigs i2co 1 0x10 0 should return a small number, a handle to use in subsequent communication. The first time through it will be 0 which I assume from now on. pigs i2cwd 0 1 2 7 # handle 0, write 0x01, 0x02, 7. pigs i2crd 0 7 # handle 0, read 7 bytes Repeat last two commands for each reading. PDF pa...
by joan
Sat Feb 22, 2020 8:54 pm
Forum: Troubleshooting
Topic: PI4 GPIO output
Replies: 2
Views: 125

Re: PI4 GPIO output

The gpio utility is part of wiringPi (not pigpio).

I'm not sure if the Raspbian version of wiringPi hs been updated for the Pi4B. You may have to download and build it from the wiringpi.com site.
by joan
Sat Feb 22, 2020 8:49 pm
Forum: C/C++
Topic: A mystery about the behavior of WiringPi
Replies: 4
Views: 163

Re: A mystery about the behavior of WiringPi

You get a lot of noise from some receivers when there is no carrier present.

I tend to set a glitch filter of about 100 µs on the receiver data GPIO.

pigs fg x 100 # where x is the Broadcom number of the GPIO

http://abyz.me.uk/rpi/pigpio/pigs.html#FG
by joan
Sat Feb 22, 2020 8:45 pm
Forum: Automation, sensing and robotics
Topic: TFMini I2C Using Python?
Replies: 9
Views: 209

Re: TFMini I2C Using Python?

You could use my pigpio library to test I2C commands from the command line. sudo pigpiod pigs i2co 1 0x10 0 # assuming default I2C address of 0x10 pigs i2cwd 0 bytes # where bytes is one or more bytes to write pigs i2crd 0 n # where n is the number of bytes to read http://abyz.me.uk/rpi/pigpio/pigs....
by joan
Sat Feb 22, 2020 6:05 pm
Forum: Automation, sensing and robotics
Topic: TFMini I2C Using Python?
Replies: 9
Views: 209

Re: TFMini I2C Using Python?

You should be able to read/write the device with generic I2C commands. Remember all the low level start/stop conditions, read/write bits. ACK/NACK bits are handled by the driver. You just read/write bytes. Firstly you need to confirm that there are no pull-ups to 5V on the unit. If it has any you wi...
by joan
Sat Feb 22, 2020 5:47 pm
Forum: C/C++
Topic: A mystery about the behavior of WiringPi
Replies: 4
Views: 163

Re: A mystery about the behavior of WiringPi

I'd expect problems if the level changes are more than 20k per second or so.

pigpio may be a better fit for your problem.

http://abyz.me.uk/rpi/pigpio/index.html

Specifically using alerts from C or Python.

http://abyz.me.uk/rpi/pigpio/cif.html#gpioSetAlertFunc
by joan
Sat Feb 22, 2020 3:28 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: I2C slave on Raspberry Pi 4 Model B?
Replies: 8
Views: 216

Re: I2C slave on Raspberry Pi 4 Model B?

I can also confirm it seems to work. #define BSC_SDA_MOSI_2711 10 #define BSC_SCL_SCLK_2711 11 #define BSC_MISO_2711 9 #define BSC_CE_N_2711 8 Slave I2C seems to work as before. I'll check slave SPI at some stage, perhaps that has started to work (it doesn't work on earlier Pi models). pigpio will b...
by joan
Sat Feb 22, 2020 2:39 pm
Forum: Teaching and learning resources
Topic: GPIO Pins
Replies: 3
Views: 141

Re: GPIO Pins

There are multiple libraries.

See https://elinux.org/RPi_GPIO_Code_Samples

What do you want to know about the GPIO?
by joan
Sat Feb 22, 2020 2:32 pm
Forum: C/C++
Topic: interrupt method with pigpio
Replies: 15
Views: 411

Re: interrupt method with pigpio

If the data arriving is serial data (per byte normally high, start bit, data bits, optional parity bit, stop bit) then I would use the serial link provided by the UART on GPIO 15 (pin 10).
by joan
Sat Feb 22, 2020 9:23 am
Forum: Troubleshooting
Topic: I2C pin do not working
Replies: 7
Views: 153

Re: I2C pin do not working

Have you tested the GPIO?

Go to advanced search