Go to advanced search

by joan
Thu Apr 19, 2018 8:47 pm
Forum: Troubleshooting
Topic: GPIO Pin problems
Replies: 21
Views: 2145

Re: GPIO Pin problems

Help Please! I am a real Newbie & a old one at that. All my GPIO pins are not working, All it say's as follows: RuntimeError:Please set pin numbering mode using GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM). This i have done, yet no life. Is this the end of my zero ??? Cheers Paul It is prefer...
by joan
Thu Apr 19, 2018 8:00 pm
Forum: Troubleshooting
Topic: how many dc motor can raspberry pi zero control
Replies: 3
Views: 57

Re: how many dc motor can raspberry pi zero control

You can use any GPIO (and the UART, SPI, I2C etc. are GPIO).
by joan
Thu Apr 19, 2018 6:57 pm
Forum: Troubleshooting
Topic: how many dc motor can raspberry pi zero control
Replies: 3
Views: 57

Re: how many dc motor can raspberry pi zero control

You can use any of the GPIO. A L298N would need either 4 or 6 GPIO depending on how you choose to wire the motor enable lines. So number of spare GPIO/4 or /6.
by joan
Thu Apr 19, 2018 4:38 pm
Forum: Troubleshooting
Topic: Can't operate DC motor with L9110S motor controller
Replies: 2
Views: 35

Re: Can't operate DC motor with L9110S motor controller

I can't see a ground connection between the Pi and the L9110S.
by joan
Thu Apr 19, 2018 11:41 am
Forum: General discussion
Topic: Missing /dev/spidev*
Replies: 1
Views: 56

Re: Missing /dev/spidev*

Which operating system are you using?

What are the results of the following four commands?

uname -a

cat /etc/os-release

cat /proc/cpuinfo

lsmod
by joan
Thu Apr 19, 2018 11:38 am
Forum: Automation, sensing and robotics
Topic: HcSr-04 sensors not working with Raspberry Pi
Replies: 5
Views: 90

Re: HcSr-04 sensors not working with Raspberry Pi

@pcmanbob

That code is another variant with exactly the same bug.
by joan
Thu Apr 19, 2018 11:36 am
Forum: Troubleshooting
Topic: issues with i2c-tools and smbus modules
Replies: 6
Views: 107

Re: issues with i2c-tools and smbus modules

You are pretty much on your own when you use a custom kernel/distribution. There is little we can do to help.
by joan
Thu Apr 19, 2018 10:43 am
Forum: Automation, sensing and robotics
Topic: HcSr-04 sensors not working with Raspberry Pi
Replies: 5
Views: 90

Re: HcSr-04 sensors not working with Raspberry Pi

@SohaibAJ

That code is buggy. Variants of the code with the same bugs are the ones I come across most frequently.

It is useful in the sense that an aspiring programmer should be able to work out what is wrong with the while loops.
by joan
Thu Apr 19, 2018 7:22 am
Forum: Troubleshooting
Topic: issues with i2c-tools and smbus modules
Replies: 6
Views: 107

Re: issues with i2c-tools and smbus modules

Is there an i2c-dev entry in /etc/modules ? You shouldn't need that if I2C is defined in /boot/config.txt (which is easy to do with sudo raspi-config ). Things may have changed since I last looked. i2c-dev was an anomaly for reasons I only vaguely understood. It was not and should not have been loa...
by joan
Wed Apr 18, 2018 5:31 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3-Wire SPI Interfacing
Replies: 4
Views: 104

Re: 3-Wire SPI Interfacing

Thinking about it you might need to send two segments to the Linux kernel SPI driver. The first with the bytes to write, the second with the bytes to read.

I'm assuming SPI supports a chain of SPI commands in one transaction like the I2C driver does.
by joan
Wed Apr 18, 2018 1:33 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: 3-Wire SPI Interfacing
Replies: 4
Views: 104

Re: 3-Wire SPI Interfacing

Is 3-wire operation supported by the Linux kernel SPI driver?

My pigpio userland driver has support for 3-wire operation on the main SPI device (3-wire is not supported by the auxiliary SPI).
by joan
Wed Apr 18, 2018 12:19 pm
Forum: Troubleshooting
Topic: issues with i2c-tools and smbus modules
Replies: 6
Views: 107

Re: issues with i2c-tools and smbus modules

Is there an i2c-dev entry in /etc/modules?
by joan
Wed Apr 18, 2018 11:17 am
Forum: Raspbian
Topic: Verify that pin GPIO setup value
Replies: 1
Views: 52

Re: Verify that pin GPIO setup value

wiringPi's gpio utility should have a mode read function.

pigpio's pigs utility has the mg command.

http://abyz.me.uk/rpi/pigpio/pigs.html#MG/MODEG

(needs the pigpio daemon to be running - sudo pigpiod)
by joan
Wed Apr 18, 2018 9:40 am
Forum: Automation, sensing and robotics
Topic: DHT22 AM2302 problems
Replies: 4
Views: 104

Re: DHT22 AM2302 problems

Everything you have written appears to be correct. The datasheet suggests a 1k pull-up but I would have thought a 4k7 would have worked. GPIO4 is also used for the 1-wire bus by default if enabled (the AM2302 is not 1-wire bus compatible). It is worth checking that there is no mention of 1-wire in /...
by joan
Wed Apr 18, 2018 4:42 am
Forum: General discussion
Topic: Error when compiling a .c file using WiringPi library
Replies: 5
Views: 162

Re: Error when compiling a .c file using WiringPi library

You might have been able to just use -pthread. The libraries which are automatically loaded change from time to time, not randomly, but as the libraries which need them are themselves updated.
by joan
Wed Apr 18, 2018 4:35 am
Forum: Automation, sensing and robotics
Topic: DHT22 AM2302 problems
Replies: 4
Views: 104

Re: DHT22 AM2302 problems

It would be helpful to have a photo of your sensor and a link to where it was purchased. It may not be the model you think it is (the most likely reason for not being able to get a reading). Another useful diagnostic would be a photo of how you have connected it to the Pi. That would let us verify t...
by joan
Tue Apr 17, 2018 9:38 pm
Forum: General discussion
Topic: Error when compiling a .c file using WiringPi library
Replies: 5
Views: 162

Re: Error when compiling a .c file using WiringPi library

Perhaps

gcc -pthread blink.c -o blink -lwiringPi
by joan
Tue Apr 17, 2018 8:38 pm
Forum: Other projects
Topic: Need to find PWM amplifier
Replies: 4
Views: 162

Re: Need to find PWM amplifier

Can you give a link to the datasheet of the device you are emulating?
by joan
Tue Apr 17, 2018 2:07 pm
Forum: Troubleshooting
Topic: Reading temperature, LDR and POT analog values using MCP3008
Replies: 3
Views: 52

Re: Reading temperature, LDR and POT analog values using MCP3008

I'd like to see a photo of the connections.
by joan
Tue Apr 17, 2018 1:08 pm
Forum: Beginners
Topic: Problem in Interfacing MCP3428 with Raspberry Pi
Replies: 3
Views: 67

Re: Problem in Interfacing MCP3428 with Raspberry Pi

You shouldn't need the pull-up resistors as the Pi has them fitted already to the SDA/SCL GPIO. I doubt you need the capacitors either for a quick test.

Initially I'd just connect SDA/SCL, ground/power, and the address pins. I'd connect the address pins to ground.
by joan
Tue Apr 17, 2018 11:28 am
Forum: Troubleshooting
Topic: Can I have this stepper motor lock in position?
Replies: 4
Views: 99

Re: Can I have this stepper motor lock in position?

What do you mean by lock?
by joan
Tue Apr 17, 2018 10:13 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Gpio simultaneous reading
Replies: 7
Views: 193

Re: Gpio simultaneous reading

I didn't look any further because the posted code was incomplete. There were undefined symbols so it was impossible to see what was going on.
by joan
Tue Apr 17, 2018 10:10 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI delay between bytes is different for small and large transfers (spidev)
Replies: 3
Views: 133

Re: SPI delay between bytes is different for small and large transfers (spidev)

You will need to check with the maintainer of the Pi Linux kernel SPI driver (perhaps user msperl, but that may be a faulty memory).

Just to note that pigpio is a userland driver so will still suffer random inter-byte gaps caused by reschedules.
by joan
Tue Apr 17, 2018 9:59 am
Forum: Python
Topic: Watchdog or python SMbus has no installation candidate
Replies: 1
Views: 69

Re: Watchdog or python SMbus has no installation candidate

Perhaps you have not updated the repository package lists.

sudo apt-get install update

Then try again.
by joan
Mon Apr 16, 2018 5:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI delay between bytes is different for small and large transfers (spidev)
Replies: 3
Views: 133

Re: SPI delay between bytes is different for small and large transfers (spidev)

You might need to make a Linux SPI driver change (if the change is not present in the current driver). I have the following line in the pigpio driver for the main SPI device. I don't remember who discovered this fix, just that it wasn't me. spiReg[SPI_DLEN] = 2; /* undocumented, stops inter-byte gap...

Go to advanced search