Go to advanced search

by joan
Tue Oct 26, 2021 8:40 am
Forum: Device Tree
Topic: Incompatibility between gpiochip and Device Tree
Replies: 7
Views: 266

Re: Incompatibility between gpiochip and Device Tree

I thought a selling point of /dev/gpiochip was that it allowed control of GPIO access. It seems pointless if another kernel system can muck that up behind the scenes. I remember countless complaints about the likes of pigpio doing that.
by joan
Mon Oct 25, 2021 4:52 pm
Forum: Automation, sensing and robotics
Topic: GPIOzero Distance sensor giving wrong readings
Replies: 7
Views: 326

Re: GPIOzero Distance sensor giving wrong readings

If you have a screen on your Pi just start piscope (needs the pigpio daemon to be running). It doesn't need configuring.
by joan
Mon Oct 25, 2021 7:41 am
Forum: Automation, sensing and robotics
Topic: GPIOzero Distance sensor giving wrong readings
Replies: 7
Views: 326

Re: GPIOzero Distance sensor giving wrong readings

I am not sure but I think I have seen sonar rangers getting into a state where they start producing inverted signals. This can normally be cured by switching off and back on. I'd have a look at the signal using piscope. http://abyz.me.uk/rpi/pigpio/piscope.html That will show the trigger and response.
by joan
Sat Oct 23, 2021 5:18 pm
Forum: C/C++
Topic: Why should i use c++ not c?
Replies: 108
Views: 3481

Re: Why should i use c++ not c?

I think it is likely the OP has little programming experience. That said I expect the only practical choice will be Python.
by joan
Sat Oct 23, 2021 3:23 pm
Forum: Automation, sensing and robotics
Topic: Power servos with wall outlet?
Replies: 6
Views: 351

Re: Power servos with wall outlet?

Yes, that would work. I'd connect PSU ground and 5V to the servos.

Remember you also need to connect a Pi ground to a servo or PSU ground so there is a common reference voltage.
by joan
Sat Oct 23, 2021 2:56 pm
Forum: Automation, sensing and robotics
Topic: Power servos with wall outlet?
Replies: 6
Views: 351

Re: Power servos with wall outlet?

I tend to use old PC PSUs. You can get them pretty inexpensively and they provide lots of juice at 5V.
by joan
Sat Oct 23, 2021 2:36 pm
Forum: General
Topic: PWM limits
Replies: 9
Views: 599

Re: PWM limits

So am I correct to believe that if I am running 9 to 12 PWM pins for controlling LEDs independendtly, I would be able to individually control the brightness of all 12 LEDs when using the same frequency? That is correct; 2 controllers with 8 slices each allows up to 16 individual PWM channels. Remem...
by joan
Sat Oct 23, 2021 9:21 am
Forum: Beginners
Topic: installing a command
Replies: 7
Views: 245

Re: installing a command

You need to list the commands you issued together with the response.

You need to highlight the divergences between the blog and the results for you.
by joan
Fri Oct 22, 2021 5:03 pm
Forum: C/C++
Topic: SPI bus control in C/C++
Replies: 4
Views: 200

Re: SPI bus control in C/C++

More like

Code: Select all

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int fd;

fd = open("/dev/spidev0.0", O_WRONLY);
write(fd,  "\x37\xFF", 2);
close(fd);
Use man open etc. to find definitions.
by joan
Fri Oct 22, 2021 3:53 pm
Forum: C/C++
Topic: SPI bus control in C/C++
Replies: 4
Views: 200

Re: SPI bus control in C/C++

Possibly simplest to open the file, write the two bytes, close the file. E.g. C functions open, write, close. Alternatively use the Linux SPI driver directly. /* * spi-driver-speed.c * 2016-11-23 * Public Domain */ #include <stdio.h> #include <stdint.h> #include <string.h> #include <unistd.h> #inclu...
by joan
Fri Oct 22, 2021 10:45 am
Forum: Python
Topic: pigpio "IR Record and Playback 2015-12-21" example (irrp.py) / irplay
Replies: 10
Views: 387

Re: pigpio "IR Record and Playback 2015-12-21" example (irrp.py) / irplay

Do you still have a problem with flipping? I presume you mean the signal is switched between active low and active high.

There is an option to change the carrier frequency (default 38 kHz). I don't think you can switch it off though. All the kit i have worked with needs a carrier to work properly.
by joan
Fri Oct 22, 2021 8:53 am
Forum: C/C++
Topic: Why should i use c++ not c?
Replies: 108
Views: 3481

Re: Why should i use c++ not c?

Have you written such software before? The choice between C and C++ is probably irrelevant.
by joan
Wed Oct 20, 2021 3:28 pm
Forum: C/C++
Topic: Why should i use c++ not c?
Replies: 108
Views: 3481

Re: Why should i use c++ not c?

majieManooni wrote:
Wed Oct 20, 2021 3:01 pm
Thank you.
python is too slow for me needs.
Possibly. But we don't know your needs.

Python may be slower or faster than a C++ program. Without knowing what you are doing we can't tell which would be faster.

However it would likely be much faster to develop a working program in Python.
by joan
Wed Oct 20, 2021 9:07 am
Forum: General discussion
Topic: Can I delete my old posts
Replies: 10
Views: 447

Re: Can I delete my old posts

Yes. Edit them and remove all text.
by joan
Wed Oct 20, 2021 7:36 am
Forum: Troubleshooting
Topic: Raspberry Pi 3B+ green light blinking 7 times
Replies: 5
Views: 228

Re: Raspberry Pi 3B+ green light blinking 7 times

The solution is to provide a bootable image.

Presumably the SD card has a corrupted image.
by joan
Mon Oct 18, 2021 5:24 pm
Forum: Beginners
Topic: To which GPIO is the fan connected? (BOARD vs GPIO numbering schemes)
Replies: 5
Views: 224

Re: To which GPIO is the fan connected? (BOARD vs GPIO numbering schemes)

You will need additional circuitry if you want to control that fan. Do you need it? Most users do not need a fan.
by joan
Mon Oct 18, 2021 7:49 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: MCP23017 - cannot connect more than two at one tile to raspberry pi? (Pretty urgent, please help)
Replies: 12
Views: 494

Re: MCP23017 - cannot connect more than two at one tile to raspberry pi? (Pretty urgent, please help)

Try powering the MCP23O17 from 3V3 during tests. The Pi's GPIO (including SDA/SCL) are all 3V3. If you power the MCP23O17 from 5V it is out of spec for the Pi as SDA/SCL would need to be 0.7*5V to be seen as high (3.5V, which is more than the Pi's nominal 3V3). If you need to power the MCP23O17 from...
by joan
Fri Oct 15, 2021 5:46 pm
Forum: Off topic discussion
Topic: agile "technogy" ?
Replies: 25
Views: 1510

Re: agile "technogy" ?

I think it is being said that the beta testers of the Pi are the people who buy them, i.e. you and me.
by joan
Fri Oct 15, 2021 7:46 am
Forum: Other projects
Topic: Shift register showing all 1's / not working
Replies: 15
Views: 609

Re: Shift register showing all 1's / not working

We need to know how it is connected to the Pi. I suggest you set up one or two and then show clear photos of the connections. We know the datasheet. We need to be able to clearly see which wires go from pin to pin.
by joan
Wed Oct 13, 2021 4:06 pm
Forum: Beginners
Topic: Temperature sensors - how to determine what can work?
Replies: 1
Views: 100

Re: Temperature sensors - how to determine what can work?

If it's an analogue sensor it reports values by a varying voltage. The Pi has no analogue pins so you need to buy an ADC (Analogue to Digital Converter) to read the sensor. Digital sensors can be connected to the Pi if they have a serial, I2C, or SPI interface. In all cases you need to condition any...
by joan
Wed Oct 13, 2021 12:50 pm
Forum: General discussion
Topic: Servo not working with Raspberry Pi but works with Arduino
Replies: 10
Views: 543

Re: Servo not working with Raspberry Pi but works with Arduino

The sg90 is a generic design of servo. I must have 40 or so. All mine happen to work when controlled from the Pi GPIO. I buy the cheaper ones.
by joan
Wed Oct 13, 2021 8:49 am
Forum: Advanced users
Topic: [SOLVED] where is 19.2 MHz PWM clock set?
Replies: 5
Views: 387

Re: where is 19.2 MHz PWM clock set?

Page 105 of https://datasheets.raspberrypi.org/bcm2 ... herals.pdf is the primary source for clock info.

The rest I found sprinkled around sites/code/documents I don't remember.
by joan
Tue Oct 12, 2021 7:39 pm
Forum: Python
Topic: pigpio "IR Record and Playback 2015-12-21" example (irrp.py) / irplay
Replies: 10
Views: 387

Re: pigpio "IR Record and Playback 2015-12-21" example / irplay

From memory irrp.py attempts to normalise the received edges. It keeps track of the length of each edge and then tries to put them in groups of closely related edge lengths. It will then set all edge lengths in a group to the average in that group.
by joan
Tue Oct 12, 2021 7:52 am
Forum: Advanced users
Topic: [SOLVED] where is 19.2 MHz PWM clock set?
Replies: 5
Views: 387

Re: where is 19.2 MHz PWM clock set?

19.2 MHz is the crystal. Remember the Pi4 variants have a 54 MHz crystal.

Some info in my source here http://abyz.me.uk/rpi/pigpio/examples.h ... inimal_clk

The PWM clock is set in exactly the same way as all the other clocks.

Go to advanced search