Go to advanced search

by joan
Thu Jun 21, 2018 6:56 am
Forum: General discussion
Topic: STICKY: PMs being turned off from June 13
Replies: 44
Views: 2100

Re: STICKY: PMs being turned off from June 13

As I pointed out years ago children can not use this site. They can not agree to the terms and conditions.
by joan
Thu Jun 21, 2018 5:06 am
Forum: Beginners
Topic: Pigpio Library Set Dutycycle Resolution Problem
Replies: 2
Views: 44

Re: Pigpio Library Set Dutycycle Resolution Problem

Some background. Every time pigpio samples the GPIO it can also write to the GPIO. By default this is 200 thousand times per second. The type of PWM used by pigpio has two characteristics: frequency and dutycycle. The default frequency is 800Hz which means there are actually 250 steps (800 * 250 = 2...
by joan
Wed Jun 20, 2018 5:08 pm
Forum: General discussion
Topic: recent serial i/o tutorial
Replies: 11
Views: 310

Re: recent serial i/o tutorial

Any library.

Could you explain what you are trying to do?
by joan
Wed Jun 20, 2018 4:55 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: SPI loopback not working PI 3
Replies: 2
Views: 153

Re: SPI loopback not working PI 3

If you are using a loopback try pigpio. It uses a different driver. Perhaps not a great deal of use but it should show if hardware is the problem.

$ sudo pigpiod

$ pigs spio 0 50000 0
0
$ pigs spix 0 1 2 3 4
4 0 0 0 0
$

If loopback works you should receive 4 1 2 3 4.
by joan
Wed Jun 20, 2018 12:34 pm
Forum: Beginners
Topic: Weird problem with GPIO in/out in RASP PI Zero and model B
Replies: 8
Views: 131

Re: Weird problem with GPIO in/out in RASP PI Zero and model B

Try

sudo pigpiod

pigs w 4 1 r 4 w 4 0 r 4
by joan
Wed Jun 20, 2018 11:45 am
Forum: Beginners
Topic: Weird problem with GPIO in/out in RASP PI Zero and model B
Replies: 8
Views: 131

Re: Weird problem with GPIO in/out in RASP PI Zero and model B

In your final example the GPIO is not read within the while loop.

The prior a=GPIO.input(22) assigns the current value of the GPIO to a. It does not declare a function "a" to read the GPIO.

Also see https://pinout.xyz/
by joan
Wed Jun 20, 2018 10:56 am
Forum: Off topic discussion
Topic: Pis find illegal images
Replies: 11
Views: 293

Re: Pis find illegal images

Off topic but the best spot not suitable for work device is a big public screen which shows random displays from workstations. I expect that would concentrate a few minds.
by joan
Wed Jun 20, 2018 10:17 am
Forum: Advanced users
Topic: Documentation bugs: RPi2&3 GPIO electrical specs
Replies: 131
Views: 9275

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Is hysteresis really that difficult to measure. I sort of expected this to be a pretty standard test from a hardware viewpoint. Is there no standard testing device? Wouldn't something as simple as a digital POT allow a test? Hysteresis is easy to measure. However you would only be measuring that on...
by joan
Wed Jun 20, 2018 9:54 am
Forum: Troubleshooting
Topic: Arduino to PI4J I2C convert problem
Replies: 4
Views: 72

Re: Arduino to PI4J I2C convert problem

I have used a SRF02 sonar ranger connected to the PI. I just used C. Do you have to use Java?

The wire begin transmission parameter is the I2C address of the device. It would be used at the Arduino end if it was acting as a slave (not the case when talking to a SRF02, it is the slave).
by joan
Wed Jun 20, 2018 9:29 am
Forum: Advanced users
Topic: Documentation bugs: RPi2&3 GPIO electrical specs
Replies: 131
Views: 9275

Re: Documentation bugs: RPi2&3 GPIO electrical specs

Is hysteresis really that difficult to measure. I sort of expected this to be a pretty standard test from a hardware viewpoint. Is there no standard testing device? Wouldn't something as simple as a digital POT allow a test?
by joan
Wed Jun 20, 2018 8:46 am
Forum: General discussion
Topic: Remotely send pulse to GPIO
Replies: 6
Views: 113

Re: Remotely send pulse to GPIO

Please be aware that writing to the GPIO using pigs will change the GPIO mode to OUTPUT. That may not invalidate your testing but if it does then use an unused GPIO and a jumper wire between the unused GPIO and the GPIO under test.

The pigs r (read) command does not change the GPIO mode.
by joan
Wed Jun 20, 2018 8:12 am
Forum: General discussion
Topic: Remotely send pulse to GPIO
Replies: 6
Views: 113

Re: Remotely send pulse to GPIO

pigpio and the pigs utility always use the Broadcom GPIO numbers.

See https://pinout.xyz/

Pin 40 is GPIO 21.
by joan
Wed Jun 20, 2018 7:38 am
Forum: General discussion
Topic: Remotely send pulse to GPIO
Replies: 6
Views: 113

Re: Remotely send pulse to GPIO

There are many ways. One is: Run (my) pigpio daemon on the Pi. sudo pigpiod If the remote machine is Linux you can use the pigs utility to change the GPIO. export PIGPIO_ADDR= remote_name_or_IP pigs w 5 0 pigs w 5 1 pigs w 5 0 mils 1000 w 5 1 If the remote machine isn't Linux you can use the pigpio ...
by joan
Tue Jun 19, 2018 5:58 pm
Forum: General discussion
Topic: Private messsages on forum dissappeared
Replies: 4
Views: 204

Re: Private messsages on forum dissappeared

I have reported your post with the title "Can lost private messages be retrieved?".

That will alert a moderator who may know if your lost messages can be retrieved or not.
by joan
Sat Jun 16, 2018 7:40 pm
Forum: C/C++
Topic: GPIO: should I learn sysfs or direct register access?
Replies: 5
Views: 1551

Re: GPIO: should I learn sysfs or direct register access?

GPIO sysfs is deprecated. I expect it will be around for another 10 years or so at least. I'm not very impressed with the /dev/gpiochip replacement.
by joan
Sat Jun 16, 2018 3:54 pm
Forum: C/C++
Topic: Writing data to BCM2835 - SPI
Replies: 24
Views: 712

Re: Writing data to BCM2835 - SPI

Unfortunately the questions show that nothing has been learned from previous answers. There is a clear lack of understanding of SPI which should be understood after a look at wiki. Most of the questions are easily answered by looking at existing SPI code. I can only speak for myself but my patience ...
by joan
Sat Jun 16, 2018 10:17 am
Forum: Advanced users
Topic: Trouble with real-time code
Replies: 13
Views: 443

Re: Trouble with real-time code

monitor.py shows the GPIO levels. It doesn't know or care what mode the GPIO are in (INPUT, OUTPUT, ALT0, ..., ALT5).

What are you trying to do?
by joan
Sat Jun 16, 2018 4:35 am
Forum: Advanced users
Topic: Trouble with real-time code
Replies: 13
Views: 443

Re: Trouble with real-time code

Does http://abyz.me.uk/rpi/pigpio/examples.h ... monitor_py also show a 50ms delay? Perhaps you mean 50µs?
by joan
Sat Jun 16, 2018 4:17 am
Forum: Automation, sensing and robotics
Topic: Motor Driver Not Working
Replies: 6
Views: 229

Re: Motor Driver Not Working

Please add a photo of the connections between the Pi and the motor (including the motor driver board).
by joan
Sat Jun 16, 2018 4:03 am
Forum: General discussion
Topic: Arduino board for only I/O purposes
Replies: 7
Views: 310

Re: Arduino board for only I/O purposes

Use any board you want. However the Pi GPIO must not be exposed to voltages outside the range 0 to 3.3V.
by joan
Sat Jun 16, 2018 3:37 am
Forum: Troubleshooting
Topic: gpio load i2c says module needs to be enabled
Replies: 8
Views: 268

Re: gpio load i2c says module needs to be enabled

Generally yes. If only connected devices respond to their addresses that suggests the I2C bus is functional.

A photo of the connections and a listing of the code being used will help.
by joan
Fri Jun 15, 2018 3:06 pm
Forum: Advanced users
Topic: Trouble with real-time code
Replies: 13
Views: 443

Re: Trouble with real-time code

What are you trying to do?
by joan
Thu Jun 14, 2018 4:52 pm
Forum: Beginners
Topic: GPIO PWM and changing duty cycle
Replies: 7
Views: 195

Re: GPIO PWM and changing duty cycle

As I said, add a delay. The script exits when there are no more commands to execute.
by joan
Thu Jun 14, 2018 3:37 pm
Forum: Beginners
Topic: GPIO PWM and changing duty cycle
Replies: 7
Views: 195

Re: GPIO PWM and changing duty cycle

You need to post code (especially Python) within code quotes so that its meaning can be understood.

I guess the script doesn't work as it finishes a few milliseconds after you run it. Put in a delay.

Go to advanced search