Go to advanced search

by qtfp
Thu Feb 22, 2018 4:02 pm
Forum: Python
Topic: Pigpio HX711.py will hang
Replies: 14
Views: 2067

Re: Pigpio HX711.py will hang

I can't see anything obvious. I'll need to find my HX711 and hook it up. Not sure how long this will take. Right now, I use raspi <pigpio bb_serial< arduino nano <HX711. And it work fine, but still looking forward to know what's wrong~~ In the logic analyzer, The 25 pulses sending from raspi.pigpio...
by qtfp
Mon Feb 19, 2018 6:06 pm
Forum: Python
Topic: Pigpio HX711.py will hang
Replies: 14
Views: 2067

Re: Pigpio HX711.py will hang

As I say, if you post the complete code that you are using I will have a look. I am not going to speculate though. Thanks for your help!!! I am stuck here for a while #!/usr/bin/env python # HX711.py # 2016-05-01 # Public Domain CH_A_GAIN_64 = 0 # Channel A gain 64 CH_A_GAIN_128 = 1 # Channel A gai...
by qtfp
Mon Feb 19, 2018 4:48 pm
Forum: Python
Topic: Pigpio HX711.py will hang
Replies: 14
Views: 2067

Re: Pigpio HX711.py will hang

Could you post the complete amended code which hangs. If I get some time I'll give it a go and see if I can replicate the issue. Which version of pigpio are you using? ( pigs pigpv ). I don't actually amend anything important, I just prolong runtime and add some calculation for weights and it will ...
by qtfp
Mon Feb 19, 2018 3:36 pm
Forum: Python
Topic: Pigpio HX711.py will hang
Replies: 14
Views: 2067

Pigpio HX711.py will hang

I used the example from the official website http://abyz.me.uk/rpi/pigpio/code/HX711_py.zip and modified the """if __name__ == "__main__":""" part as follow: if __name__ == "__main__": import time import pigpio import HX711 def cbf(count, mode, reading): W =round((reading-(-295705.0))*50/(-317687-(-...
by qtfp
Fri Aug 04, 2017 4:41 am
Forum: Advanced users
Topic: AM2315, i2c, PIGPIO, bb_i2c_zip
Replies: 1
Views: 609

AM2315, i2c, PIGPIO, bb_i2c_zip

Hello, Recently, I tried to master i2c communication. Now I face some obstacles. First, using pi.i2c_open I can "sometimes" get right response from am2315. Here is my code and response: import time import pigpio SDA=2 SCL=3 baud= 50000 pi=pigpio.pi() while 1: try: s=time.time() h=pi.i2c_open(1,0x5c)...
by qtfp
Mon Jun 27, 2016 3:16 pm
Forum: Automation, sensing and robotics
Topic: pigpio unexpected crashed the system
Replies: 20
Views: 2641

Re: pigpio unexpected crashed the system

The problem has been solved by referring your "Wave PWM" example. The main key is to spin until the new wave has started, then we can delete the old_wid. It's really appreciate for your assistance and your amazing library~ :lol: :lol: :lol: :lol:
by qtfp
Mon Jun 27, 2016 4:48 am
Forum: Automation, sensing and robotics
Topic: pigpio unexpected crashed the system
Replies: 20
Views: 2641

Re: pigpio unexpected crashed the system

import pigpio import time import random pp=pigpio.pi() print pp.get_pigpio_version() while 1: pul=[] fre= random.randint(0,9999) pul.append(pigpio.pulse(gpio_on=(1<<23), gpio_off=0, delay=2)) pul.append(pigpio.pulse(gpio_on=0, gpio_off=(1<<23), delay=(abs(fre))))$ pp.wave_clear() pp.wave_add_generi...
by qtfp
Sun Jun 26, 2016 9:49 pm
Forum: Automation, sensing and robotics
Topic: pigpio unexpected crashed the system
Replies: 20
Views: 2641

Re: pigpio unexpected crashed the system

#!/usr/bin/env python import time import pigpio GPIO=23 NONE=0 pul1=[] pul1.append(pigpio.pulse(gpio_on=(1<<GPIO), gpio_off=NONE, delay=2)) pul1.append(pigpio.pulse(gpio_on=NONE, gpio_off=(1<<GPIO), delay=100-2)) pul2=[] pul2.append(pigpio.pulse(gpio_on=(1<<GPIO), gpio_off=NONE, delay=2)) pul2.appe...
by qtfp
Thu Feb 19, 2015 11:36 am
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: pigpio software serial links
Replies: 2
Views: 2751

Re: pigpio software serial links

I have tested this before. There is no error receiving from pigpio.wave_send_once to pc at baud:115200. But some error receiving from pc to pigpio.bb_serial_read at baud:115200. Also, I am wondering if pigpio will interfere with ttyAMA0. It's really interesting and powerful!! Each port on pi can sen...
by qtfp
Wed Feb 18, 2015 6:45 am
Forum: Beginners
Topic: Remote desktop with Mobaxterm does not work properly
Replies: 3
Views: 1709

Re: Remote desktop with Mobaxterm does not work properly

I have the same problem.
I believe it's the new lxde gui of raspbian.
by qtfp
Tue Feb 17, 2015 2:13 am
Forum: General programming discussion
Topic: pigpio and Pi 2
Replies: 13
Views: 3791

Re: pigpio and Pi 2

I just rule out saleae, it sampled fine with 25MHz signal. And I unplug any other devices connecting to raspi2 J8 pin. Still get the same. I don't have any 50 kps devices on my pi2~ :cry: :cry: Thanks for the helps! I will try upgrade update linux kernel first, right now it's 3.18.6-v7(compiled with...
by qtfp
Mon Feb 16, 2015 9:00 pm
Forum: General programming discussion
Topic: pigpio and Pi 2
Replies: 13
Views: 3791

Re: pigpio and Pi 2

Yes, yours looks pretty accurate! I need to check what's wrong with other thing like my kernel or my saleae... :cry: I go back to B+ with pigpio V29 and V24+, They all have this 0.75us remain state after 20us. ... It's not something I've seen. wave_1us_B+_Pi2.png Upper trace B+, lower trace Pi 2.
by qtfp
Mon Feb 16, 2015 5:06 pm
Forum: General programming discussion
Topic: pigpio and Pi 2
Replies: 13
Views: 3791

Re: pigpio and Pi 2

I go back to B+ with pigpio V29 and V24+, They all have this 0.75us remain state after 20us. .. On the other hand, I know in your manual says 1us minimum, but for setting 0 delay it actually output 0.25us. ... I wouldn't rely on that behaviour. It shouldn't output any delay. 1 µs is pretty much the ...
by qtfp
Mon Feb 16, 2015 3:57 pm
Forum: General programming discussion
Topic: pigpio and Pi 2
Replies: 13
Views: 3791

Re: pigpio and Pi 2

Thanks for the info. I test it with saleae 100M work in 100Mhz mode, resolution may be around 0.01us. In Pi2, I get additional 0.75us wrong signal for each 19~20us:(see picture) After 19.5us correct signal, I get this wrong 0.75us, during 0.75us it seem to remain state without changing. On the other...
by qtfp
Mon Feb 16, 2015 10:00 am
Forum: General programming discussion
Topic: pigpio and Pi 2
Replies: 13
Views: 3791

Re: pigpio and Pi 2

(achieving nothing in your case as the gpios are switched on then off (the off operation is performed after the on). Yes, but when the delay is set to 1 us like: pulses1.append(pigpio.pulse( 1<<port, 0, 1 )) pulses1.append(pigpio.pulse( 0, 1<<port, 1 )) 1us on and 1us off (500kHz) They are meant to...
by qtfp
Mon Feb 16, 2015 6:12 am
Forum: General programming discussion
Topic: pigpio and Pi 2
Replies: 13
Views: 3791

Re: pigpio and Pi 2

It work so perfect!! I try to pulsing 500khz, 1MHz, 2Mhz with pigpio.wave by below: import time import pigpio pi=pigpio.pi() port= 23 pulses1=[] pulses1.append(pigpio.pulse( 1<<port, 0, 0 )) pulses1.append(pigpio.pulse( 1<<port, 0, 0 )) pulses1.append(pigpio.pulse( 0, 1<<port, 0 )) pulses1.append(pi...
by qtfp
Tue Feb 10, 2015 12:31 pm
Forum: General discussion
Topic: The Raspberry Pi 2 Q&A thread
Replies: 442
Views: 115674

Re: The Raspberry Pi 2 Q&A thread

Hi qtfp, Do you have a /proc/device-tree folder ? I cross compile my kernel and miss the header signing for DT activation. That was my issue for GPIO, RPI GPIO python library use the device tree to work on RPI2. Regards Do you know how to get the device tree? I tried to build a kernel with usb touc...
by qtfp
Tue Feb 10, 2015 10:28 am
Forum: General discussion
Topic: The Raspberry Pi 2 Q&A thread
Replies: 442
Views: 115674

Re: The Raspberry Pi 2 Q&A thread

-bash: cd: /proc/device-tree: No such file or directory Thanks, this may be the reason~ Hi qtfp, Do you have a /proc/device-tree folder ? I cross compile my kernel and miss the header signing for DT activation. That was my issue for GPIO, RPI GPIO python library use the device tree to work on RPI2....
by qtfp
Tue Feb 10, 2015 9:39 am
Forum: General discussion
Topic: The Raspberry Pi 2 Q&A thread
Replies: 442
Views: 115674

Re: The Raspberry Pi 2 Q&A thread

I have installed rpi.gpio 0.5.10a, but can't get any correct signal while it is fine on b+. I did like here: "http://blog.adafruit.com/2015/02/05/how-to-fix-error-loading-rpi-gpio-python-library-on-your-brand-new-raspberry-pi-2/" Is anyone work GPIO properly that may give me a hint? Thanks! I just t...
by qtfp
Tue Feb 10, 2015 9:26 am
Forum: Off topic discussion
Topic: Joan reaches 7000 posts.
Replies: 12
Views: 1716

Re: Joan reaches 7000 posts.

Congratulations!

I have learned things from you! Nice we have you here.
Just got my pi 2, wait for pigpio 2 :)
by qtfp
Sun Nov 30, 2014 6:57 pm
Forum: Python
Topic: New pigpio Python module
Replies: 204
Views: 75260

Re: New pigpio Python module

It's good to have joan here! I tried the code with different time period and now it work fine. I find one difference between "wave_tx_repeat()" and "wave_send_repeat" The updating "wave_send_repeat" will get about 10ms delay between old and new waveform while "wave_tx_repeat()" will not. The "wave_t...
by qtfp
Thu Nov 27, 2014 7:46 pm
Forum: Python
Topic: New pigpio Python module
Replies: 204
Views: 75260

Re: New pigpio Python module

pattagghiu wrote:Try to see if this topic helps :)

http://www.raspberrypi.org/forums/viewt ... 37&t=79978

joan's teaching..
The code in that topic is amazing :o
I should learn from that too!!
by qtfp
Thu Nov 27, 2014 7:12 pm
Forum: Python
Topic: New pigpio Python module
Replies: 204
Views: 75260

Re: New pigpio Python module

Thanks for the code, I tried it. I got error Traceback (most recent call last): File "pigpio_wave_4pwm.py", line 74, in <module> wave(pi, 23, 200, 2, 0, 0) File "pigpio_wave_4pwm.py", line 70, in wave pi.wave_add_generic(wf) File "pigpio.py", line 1486, in wave_add_generic self.sl, _PI_CMD_WVAG, 0, ...
by qtfp
Wed Nov 26, 2014 5:32 am
Forum: Python
Topic: New pigpio Python module
Replies: 204
Views: 75260

Re: New pigpio Python module

You should be able to generate any waveform you want within reason. If you can specify the waveform I may be able to tell you the simplest way to create it using pigpio. Thanks for some knowhow. I want to control the pulsing speed to a4988 and step motor. And there will be at least 5 step motor, so...
by qtfp
Tue Nov 25, 2014 6:53 pm
Forum: Python
Topic: New pigpio Python module
Replies: 204
Views: 75260

Re: New pigpio Python module

Hey, Thanks for this extremely useful library! I am really happy with the pigpio.pwm and pigpio.waves. Now, I have some question. First, When I tried library "bcm2835", I found its PWM can run as fast as 4MHz. I tried to use it together with pigpio, but they seemed to cancel each other. Do you know ...

Go to advanced search