Go to advanced search

by prem111
Mon Mar 23, 2020 9:34 pm
Forum: Python
Topic: PID Controller.
Replies: 6
Views: 230

Re: PID Controller.

Thank You for help !
by prem111
Mon Mar 23, 2020 6:48 am
Forum: Python
Topic: PID Controller.
Replies: 6
Views: 230

Re: PID Controller.

Thank you very much for your help. Could you put this code somewhere?
by prem111
Sun Mar 22, 2020 2:03 pm
Forum: Python
Topic: PID Controller.
Replies: 6
Views: 230

Re: PID Controller.

p=PID(0.5,0.1,0.1) p.point(0.0) pid = p.update(180) print(pid) pid = p.update(150) print(pid) pid = p.update(100) print(pid) pid = p.update(50) print(pid) pid = p.update(50) print(pid) pid = p.update(50) print(pid) pid = p.update(50) print(pid) pid = p.update(50) print(pid) -126.0 -90.0 -63.0 -38.0...
by prem111
Sun Mar 22, 2020 12:29 pm
Forum: Python
Topic: PID Controller.
Replies: 6
Views: 230

PID Controller.

Below is the concept of my PID controller. How to modify the controller so that in the case of the same input current_value = 50 the result would be -26, -27, -28 etc ... class PID: def __init__(self, P=1.0, I=0.0, D=1.0, Integrator_max=180, Integrator_min=-180): self.Kp=P self.Ki=I self.Kd=D self.D...
by prem111
Thu Mar 19, 2020 8:08 pm
Forum: Automation, sensing and robotics
Topic: Magnetometers calibration problem.
Replies: 0
Views: 64

Magnetometers calibration problem.

Hi, im using this python libs: https://github.com/MarkSherstan/MPU-6050-9250-I2C-CompFilter/blob/master/9DOF/main.py The problem is calibration, the sensor is installed on the boat. I can't calibrate using the "figure eight" method. Can I calibrate by doing a 360 degree rotation? How to do it so tha...
by prem111
Sat Feb 08, 2020 2:14 pm
Forum: Troubleshooting
Topic: Magnetometers problem...
Replies: 4
Views: 134

Re: Magnetometers problem...

Im use RTIMULib and RTIMUCal for Calibration. I use a compass on a boat that has a lot of metal components brush engines. I noticed after calbiration that they both have distortions but hmc5883l much smaller. Different modules more or less susceptible to external interference? Can any filters be use...
by prem111
Sat Feb 08, 2020 12:28 pm
Forum: Troubleshooting
Topic: Magnetometers problem...
Replies: 4
Views: 134

Magnetometers problem...

Hi. Im have magnetometer: mpu9250 Why does the rotate compass in my hands - the angle changes, but when I put it on an object and start to rotate object - the compass stands still? Sometimes it can "Surprise" and act but most of the time nothing happens .... I also checked on hmc5883l and it is the ...
by prem111
Wed Feb 05, 2020 5:25 pm
Forum: Automation, sensing and robotics
Topic: Problem with i2c - mpu9250.
Replies: 0
Views: 275

Problem with i2c - mpu9250.

Hi, Im have problem on i2c: Everything worked until I installed: RTIMULib After: File "./test2.py", line 7, in <module> mpu9250 = MPU9250.MPU9250() File "/root/mpu9250/MPU9250.py", line 105, in __init__ self.configAK8963(AK8963_MODE_C8HZ, AK8963_BIT_16) File "/root/mpu9250/MPU9250.py", line 171, in ...
by prem111
Wed Jan 08, 2020 6:27 am
Forum: Beginners
Topic: ZIgbee CC2530 Question.
Replies: 0
Views: 144

ZIgbee CC2530 Question.

Hi. I am going to buy the Zigbee CC2530 module.
Is the python library:
https://xbplib.readthedocs.io/en/latest ... brary.html
Will it work?
by prem111
Thu Jan 02, 2020 12:32 pm
Forum: Beginners
Topic: Problem with connect nRF24l01+ (nrf) RPI zero <-> RPI 3b (nrf)
Replies: 3
Views: 214

Re: Problem with connect nRF24l01+ (nrf) RPI zero <-> RPI 3b (nrf)

I've probably used all the possible libraries and still nothing ...
by prem111
Wed Jan 01, 2020 6:14 pm
Forum: Beginners
Topic: Problem with connect nRF24l01+ (nrf) RPI zero <-> RPI 3b (nrf)
Replies: 3
Views: 214

Re: Problem with connect nRF24l01+ (nrf) RPI zero <-> RPI 3b (nrf)

Hi before anyone can offer help can you post your code within code tags from the editor menu so it looks like this and retains the crucial indentations of your code. without using the code tags you loose all the crucial formatting which can change the flow and meaning of your code. Ok Done. Both th...
by prem111
Wed Jan 01, 2020 5:46 pm
Forum: Beginners
Topic: Problem with connect nRF24l01+ (nrf) RPI zero <-> RPI 3b (nrf)
Replies: 3
Views: 214

Problem with connect nRF24l01+ (nrf) RPI zero <-> RPI 3b (nrf)

Hi, im have problem. pins are connected correctly. But not connecting in two nRF24l01+ on two RPI. send script: #!/usr/bin/python # -*- coding: utf-8 -*- from nrf24 import NRF24 import time pipes = [[0xe7, 0xe7, 0xe7, 0xe7, 0xe7], [0xc2, 0xc2, 0xc2, 0xc2, 0xc2]] radio = NRF24() radio.begin(0, 0, 22,...
by prem111
Wed Jan 01, 2020 10:57 am
Forum: Troubleshooting
Topic: System crash on install RPIO module....
Replies: 1
Views: 137

System crash on install RPIO module....

Hi, After install rpio python module im give error: [email protected]:/tmp/RPIO# ./test.py Traceback (most recent call last): File "./test.py", line 3, in <module> from RPIO import PWM File "/usr/local/lib/python2.7/dist-packages/RPIO/PWM/__init__.py", line 60, in <module> from RPIO.PWM import _PWM I...
by prem111
Mon Dec 30, 2019 8:24 am
Forum: Other programming languages
Topic: nrf24l01 communicate via SPI in PERL
Replies: 0
Views: 418

nrf24l01 communicate via SPI in PERL

Hi,

Will I find specific examples of communication the nrf24l01 modules via SPI? Can I do it through the wiringpi module?

Thanks.
by prem111
Sun Dec 29, 2019 11:08 am
Forum: Other programming languages
Topic: Two servos in perl example.
Replies: 9
Views: 727

Re: Two servos in perl example.

Hi,

Rpi 3b
Os: Linux raspberrypi 4.19.75-v7+

Im trying RPi::WiringPi perl module, but I don't see the possibility of assigning pwm to any pin (as pwm software).

Pigpio run as a daemon works fine (with the pigs bash-command).
by prem111
Sat Dec 28, 2019 7:50 pm
Forum: Other programming languages
Topic: Two servos in perl example.
Replies: 9
Views: 727

Re: Two servos in perl example.

i found only RPi::PIGPIO with daemon pigpiod, but write_pwm function is only for volate level for pins.....
by prem111
Sat Dec 28, 2019 6:29 pm
Forum: Other programming languages
Topic: Two servos in perl example.
Replies: 9
Views: 727

Re: Two servos in perl example.

Is there something for RPIO in perl?
by prem111
Sat Dec 28, 2019 6:18 pm
Forum: Other programming languages
Topic: Two servos in perl example.
Replies: 9
Views: 727

Re: Two servos in perl example.

Ok problem solved. The problem was wrong connection of the PWM pins.

I have one more question, what is the solution for pwm software? I know there are two pwm hardware outputs. I need more. Do I have to use the rpi::pigpio library? I don't want to run daemons.
by prem111
Sat Dec 28, 2019 3:35 pm
Forum: Other programming languages
Topic: Two servos in perl example.
Replies: 9
Views: 727

Re: Two servos in perl example.

There are no errors. Both ESCs just don't work. When he hash

#pin_mode (ESC2_PIN, PWM_OUT);
and
#pwm_write (ESC2_PIN, 176);

First ESC works fine.


That's exactly what ESC is about, I wrote a servo for example.
by prem111
Sat Dec 28, 2019 2:22 pm
Forum: Other programming languages
Topic: Two servos in perl example.
Replies: 9
Views: 727

Two servos in perl example.

Hi. I would like an example of using 2 servos via gpio (PWM) in perl. Thanks. im use: use Term::ReadKey; use WiringPi::API qw(:all); use RPi::Const qw(:all); use Math::Round; use constant { MIN => 130, MAX => 210, ESC1_PIN => 12, ESC2_PIN => 6, NEUTRAL => 161, RANGE => 2000, SKIP => 1, }; setup_gpio...
by prem111
Fri Dec 27, 2019 4:47 pm
Forum: Other programming languages
Topic: ESC control in PERL.
Replies: 0
Views: 301

ESC control in PERL.

Hi, im using RPi::WiringPi module to control ESC brushed motors. Im use servo method eg:

my $esc1 = $pi->servo(12);
$esc1->pwm(160);
$esc1->pwm(170);
...

It works, but is that correct? are there other methods to control the ESC?

Thanks for reply.

Go to advanced search