Go to advanced search

by joan
Sun Aug 19, 2018 7:43 pm
Forum: Python
Topic: sleepy python
Replies: 5
Views: 111

Re: sleepy python

Yes, that seems correct. I suggested pigs as that is more interactive (as long as you can visualise the signals). There should be several examples at http://abyz.me.uk/rpi/pigpio/examples.html In particular http://abyz.me.uk/rpi/pigpio/examples.html#Python__433_py (tx side) http://abyz.me.uk/rpi/pig...
by joan
Sun Aug 19, 2018 5:35 pm
Forum: Python
Topic: sleepy python
Replies: 5
Views: 111

Re: sleepy python

You need to use pigpio waves. I'd play with pigs to get the idea and view the output with piscope. http://abyz.me.uk/rpi/pigpio/pigs.html http://abyz.me.uk/rpi/pigpio/piscope.html For instance to send pulses to GPIO4 (1<<4 == 16) $ pigs m 4 w $ pigs wvclr $ pigs wvag 16 0 481 0 16 2894 16 0 425 0 16...
by joan
Sun Aug 19, 2018 5:10 pm
Forum: General discussion
Topic: GPIO rising edge false positives.
Replies: 3
Views: 108

Re: GPIO rising edge false positives.

pigpio scripts are incompatible with RPi.GPIO scripts.

The Python language has no support for GPIO, so no generic `hold timer` function exists. Modules such as RPi.GPIO and pigpio were written specifically for the Pi.

It sounds like you need to identify and fix the root cause of the problem.
by joan
Sun Aug 19, 2018 3:16 pm
Forum: General discussion
Topic: GPIO rising edge false positives.
Replies: 3
Views: 108

Re: GPIO rising edge false positives.

Is the signal meant to oscillate? If not then it may be better to work out what is going wrong. Perhaps a higher value external pull-up would help. pigpio does support this sort of usage using a glitch filter, but the maximum time supported is only 300 milliseconds. Assuming you are using GPIO 26 yo...
by joan
Sat Aug 18, 2018 7:11 am
Forum: Beginners
Topic: ESC beeping sequence not finishing
Replies: 1
Views: 57

Re: ESC beeping sequence not finishing

A standard ESC arm procedure is minimum throttle 2 seconds (1000µs pulses) then maximum throttle 2 seconds (2000µs pulses) then minimum throttle a second or so (1000µs). The following should generate the proper sequence. sudo pigpiod pigs s 18 1000 mils 2000 s 18 2000 mils 2000 s 18 1000 mils 2000 T...
by joan
Fri Aug 17, 2018 11:36 am
Forum: Advanced users
Topic: serial port API documentation
Replies: 5
Views: 175

Re: serial port API documentation

I'd avoid break if possible. Is it even part of any standard? Can you find an alternative way to signal the condition?
by joan
Fri Aug 17, 2018 8:04 am
Forum: Troubleshooting
Topic: pigpio/gpiotest fails with Raspberry Pi 3 Model B+ ?
Replies: 2
Views: 81

Re: pigpio/gpiotest fails with Raspberry Pi 3 Model B+ ?

pigpio has not correctly identified the Pi model. The pigpio version you are using (64?) assumes GPIO 0-31 are present on the expansion header if the Pi model can not be recognised. This is wrong for the Pi3B+ as only GPIO 0-27 are present. pigpio is therefore testing GPIO which should not be touche...
by joan
Fri Aug 17, 2018 7:55 am
Forum: Troubleshooting
Topic: only GPIO.PUD_UP works but event happens both rising and falling
Replies: 8
Views: 145

Re: only GPIO.PUD_UP works but event happens both rising and falling

Look up floating GPIO. The wire acts as an aerial. Normally the internal pull-up you have applied (about 50k ohm) would be enough to suppress EMF pulses. Presumably you need a stronger external resistor in your environment. This assumes you are getting more than one event. If it is a single event th...
by joan
Thu Aug 16, 2018 5:35 pm
Forum: Advanced users
Topic: serial port API documentation
Replies: 5
Views: 175

Re: serial port API documentation

What documentation do you expect for a serial port?

Any relevant documentation will be in the Python serial module you choose to use.
by joan
Thu Aug 16, 2018 3:21 pm
Forum: Troubleshooting
Topic: only GPIO.PUD_UP works but event happens both rising and falling
Replies: 8
Views: 145

Re: only GPIO.PUD_UP works but event happens both rising and falling

You need to ensure that the code you ask about is the same as the code you post.

Code: Select all

GPIO.add_event_detect(
    SWpin,
    GPIO.BOTH,
    callback=HH_Adj,
    bouncetime=200)
That code is asking to be told about both edges (the rising edge and the falling edge).
by joan
Wed Aug 15, 2018 5:15 pm
Forum: Beginners
Topic: Noob feeling stupid, in need of help! PIGPIO
Replies: 3
Views: 86

Re: Noob feeling stupid, in need of help! PIGPIO

If you are using Raspbian pigpio may be pre-installed.

If not you could use the following commands.

sudo apt-get update
sudo apt-get install pigpio python-pigpio python3-pigpio
by joan
Wed Aug 15, 2018 2:35 pm
Forum: Troubleshooting
Topic: Interrupt Button Only Firing ~10% Of Presses
Replies: 12
Views: 197

Re: Interrupt Button Only Firing ~10% Of Presses

The sleep 1 second is irrelevant as the interrupt is handled by a separate thread of execution.

The 200 millisecond "debounce" will not help.
by joan
Tue Aug 14, 2018 11:16 am
Forum: Troubleshooting
Topic: [SOLVED] RPi 3 ttyS0 holds TXD high
Replies: 11
Views: 165

Re: RPi 3 ttyS0 holds TXD high

Set the GPIO back to mode ALT0 to switch it back to UART mode.

I know pigs will do this. http://abyz.me.uk/rpi/pigpio/pigs.html#M/MODES

I'm fairly sure wiringPi's gpio utility lets you select the GPIO modes as well.
by joan
Tue Aug 14, 2018 8:23 am
Forum: Troubleshooting
Topic: Data capture via GPIO
Replies: 7
Views: 166

Re: Data capture via GPIO

If you want help we need the model number.
by joan
Tue Aug 14, 2018 7:55 am
Forum: Troubleshooting
Topic: Data capture via GPIO
Replies: 7
Views: 166

Re: Data capture via GPIO

You could cast a magic spell.

Alternatively if you tell us the type of ADC we might be able to offer advice.
by joan
Tue Aug 14, 2018 7:47 am
Forum: Troubleshooting
Topic: GPIO Pins are always on for some reason
Replies: 5
Views: 121

Re: GPIO Pins are always on for some reason

The 5V power rail pins, the 3V3 power rail pins, and the ground pins are not GPIO.
by joan
Mon Aug 13, 2018 2:58 pm
Forum: Troubleshooting
Topic: [SOLVED] RPi 3 ttyS0 holds TXD high
Replies: 11
Views: 165

Re: RPi 3 ttyS0 holds TXD high

You are mistaken. The line will be held high while there is no traffic. I think that would be the standard for all implementations.
by joan
Sat Aug 11, 2018 9:11 pm
Forum: Advanced users
Topic: dtoverlay=dht11?
Replies: 4
Views: 139

Re: dtoverlay=dht11?

The DHTxx series use a simple checksum rather than a CRC.

For a reliable reader try http://abyz.me.uk/rpi/pigpio/examples.html#pdif2_DHTXXD
by joan
Wed Aug 08, 2018 8:50 pm
Forum: C/C++
Topic: RasberryPi Zero W LED does not turn ON and does not set the GPIO high
Replies: 25
Views: 365

Re: RasberryPi Zero W LED does not turn ON and does not set the GPIO high

rohini wrote:
Wed Aug 08, 2018 8:45 pm
joan wrote:
Wed Aug 08, 2018 8:28 pm
Have you actually tested the LED to see if it works?
Yes I did . I connected it directly to 3.3 Volts and Pin 6 to ground . And it works.
Was that with the LED on the breadboard as in the photo?
by joan
Wed Aug 08, 2018 8:28 pm
Forum: C/C++
Topic: RasberryPi Zero W LED does not turn ON and does not set the GPIO high
Replies: 25
Views: 365

Re: RasberryPi Zero W LED does not turn ON and does not set the GPIO high

Have you actually tested the LED to see if it works?
by joan
Mon Aug 06, 2018 9:12 am
Forum: Troubleshooting
Topic: GPIO pins set to OUT give no voltage high
Replies: 7
Views: 193

Re: GPIO pins set to OUT give no voltage high

Have you run either of the GPIO tests?

Perhaps you could provide a photo of your Pi marked with pin 1 and pin 40.
by joan
Fri Aug 03, 2018 8:48 pm
Forum: Python
Topic: Raspi Zero I2C Speed
Replies: 4
Views: 126

Re: Raspi Zero I2C Speed

Could you explain what you mean by speed?

The default I2C bus rate is 100kbps which equates to 11k bytes per second.

Are you talking about the number of samples per second you get from the ADC? That will be much lower than the bit rate and probably only a third or so of the bytes per second.
by joan
Fri Aug 03, 2018 1:26 pm
Forum: Troubleshooting
Topic: GPIO pins set to OUT give no voltage high
Replies: 7
Views: 193

Re: GPIO pins set to OUT give no voltage high

Perhaps the GPIO are damaged.

wiringPi has a pintest utility.

pigpio has the gpiotest utility.

Both require that nothing is connected to the expansion header during the test.
by joan
Thu Aug 02, 2018 9:51 am
Forum: Python
Topic: GPIO and kivy
Replies: 3
Views: 1557

Re: GPIO and kivy

I suggest you post a general question outlining your task.

A lot of my code examples are done to please me (I enjoy writing software).

If you describe what you want to do in detail I am sure you will get useful replies.
by joan
Thu Aug 02, 2018 2:24 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Sending a string over serial from a raspberry pi using python
Replies: 1
Views: 74

Re: Sending a string over SPI from a raspberry pi using python

SPI is not often referred to as a serial link and is not anything to do with /dev/ttyAMA0.

You probably mean to use /dev/serial0 which is connected to the UART on GPIO 14/15 (pins 8/10).

See https://pinout.xyz/

Go to advanced search