Articles

Affichage des articles associés au libellé PigPIO

Arduino Test

Image
After few days thinking why my quadcopter python algorithm does not work during real test, I finally suspect the pwm pigpio libray does not do the job. So I decided to test my algorithm using Arduino beacuse it has 4 hardware pwm pins. I bought Arduino Uno. So I started to rewrite my python algorithm in C/C++. During rewiting my code in C/C++, I feel to go back 20 years ago...in the 1990s....Use basic functions, keep care low usage memory... Using Arduino is very very different from Raspberry, Logs are basics, you must use serial communication using an usb cable. It is not so easy....But I finally ended my code. MPU6050 code is finished. I read it and compute roll/pitch. PID and speeds motors are compute too. Now I have to test my code again as I did with Raspberry I have not yet tested pwm harware pins. I should have do this first but I got a basic problem. In fact, my usb cable between my computer and my arduino/quadcopter is too short ! So I have to w...

Quadcopter - What is wrong ?

Last 2 days I made few tests with motors ON All tests confirm my previous vitual tests . But reality is not virtual and the quadcopter does not do what I thought ! As in my    previous vitual tests , fo r the first test, I tilted  my platform  in front and start the quadcopter with motors ON. I  thought the lower side will raise to go and stay in horizontal position. In fact, the lower side raised as expected but it did not stop to raise when it got horizontal position. It raised again and then the quadcopter turn over the other side.... Considering another little problem which is sometimes at startup only 3 of 4 motors starts normally. I suspect pigpio library not to do the job. Is this libray able to send PWM signal for all 4 motors ? Just remimber this is not a hardware PWM signal.... So today,.I don't know where to search...  I am a little desperate...

First test outdoor and first breakage !

Image
Yesterday morning, I did my first flight test out. 2 problems: My phone LG3 loses the wifi hotspotan then I can no longer control the raspberry Some propellers randomly do not start or not at the same speed as the others This morning, try again To correct my previous problems, I tested with my wife's Honor 5C phone. No more loss of wifi ;-) Instead of plugging the raspberry on the beak of an ESC, I plugged the raspberry on an external battery. No more problem starting the propellers. But the tests were not very conclusive ... The QuadCopter has indeed raised too much on one side. The other side did not stand up. So he tipped over and flipped over. This resulted in the breakage of 2 propellers. I still struggled to interpret the results of the logs because I do not know which side it rocked. In the future, I will have to film the flight so that I can analyze it later Here are some graphs of my simulations First test : I lean the quadcopter forward by 30 degrees...

RPIO = Rest In Peace

I wanted to use RPIO library to drive motors I did however some tests of the python library RPIO. I was confident ... In fact, I have a 2.0 beta version unknown (I don't remember whre i find it...) and it does not work well. Unable to address certain pins, the output is not in OUT .... In short it is a real problem. As a reminder, this library is essential to drive the motors. It allows to make PWM control in hardware without soliciting the cpu. PS: After a lot of search on Google last night, it seems that the RPIO library is not compatible with all the models of Raspberry. In any case, it does not work on my Raspberry Pi 2. I will test other libraries like ServoBlaster or PigPio PPS: Another solution, less headache, buy an add-on card that manages the PWM in hardware. For example, this  Adafruit 16-Channel  PWM

Building a Quadcopter using Raspberry Pi

Image
Building a Quadcopter using Raspberry Pi... The idea came to me during my holidays by reading an article by Andy Baker in the MagPI newspaper (numbers 19 and 20) On reading the article, a quadcopter appeared to me very simple to build. And then, according to my research, I realized nevertheless that there are a lot of knowledge to know and that it will be quite complicated .. . So I bought the material on ebay: The F450 frame The 4 motors The 4 propellers The 4 ESCs The LIPO 3S battery The MPU6050 (gyroscope / accelerometer sensor) F450 kit The MPU6050 (gyroscope / accelerometer sensor) For the flight controller part, I use a Raspberry Pi 2 that I already have. As passionate computer scientist, the idea is to program the Raspberry to drive the engines according to the MPU6050 sensor which will provide me informations on tilt and acceleration. So, I will not want to use the CC3D flight controller provided in the kit. For the remote control, ...