Go to advanced search

by joan
Thu Aug 16, 2018 5:35 pm
Forum: Advanced users
Topic: serial port API documentation
Replies: 1
Views: 44

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: 6
Views: 81

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: 78

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: 187

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: 159

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: 158

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: 158

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: 111

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: 159

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: 119

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: 344

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: 344

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: 181

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: 120

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: 181

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: 1546

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: 64

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/
by joan
Tue Jul 31, 2018 8:46 pm
Forum: Assistive technology and accessibility
Topic: Can a Pi be used in some way to prevent Dementia sufferers making landline calls to a specific number?
Replies: 15
Views: 442

Re: Can a Pi be used in some way to prevent Dementia sufferers making landline calls to a specific number?

Please e-mail her/your MP outlining the problem. They will not be able to directly help but they should be made aware of the problem.
by joan
Tue Jul 31, 2018 11:19 am
Forum: Advanced users
Topic: Using GPIO.add_event_detect in a threading class
Replies: 3
Views: 98

Re: Using GPIO.add_event_detect in a threading class

1. Does the script work and achieve what you want?

2. stop worrying.

use top or similar to see the resources used.
by joan
Mon Jul 30, 2018 6:45 am
Forum: General discussion
Topic: Why must the raspberrypi be so proprietary?
Replies: 41
Views: 1409

Re: Why must the raspberrypi be so proprietary?

The IP creator makes the rules. They decide what intellectual property to defend. The foundation don't own the IP.
by joan
Sun Jul 29, 2018 8:56 am
Forum: Troubleshooting
Topic: How to use BME280 connected with SPI?
Replies: 14
Views: 243

Re: How to use BME280 connected with SPI?

There are 6 wires.

I don't have either of the devices.

Could you explain the connections.

Eg. wire 1 (top) connects BME ? to HAT ?
by joan
Sun Jul 29, 2018 7:02 am
Forum: Python
Topic: Calling variables from different functions
Replies: 6
Views: 235

Re: Calling variables from different functions

Could you explain what you expect to happen and what actually happens? If there is an error the trace back often pinpoints the error.
by joan
Sun Jul 29, 2018 6:59 am
Forum: Troubleshooting
Topic: How to use BME280 connected with SPI?
Replies: 14
Views: 243

Re: How to use BME280 connected with SPI?

I would look at the source code and find out what error causes the error message to appear.

That should give a big clue.

I don't have that software so I will guess that you have not wired up the device correctly.

Could you add some clear photos of the wiring?
by joan
Sat Jul 28, 2018 12:41 pm
Forum: C/C++
Topic: What's wrong with wprintf?
Replies: 2
Views: 136

Re: What's wrong with wprintf?

The stream is either in byte mode or wide char mode. It will only print characters in the corresponding mode.

man fwide

Use fwide(stdout, 1) to set wide char mode.

Go to advanced search