Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Shield Base - PWM on PIN_10 not working?

pwm shield base servo

Best Answer Chris Walker, 28 December 2012 - 08:26 PM

Hi Piotr,

 

Nope, unfortunately, D10 pin alone is not working either... Is there something I could change on my side to make it work for now?

 

This is most likely something that we'll need to take care of in Shield Base Beta 5.  We're working on that now (adding in I2C support). 

 

The PWM code got updated in Beta 4, so you could always go back to an earlier version (but then you'd lose the SerialPort and SPI features).

 

We'll try to put a rush on Shield Base Beta 5.  We're trying to aggregate everything into one release, so that the next step is moving it out of beta.

 

Chris

Go to the full post


  • Please log in to reply
4 replies to this topic

#1 Piotr Szmyd

Piotr Szmyd

    New Member

  • Members
  • Pip
  • 3 posts
  • LocationWarsaw, Poland

Posted 28 December 2012 - 02:20 AM

Hi,

 

Have anyone tried to run two separate servos using Shield Base PWM_PIN_D9 and PWM_PIN_D10? I can't get mine to work (either using the Adafruit Motor Shield or connecting directly to the Shield Base). Running beta 4 firmware on the 'upgraded' SB version.

 

Every other combination with 2 PWM channels works flawlessly - only that PWM_PIN_D10 (channel 3, iirc) does not seem to work in any case. 

Read all topics on that I could find here and started losing hope to get that stuff working :(

 

Code is nothing fancy:

Microsoft.SPOT.Hardware.PWM servo1 = new Microsoft.SPOT.Hardware.PWM(shieldBase.PWMChannels.PWM_PIN_D9, 20000, 1500, Microsoft.SPOT.Hardware.PWM.ScaleFactor.Microseconds, false);Microsoft.SPOT.Hardware.PWM servo2 = new Microsoft.SPOT.Hardware.PWM(shieldBase.PWMChannels.PWM_PIN_D10, 20000, 1500, Microsoft.SPOT.Hardware.PWM.ScaleFactor.Microseconds, false);

 

 

with changing duration at timer ticks, based on potentiometer value (same for both servos).

Tried running it in a single thread and in two separate threads - no difference.

 

Any clues?

 

Best,

Piotr

 



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 December 2012 - 04:19 AM

Hi Piotr,

 

If you only use pin D10 by itself, does that work?

 

I believe that pin D10 is a 32-bit PWM (versus 16-bit).  That shouldn't affect your code...but if it's not working for you then it's something we should be able to fix fairly easily.

 

Welcome to the Netduino community,

 

Chris



#3 Piotr Szmyd

Piotr Szmyd

    New Member

  • Members
  • Pip
  • 3 posts
  • LocationWarsaw, Poland

Posted 28 December 2012 - 05:18 AM

Hi Chris,

 

Thanks! I've been here for a while, although reading and learning only :)

 

Nope, unfortunately, D10 pin alone is not working either... Is there something I could change on my side to make it work for now?

 

Cheers,

Piotr



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 28 December 2012 - 08:26 PM   Best Answer

Hi Piotr,

 

Nope, unfortunately, D10 pin alone is not working either... Is there something I could change on my side to make it work for now?

 

This is most likely something that we'll need to take care of in Shield Base Beta 5.  We're working on that now (adding in I2C support). 

 

The PWM code got updated in Beta 4, so you could always go back to an earlier version (but then you'd lose the SerialPort and SPI features).

 

We'll try to put a rush on Shield Base Beta 5.  We're trying to aggregate everything into one release, so that the next step is moving it out of beta.

 

Chris



#5 Piotr Szmyd

Piotr Szmyd

    New Member

  • Members
  • Pip
  • 3 posts
  • LocationWarsaw, Poland

Posted 13 January 2013 - 09:27 PM

Works flawlessly now (with Shield Base beta 5 firmware). Thanks a million!







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.