Go to advanced search

by joan
Tue Jul 09, 2019 5:04 pm
Forum: General discussion
Topic: Two servo motors with different periods
Replies: 9
Views: 227

Re: Two servo motors with different periods

There are such servos. Some servos operate up to 500 Hz.

You can use the PWM peripheral to provide such signals.

Hers is my pigpio doing 50 Hz 2000 µs on GPIO 12 and 75 Hz 1000 µs on GPIO 13.

Code is gpioHardwarePWM in pigpio.c.
Screenshot from 2019-07-09 17-58-37.png
Screenshot from 2019-07-09 17-58-37.png (51.03 KiB) Viewed 217 times
by joan
Tue Jul 09, 2019 4:08 pm
Forum: Beginners
Topic: Intermittent Smbus IOError: [Errno 13] Permission denied
Replies: 2
Views: 76

Re: Intermittent Smbus IOError: [Errno 13] Permission denied

Is a resource being consumed? Running out of memory might result in a confusing error message. Also check the allocation of any file handles. If they are not been opened/closed properly you might run out of handles.
by joan
Tue Jul 09, 2019 11:43 am
Forum: General discussion
Topic: PWM Pulses
Replies: 11
Views: 371

Re: PWM Pulses

Does it matter? Is it stopping you doing what you want to do? The real range is the actual number of steps between off and fully on where there is an actual difference in the pulse output. That is of little interest to most people. They just want to know the way to set the minimum value (0) and the...
by joan
Tue Jul 09, 2019 8:36 am
Forum: General discussion
Topic: PWM Pulses
Replies: 11
Views: 371

Re: PWM Pulses

Does it matter? Is it stopping you doing what you want to do? The real range is the actual number of steps between off and fully on where there is an actual difference in the pulse output. That is of little interest to most people. They just want to know the way to set the minimum value (0) and the ...
by joan
Tue Jul 09, 2019 7:58 am
Forum: Troubleshooting
Topic: Only able to detect 1 out of 4 of my MPU6050s
Replies: 2
Views: 74

Re: Only able to detect 1 out of 4 of my MPU6050s

If the "write signal" was hitting the chip with a hammer then yes, that would stop the chip working.

If you mean something else you need to add detail.

Things like the software used, photos of the wiring etc.
by joan
Mon Jul 08, 2019 8:36 pm
Forum: Raspbian
Topic: BCM2835 library broken after move to RPI4
Replies: 1
Views: 143

Re: BCM2835 library broken after move to RPI4

There are several changes which need to be made by the library maintainer.
  • recognize it's running on a Pi4B.
  • use the new peripheral base address of 0xFE000000.
  • change the GPIO pull-up, pull-down software.
https://www.airspayce.com/mikem/bcm2835/
by joan
Mon Jul 08, 2019 3:17 pm
Forum: Beginners
Topic: DAQC2 plate Modes
Replies: 5
Views: 126

Re: DAQC2 plate Modes

For the sake of those of us (like me) who have no idea what a DAQC2 plate is it would be considerate of you to post links and add an explanation.
by joan
Mon Jul 08, 2019 11:40 am
Forum: General programming discussion
Topic: ESC Direction
Replies: 3
Views: 181

Re: ESC Direction

Not all motors can reverse.

I think we would need details of your motor and your ESC.
by joan
Sun Jul 07, 2019 9:52 am
Forum: Off topic discussion
Topic: OMG - I can't believe I did this
Replies: 11
Views: 714

Re: OMG - I can't believe I did this

Oh dear. I hope you didn't lose anything too precious. :(
by joan
Sat Jul 06, 2019 9:35 pm
Forum: General discussion
Topic: Raspberry Pi 4 Thread - general discussion
Replies: 752
Views: 64815

Re: Raspberry Pi 4 Thread - general discussion

HawaiianPi wrote:
Sat Jul 06, 2019 9:24 pm
Has anyone posted the dimensions of the Pi4 SoC? Tried a google and forum search to no avail, and the mechanical drawing does not show the size of the SoC.
Have a look at https://www.raspberrypi.org/forums/view ... 1&t=244427
by joan
Sat Jul 06, 2019 8:06 am
Forum: Troubleshooting
Topic: UART rpi4 braud rate?
Replies: 14
Views: 306

Re: UART rpi4 braud rate?

What is arm_freq=2150 meant to do?
by joan
Sat Jul 06, 2019 7:18 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: PWM specs
Replies: 3
Views: 179

Re: PWM specs

The pigpio software PWM defaults are 800 Hz with 250 steps (internally mapped to 0-255). If you lower the frequency you get more resolution. If you higher the frequency you get less resolution. E.g. at 8000 Hz there are 25 steps, at 200 Hz there are 1000 steps. The pigpio hardware PWM defaults are 2...
by joan
Fri Jul 05, 2019 12:20 pm
Forum: Beginners
Topic: Which one is a master device between a raspberry pi and arduino
Replies: 5
Views: 217

Re: Which one is a master device between a raspberry pi and arduino

There is a dedicated SPI/BSC SLAVE peripheral to support SPI/I2C as a slave device on the Pi. It is documented from page 160 of the Broadcom spec. http://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf It doesn't work properly for SPI. Perhaps that has been...
by joan
Fri Jul 05, 2019 11:46 am
Forum: General discussion
Topic: PWM Pulses
Replies: 11
Views: 371

Re: PWM Pulses

I have no idea what you mean by the peak to peak voltage, the GPIO are 3V3 or ground. The effective voltage read by a digital voltmeter will probably be wrong. An analogue meter will probably show a linear scale from 0% to 100% dutycycle. Say you are using (Broadcom) GPIO 4, 5, 6 and 7. pigs pfs 4 8...
by joan
Fri Jul 05, 2019 8:05 am
Forum: General discussion
Topic: PWM Pulses
Replies: 11
Views: 371

Re: PWM Pulses

pigpio provides this to some extent. As an example experiment with the pigs pwm command. http://abyz.me.uk/rpi/pigpio/pigs.html#P/PWM The pulses will start at the same time for each GPIO regardless of the dutycycle as long as they use the same frequency. Only a limited number of frequencies are supp...
by joan
Fri Jul 05, 2019 7:53 am
Forum: Beginners
Topic: Which one is a master device between a raspberry pi and arduino
Replies: 5
Views: 217

Re: Which one is a master device between a raspberry pi and arduino

What mahjongg says is correct for most purposes. However the Pi does have an I2C slave device which is usable in a number of circumstances (indeed I think if someone wrote a kernel driver it would be very useful). pigpio provides userland access. e.g. from Python see http://abyz.me.uk/rpi/pigpio/pyt...
by joan
Thu Jul 04, 2019 8:20 pm
Forum: Off topic discussion
Topic: Why did positive thread get deleted?
Replies: 26
Views: 1472

Re: Why did positive thread get deleted?

I would second a rename to Miscellaneous Raspberry Pi. Off topic is usually an anything goes forum.
by joan
Thu Jul 04, 2019 7:56 pm
Forum: General discussion
Topic: Going from wiringpi to pigpio (Or how to set hardware PWM in python correctly in pigpio)
Replies: 2
Views: 99

Re: Going from wiringpi to pigpio (Or how to set hardware PWM in python correctly in pigpio)

You don't need to set the mode. pigpio sets it as part of the PWM command. pigpio uses the 500 MHz PLLD as the clock source for the PWM peripheral (rather than the 19.2 MHz crystal). For a frequency of 25 kHz the resolution in steps is 250 million divided by 25 thousand, or 10000. This is automatica...
by joan
Wed Jul 03, 2019 8:29 pm
Forum: General discussion
Topic: Pi 4 firmware, software stability improvements
Replies: 66
Views: 7136

Re: Pi 4 firmware, software stability improvements

Your question is a bit light on detail. What software is not stable?
by joan
Wed Jul 03, 2019 7:42 pm
Forum: Python
Topic: Python letters to morse code to GPIO signal
Replies: 1
Views: 103

Re: Python letters to morse code to GPIO signal

The functions a and b are defined as a single line "GPIO.output(11,True)". I expect the following statements are also meant to be indented.
by joan
Wed Jul 03, 2019 4:42 pm
Forum: C/C++
Topic: Clock_nanosleep issues
Replies: 1
Views: 161

Re: Clock_nanosleep issues

Could you post a complete program which shows the problem? One which we can run and test.
by joan
Wed Jul 03, 2019 3:32 pm
Forum: Automation, sensing and robotics
Topic: Using the HC-SR04 ultrasonic receiver
Replies: 4
Views: 118

Re: Using the HC-SR04 ultrasonic receiver

In your other post you mentioned the Arduino Uno.

Software used on the Pi won't be optimal on an Arduino (strangely enough most of the poor Pi software for the HC-SR04 was ported from a good Arduino solution without considering the differences between the platforms).
by joan
Wed Jul 03, 2019 3:12 pm
Forum: Automation, sensing and robotics
Topic: Using the HC-SR04 ultrasonic receiver
Replies: 4
Views: 118

Re: Using the HC-SR04 ultrasonic receiver

What is wrong with the many solutions offered when you google "raspberry pi sr04"?
by joan
Wed Jul 03, 2019 12:24 pm
Forum: Beginners
Topic: First project: Powering DC motor
Replies: 9
Views: 219

Re: First project: Powering DC motor

The ULN2x03 series will be fine.

You ALWAYS need a driver to control DC motors from the Pi.

Your choice is either to build one yourself out of discrete components or to buy one ready assembled.

Go to advanced search