autopilot
kaydara
Posts: 17
Hello my name is Daniel and I'm from Chile I wanted to see if I can help, I'm working on an autopilot, this includes far one accelerometer and one gyroscope, these sensors implemented in code in common work fairly well, but when I added a servo in the terminal code showed no sensor data, which led to stop working, one cause could be the voltage but has enough power for sensors and servo, I leave the code. Thank you very much beforehand.
Comments
Could you post your full source code? It's much easier to get a good idea of what is going on when we have the complete files to look at.
At this point, the only thing that I can see is in your servo object. The first line of the "principal" function is a cognew, and it is not indented at all. I don't know what the parser actually does, but it might be a bug source. You should indent it one step.
CODIGOS.zip
What are you using as a power supply?
I see you are using "waitcnt" to create your servo pulse. Have you tried using Servo32v7(in the Propeller Tool Library)? I attached a small demo for using Servo32v7 in post #15 of my QuickStart servo tester thread.
I think using the object Servo32v7 will make using the servo a lot easier for you.
if I have actually used the item Servo32v7 above and to no avail, the font used is a battery charger with variable voltage regulator.
Have you tried a simple test program with only code to move a servo?
Do you know how much current your battery charger/regulator can supply? I've had servo that didn't work well when powered from my bench power supply that worked a lot better when I used a high capacity battery pack.
charger is 1A to 12volt
Is there any progress on your project. I have seen quaternion based IMU code in your project.
Is it working properly ?