Hello to everyone, and some elementary question of crazyflie.
Posted: Wed Apr 25, 2018 11:57 pm
Greetings!
A new freshman says hello to the forum members. There are many things I want to say, but I would like to ask just a few questions that I have. I have read and read several articles on wikis and forums, and eventually have succeeded in hovering through python scripts. And while there have been many problems or questions, as I choose one, the important part is about the distribution of the code.
To be more precise, it is a role question about the firmware written in C and the library written in python.
Obviously the firmware will manipulate the motor and send and receive signals through the GPIO, and I wonder why python is doing it. On the wiki and the bitcraze homepage, I was told to start by blinking the LEDs through the firmware, but the python library was able to manipulate the motors in the script right away without any special function or class design.
Q.1
So it is a question. Does the motor control of the firmware overlap with the motor control of the python library?
If so, is it best to leave the firmware in its existing state and use only python?
(python did not matter, but main.c, which will be made in eclipse or terminal, had some problems, continuing from Q.2)
The results of the Python script were hopeful, but the firmware 'with one additional line' made via eclipse was not. I tried putting 'motorsBeep' function in main.c(in cf2.elf), but I was not able to compile it. The problem was the 'implicit declaration of function 'motorsBeep''.(I guess, this function with difference parameter would made the beep! Beep! bee.. bip! sounds occur at the initial condition of crazyflie..?)
Though I referenced "motors.h" as a header file, and the declaration was correct, the problem seems to be a syntax error in the firmware functions. To take a few things, the 'bool' function types(TRUE, FALSE), enumeration like ENABLE, and for register variable names predefined in macros like "TIM2" and "GPIO_Pin_9, was underlined red and the eclipse only says 'could not be resolved'.
Q.2
This problem has been identified in both the VM and the native Linux environment(in xubuntu 16.04). These syntax errors were also seen in several header and C files except for LED.h. How can I eliminate these syntax errors?
(and...)This is a question or difficulty that has not been resolved at this time, and I am going to ask about it because I can not confirm the information yet.
Q.3
I also found the c ++ library of 'Whoenig'. Are there any functional or usage differences comparing to the python library? It's more eye-catching because I'm more familiar with c++.
I will finish it with three questons, and I even feel a little sorry cause I seem to have asked too many questions for the first time.
These questions in my article do not need to be answered expeditiously, It's okay to answer slowly.
In the meantime, it was a big hurdle to create a native development environment on a laptop(which made me mad and mentally ill with black screen). Luckily, now that I'am in the front edge of programming stage so that I could have some breath finally. It was hard to solve by myself, but the wiki and forum helped me a lot. Thanks a lot for you.
A new freshman says hello to the forum members. There are many things I want to say, but I would like to ask just a few questions that I have. I have read and read several articles on wikis and forums, and eventually have succeeded in hovering through python scripts. And while there have been many problems or questions, as I choose one, the important part is about the distribution of the code.
To be more precise, it is a role question about the firmware written in C and the library written in python.
Obviously the firmware will manipulate the motor and send and receive signals through the GPIO, and I wonder why python is doing it. On the wiki and the bitcraze homepage, I was told to start by blinking the LEDs through the firmware, but the python library was able to manipulate the motors in the script right away without any special function or class design.
Q.1
So it is a question. Does the motor control of the firmware overlap with the motor control of the python library?
If so, is it best to leave the firmware in its existing state and use only python?
(python did not matter, but main.c, which will be made in eclipse or terminal, had some problems, continuing from Q.2)
The results of the Python script were hopeful, but the firmware 'with one additional line' made via eclipse was not. I tried putting 'motorsBeep' function in main.c(in cf2.elf), but I was not able to compile it. The problem was the 'implicit declaration of function 'motorsBeep''.(I guess, this function with difference parameter would made the beep! Beep! bee.. bip! sounds occur at the initial condition of crazyflie..?)
Though I referenced "motors.h" as a header file, and the declaration was correct, the problem seems to be a syntax error in the firmware functions. To take a few things, the 'bool' function types(TRUE, FALSE), enumeration like ENABLE, and for register variable names predefined in macros like "TIM2" and "GPIO_Pin_9, was underlined red and the eclipse only says 'could not be resolved'.
Q.2
This problem has been identified in both the VM and the native Linux environment(in xubuntu 16.04). These syntax errors were also seen in several header and C files except for LED.h. How can I eliminate these syntax errors?
(and...)This is a question or difficulty that has not been resolved at this time, and I am going to ask about it because I can not confirm the information yet.
Q.3
I also found the c ++ library of 'Whoenig'. Are there any functional or usage differences comparing to the python library? It's more eye-catching because I'm more familiar with c++.
I will finish it with three questons, and I even feel a little sorry cause I seem to have asked too many questions for the first time.
These questions in my article do not need to be answered expeditiously, It's okay to answer slowly.
In the meantime, it was a big hurdle to create a native development environment on a laptop(which made me mad and mentally ill with black screen). Luckily, now that I'am in the front edge of programming stage so that I could have some breath finally. It was hard to solve by myself, but the wiki and forum helped me a lot. Thanks a lot for you.