Go to advanced search

by joan
Mon May 21, 2018 9:32 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI: How many bytes were sent?
Replies: 7
Views: 137

Re: SPI: How many bytes were sent?

Something like an Arduino Pro Mini should be fine. I think they can be run at 3V3 which simplifies interfacing with the Pi.
by joan
Mon May 21, 2018 9:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI: How many bytes were sent?
Replies: 7
Views: 137

Re: SPI: How many bytes were sent?

The Pi SPI hardware peripherals (main and auxiliary) only support being the master, i.e. you can not use it for Pi to Pi communications. The Pi does have a hardware peripheral which is meant to allow a SPI slave (called BSC) but I'm not aware of anyone getting it to work (I tried and failed). See ht...
by joan
Sat May 19, 2018 8:06 am
Forum: C/C++
Topic: Increase GPIO toggle frequency
Replies: 16
Views: 373

Re: Increase GPIO toggle frequency

There must be dozens of examples of interfacing with those registers.

Here is a small example of mine.

http://abyz.me.uk/rpi/pigpio/examples.h ... nimal_gpio
by joan
Thu May 17, 2018 10:53 am
Forum: C/C++
Topic: New linux GPIO (C++/C) poll Interrupt problem
Replies: 3
Views: 128

Re: New linux GPIO (C++/C) poll Interrupt problem

It's a well known problem with mechanical switches. Look up debounce, e.g.

http://www.labbookpages.co.uk/electronics/debounce.html
by joan
Thu May 17, 2018 9:16 am
Forum: Troubleshooting
Topic: All pins fried, don't know why
Replies: 24
Views: 539

Re: All pins fried, don't know why

The damage could have been done weeks ago in a moment of inattention. My understanding is that it spreads like a virus from the point of infection, no idea why.
by joan
Wed May 16, 2018 2:59 pm
Forum: Troubleshooting
Topic: All pins fried, don't know why
Replies: 24
Views: 539

Re: All pins fried, don't know why

As @B.Goode says a likely possibility is that RX (pin 10, GPIO 15) received more than 3V3 for a sustained period. What is connected to the serial link?
by joan
Wed May 16, 2018 7:27 am
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 13
Views: 329

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

My take is finding ways of doing things on the Pi without having to resort to additional hardware is a win win situation. The person doing the development learns a lot and it lowers the entry cost for everyone else wanting to experiment in the area - they may not need to spend money and time buying ...
by joan
Tue May 15, 2018 2:15 pm
Forum: Beginners
Topic: Changing PIGPIO SPI timing
Replies: 2
Views: 66

Re: Changing PIGPIO SPI timing

pigpio uses the SPI hardware for all timings. The only control you have is in setting the bit rate (bits per second transferred between the Pi and the SPI device). I think it would be exceptional if any of the timings on that diagram were configurable. I guess that diagram is intended for hardware e...
by joan
Tue May 15, 2018 12:30 pm
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 13
Views: 329

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

The bottleneck will be the Python callback processing code. It's not big, perhaps 20 or 30 lines of code but it's all Python and takes time. Doing the same with the C pigpiod_if2 interface might be hundreds of times faster for that code. I suspected the first bit, but even ten times faster would be...
by joan
Tue May 15, 2018 9:41 am
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 13
Views: 329

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

The bottleneck will be the Python callback processing code. It's not big, perhaps 20 or 30 lines of code but it's all Python and takes time.

Doing the same with the C pigpiod_if2 interface might be hundreds of times faster for that code.
by joan
Sun May 13, 2018 7:11 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Need true SPI device with datasheet
Replies: 1
Views: 103

Re: Need true SPI device with datasheet

Have a look at a SPI based ADC such as the MCP3202 or MCP3008. They will give a useful introduction to SPI, have good datasheets, and plenty of available software if the datasheet proves incomprehensible.
by joan
Sun May 13, 2018 7:06 am
Forum: Advanced users
Topic: Load Sensor HX711
Replies: 3
Views: 121

Re: Load Sensor HX711

It's not a particularly easy sensor to read reliably (because of some strict timing requirements which are hard for the Pi to meet from Linux). Try this example to see if it gives repeatable results (you will have to interpret any results yourself). http://abyz.me.uk/rpi/pigpio/examples.html#Python_...
by joan
Sat May 12, 2018 10:29 pm
Forum: Troubleshooting
Topic: Detect GPIO pins, to check for a bad solder job ?
Replies: 7
Views: 199

Re: Detect GPIO pins, to check for a bad solder job ?

That error message was not generated by pigpio/gpiotest. See https://elinux.org/R-Pi_Troubleshooting#Testing
by joan
Sat May 12, 2018 8:34 pm
Forum: Troubleshooting
Topic: Detect GPIO pins, to check for a bad solder job ?
Replies: 7
Views: 199

Re: Detect GPIO pins, to check for a bad solder job ?

wiringPi has a pintest utility.

pigpio has a gpiotest utility.

They both perform a sort of GPIO self test.
by joan
Sat May 12, 2018 7:34 am
Forum: Pidora / Fedora
Topic: Linux’s New GPIO User Space
Replies: 7
Views: 291

Re: Linux’s New GPIO User Space

I forgot to complement you on the GUI, it looks good.

Will you be publishing your work?
by joan
Fri May 11, 2018 8:26 pm
Forum: Pidora / Fedora
Topic: Linux’s New GPIO User Space
Replies: 7
Views: 291

Re: Linux’s New GPIO User Space

I had high hopes of the new gpiochip based kernel interface. I hope I am not using it properly as they have been dashed. It feels like the kernel interface only expects people to read a button or switch a LED on or off. As far as I can see a GPIO can only be in one mode at any one time - INPUT, OUTP...
by joan
Fri May 11, 2018 12:42 pm
Forum: Pidora / Fedora
Topic: Linux’s New GPIO User Space
Replies: 7
Views: 291

Re: Linux’s New GPIO User Space

I also have a new gpiochhip liibrary. I have not released it as it is only a small improvement over syfs. Do you think differently?
by joan
Fri May 11, 2018 10:03 am
Forum: Python
Topic: Time measurement in relation to sensor reading
Replies: 1
Views: 69

Re: Time measurement in relation to sensor reading

Depending on repeatability and resolution any Python library might work with time.time().

For another way see http://abyz.me.uk/rpi/pigpio/examples.h ... monitor_py
by joan
Fri May 11, 2018 5:17 am
Forum: Python
Topic: Python lux + wiringpi
Replies: 5
Views: 134

Re: Python lux + wiringpi

Is this in a class? You might need self as the first parameter.

Could you post the complete program? That would allow others to run the script in the same environment (if thy have the same environment).
by joan
Fri May 11, 2018 5:02 am
Forum: Français
Topic: Absence de fonctionnement capteur DHT11 (AdafruitDHT)
Replies: 7
Views: 225

Re: Absence de fonctionnement capteur DHT11 (AdafruitDHT)

Pardon, google.

Je crois que "device tree" est maintenant activée par défaut.

"I believe device tree is now enabled by default."
by joan
Thu May 10, 2018 6:52 pm
Forum: General programming discussion
Topic: How do I protect my code?
Replies: 32
Views: 1873

Re: How do I protect my code?

You can't protect your code. If you don't want people to copy it just make sure it is useless. If it is useful there are experts who will defeat any protection you use. But I want my Python code to achieve what I set up to do What is novel about your code? What will you do which has not been done b...
by joan
Thu May 10, 2018 4:50 pm
Forum: C/C++
Topic: wiringSerial usage
Replies: 9
Views: 236

Re: wiringSerial usage

It sounds like you have a simple logic problem.

It would be helpful if you posted what is sent, what is received, and what you expect.
by joan
Thu May 10, 2018 4:33 pm
Forum: C/C++
Topic: wiringSerial usage
Replies: 9
Views: 236

Re: wiringSerial usage

Stiller wrote:
Thu May 10, 2018 4:15 pm
...
I don't have an oscilliscope and have no idea how to sniff the traffic.
...
Sniff just means passively view without altering the content. In this case each of the mentioned alternatives would allow you to passively view the GPIO transitions.
by joan
Thu May 10, 2018 4:04 pm
Forum: C/C++
Topic: wiringSerial usage
Replies: 9
Views: 236

Re: wiringSerial usage

Use an oscilloscope or a digital analyser or piscope to sniff the traffic.
http://abyz.me.uk/rpi/pigpio/piscope.html

Go to advanced search