golaat / Adafruit.Pwm

C# implementation of Adafruit PWM Servo Pi Hat driver
MIT License
11 stars 1 forks source link

Could not copy file - "...\Adafruit.PWMServerDriver.rd.xml" #1

Closed SwampyPk closed 8 years ago

SwampyPk commented 8 years ago

Heya, before I begin. Just wanted to say thank you so much for releasing this! You saved me! Also, I'm relatively new to C# so please bear with if I sound like a complete newbie.

Basically I followed your instructions to test my servos by doing the following. 1). Ran the Adafruit.Pwm to generate the DLL files to reference. 2). Created a new windows universal application 3). Added a reference on my new universal windows application to the DLL file in: "...\Adafruit.Pwm\bin\ARM\Debug\Adafruit.Pwm.dll" PS: The Raspberry pi I'm connecting to is over a remote connection (not sure if that matters but just a few extra details!) 4). I also added a reference to the Windows IoT extensions for an error, (I forget what it asked for but it was gone after I added that reference, I can dig it up if you need me to!). 5). I added this code to my Mainpage.xaml.cs in the public MainPage(): const int servoMax = 480;

        this.InitializeComponent();
        var hat = new Adafruit.Pwm.PwmController(0x41);
        hat.SetDesiredFrequency(60);
        hat.SetPulseParameters(0, servoMax, false);

That's where I'm at right now. I get the ERROR: "Could not copy the file "...Adafruit.Pwm-master\Adafruit.Pwm\bin\ARM\Debug\Adafruit.pwm\Properties\PWMServerDriver.rd.xml" because it was not found".

Thanks ever so much, James .M PS: I know this isn't a charity and you're taking time out of your day, and I appreciate this so much! If you can't contact me for some reason, I really am desperate for an answer (been cowering the internet for some hours now) but here is my email: swampypk@hotmail.co.uk

Thanks again!

golaat commented 8 years ago

Greetings! Thanks for the feedback and I am glad you are finding the library helpful. Instead of adding a reference to the compiled DLL, add the project to your solution and add a project reference to it. I am out on vacation this week, so I don't have access to a Pi, but perhaps when I get back if you are still stuck I can try to help you out.

Date: Mon, 16 Nov 2015 16:28:48 -0800 From: notifications@github.com To: Adafruit.Pwm@noreply.github.com Subject: [Adafruit.Pwm] Could not copy file - "...\Adafruit.PWMServerDriver.rd.xml" (#1)

Heya, before I begin. Just wanted to say thank you so much for releasing this! You saved me! Also, I'm relatively new to C# so please bear with if I sound like a complete newbie.

Basically I followed your instructions to test my servos by doing the following.

1). Ran the Adafruit.Pwm to generate the DLL files to reference.

2). Created a new windows universal application

3). Added a reference on my new universal windows application to the DLL file in: "...\Adafruit.Pwm\bin\ARM\Debug\Adafruit.Pwm.dll"

PS: The Raspberry pi I'm connecting to is over a remote connection (not sure if that matters but just a few extra details!)

4). I also added a reference to the Windows IoT extensions for an error, (I forget what it asked for but it was gone after I added that reference, I can dig it up if you need me to!).

5). I added this code to my Mainpage.xaml.cs in the public MainPage():

        const int servoMax = 480;

    this.InitializeComponent();
    var hat = new Adafruit.Pwm.PwmController(0x41);
    hat.SetDesiredFrequency(60);
    hat.SetPulseParameters(0, servoMax, false);

That's where I'm at right now. I get the ERROR: "Could not copy the file "...Adafruit.Pwm-master\Adafruit.Pwm\bin\ARM\Debug\Adafruit.pwm\Properties\PWMServerDriver.rd.xml" because it was not found".

Thanks ever so much,

James .M

PS: I know this isn't a charity and you're taking time out of your day, and I appreciate this so much! If you can't contact me for some reason, I really am desperate for an answer (been cowering the internet for some hours now) but here is my email: swampypk@hotmail.co.uk

Thanks again!

— Reply to this email directly or view it on GitHub.

SwampyPk commented 8 years ago

Hello! Thanks for responding when you're on holiday! Please feel free to respond to this when convenient to you, I don't want to spoil your fun times!

I managed to get my program working but I'm just having a few glitches. 1). I would really love to know how to send information to other pins than the default 0x40. 2). It would be fantastic to get an idea of how to calibrate my servos to a "Reset position". 3). I'm using Micro RC servos in order to pan around with my articulating 3 axis arm I made, they aren't continuous and I think that if I set them to a pulse further then their rotation abilities the position it believes it has registered isn't the same as its physical position. EG: I used the default settings of ServoMin = 300; and servoMax = 480, then messed with it and now It only works using servoMin = 300; and servoMax = 660 to do the same task your initial settings did!

Any ideas? Thanks! Regards, James .M

Servos I'm using: http://www.amazon.co.uk/Tower-micro-Helicopter-Airplane-control/dp/B00UJ08IQ4/ref=sr_1_6?s=computers&ie=UTF8&qid=1447791250&sr=1-6&keywords=servo

SwampyPk commented 8 years ago

Quick update: Never mind part 3. I also figured out part 1! Good thing you wrote this well!! However I am very much still interested in ideas!

Thank you, James .M

SwampyPk commented 8 years ago

Heya, any updates?

Thanks! James .M

golaat commented 8 years ago

Hey there! I think you sent me an e-mail where you said you figured out #1 and #3... so what else can I help you with?

Date: Tue, 17 Nov 2015 12:19:17 -0800 From: notifications@github.com To: Adafruit.Pwm@noreply.github.com CC: artgola@hotmail.com Subject: Re: [Adafruit.Pwm] Could not copy file - "...\Adafruit.PWMServerDriver.rd.xml" (#1)

Hello! Thanks for responding when you're on holiday! Please feel free to respond to this when convenient to you, I don't want to spoil your fun times!

I managed to get my program working but I'm just having a few glitches.

1). I would really love to know how to send information to other pins than the default 0x40.

2). It would be fantastic to get an idea of how to calibrate my servos to a "Reset position".

3). I'm using Micro RC servos in order to pan around with my articulating 3 axis arm I made, they aren't continuous and I think that if I set them to a pulse further then their rotation abilities the position it believes it has registered isn't the same as its physical position. EG: I used the default settings of ServoMin = 300; and servoMax = 480, then messed with it and now It only works using servoMin = 300; and servoMax = 660 to do the same task your initial settings did!

Any ideas? Thanks!

Regards,

James .M

Servos I'm using: http://www.amazon.co.uk/Tower-micro-Helicopter-Airplane-control/dp/B00UJ08IQ4/ref=sr_1_6?s=computers&ie=UTF8&qid=1447791250&sr=1-6&keywords=servo

— Reply to this email directly or view it on GitHub.

SwampyPk commented 8 years ago

Hello! Sorry I took so long to respond.

I'm still wondering how to reset my servos to a default position. Any ideas?

Thanks! James .M

golaat commented 8 years ago

Hey there…. Sounds like you are working with a non-continuous rotating servo… right? I don’t really have any experience with these. My guess is that you are trying to “reset” the servo to an initial position? What servo are you working with. Perhaps if it is cheap enough I can pick one up and play around – for curiosity’s sake in the least :)

From: SwampyPk [mailto:notifications@github.com] Sent: Monday, December 07, 2015 8:13 AM To: golaat/Adafruit.Pwm Adafruit.Pwm@noreply.github.com Cc: Art artgola@hotmail.com Subject: Re: [Adafruit.Pwm] Could not copy file - "...\Adafruit.PWMServerDriver.rd.xml" (#1)

Hello! Sorry I took so long to respond.

I'm still wondering how to reset my servos to a default position. Any ideas?

Thanks! James .M

— Reply to this email directly or view it on GitHub https://github.com/golaat/Adafruit.Pwm/issues/1#issuecomment-162520482 . https://github.com/notifications/beacon/AFv5Wo3AAL9JwOsaqVJ2Ha7O86iVQPBrks5pNX1agaJpZM4GjdU1.gif

SwampyPk commented 8 years ago

What about with continuous servos? My cleaner broke my articulating arm that was supporting my camera and I'm going to have to rebuild it. (This time with stronger servos).

Thanks, James .M

golaat commented 8 years ago

well in the case of a continuous rotating servo, I don't think there really is such thing as a reset. I guess you could use time to track the rotation distance and store the state, but if someone manually turned the servo while it was off, it would mess up your state. Its an interesting question. I'm curious what you need the state information for...

Date: Wed, 9 Dec 2015 09:31:38 -0800 From: notifications@github.com To: Adafruit.Pwm@noreply.github.com CC: artgola@hotmail.com Subject: Re: [Adafruit.Pwm] Could not copy file - "...\Adafruit.PWMServerDriver.rd.xml" (#1)

What about with continuous servos? My cleaner broke my articulating arm that was supporting my camera and I'm going to have to rebuild it. (This time with stronger servos).

Thanks,

James .M

— Reply to this email directly or view it on GitHub.

SwampyPk commented 8 years ago

The main reason is to do with the wires on my servo hat to my servos only have a finite distance of travel before they begin to wrap around my servos. IE: before being turned off, there is a reset position and the pi would always assume its in this position so it can begin to keep track of its self once more when making adjustments.

Thanks, James .M

PS: However, I have no idea of how you could keep track of the position of the servo, but if you could, you could also use that instead to reset your position to the start position!

EDIT: Or store the information and read on startup.

SwampyPk commented 8 years ago

Hello! Just wondering if you had any ideas on my last post!

Thank you, James .M

SwampyPk commented 8 years ago

Hello again! Hope I'm not bothering you! Any ideas on my last post?

Thanks! James .M

golaat commented 8 years ago

No bother.... I did talk to a friend of mine who is a lot more familiar with servos than I am. Basically, he said that a continuous rotating servo acts very similar to a motor. If you wanted to track positional state, you would need to employ some sort of sensor in conjunction with the servo. You can then run the servo in a reset loop and "center" it based on when it trips the sensor. When it comes to non continuous servos, he said that the whole point is that you can precisely position them because of the limit blocks and the potentiometer they employ. I have not worked with these kind of servos, I can't really comment on any personal experience. My friend though seemed to imply that the signal you send to the servo would in effect precisely position it and that the "reset smarts" were built into the servo itself. Hope this helps....

Date: Sat, 19 Dec 2015 15:09:36 -0800 From: notifications@github.com To: Adafruit.Pwm@noreply.github.com CC: artgola@hotmail.com Subject: Re: [Adafruit.Pwm] Could not copy file - "...\Adafruit.PWMServerDriver.rd.xml" (#1)

Hello again! Hope I'm not bothering you!

Any ideas on my last post?

Thanks!

James .M

— Reply to this email directly or view it on GitHub.

SwampyPk commented 8 years ago

Thank you! I'll see what I can do!

Regards, James .M