Tuesday, November 15, 2011

A basic programme to read and write PWM signal


#include
int pin = 7;
int val  = 0;
Servo myservo;
unsigned long duration;

void setup()
{
  pinMode(pin, INPUT);
  //pinMode(9, OUTPUT);
  myservo.attach(9);
}

void loop()
{
  duration = pulseIn(pin, HIGH);
  duration = map(duration,1160,1780,0,179);
  myservo.write(duration);
}

20 comments:

  1. Now I am ready to do my breakfast, afterward having my
    breakfast coming yet again to read further news.


    Here is my weblog; does phen375 fat burner work
    Also see my page > phen375 reviews

    ReplyDelete
  2. You can utilize colored paper, silver tinsel, and fake snow to produce your house into a Xmas delight.
    It will appear excellent even though giving a sense of blissfulness to
    you and others. This time-honoured tradition goes back to pre-Christian times and though it is
    wonderful to follow the tradition, furthermore, it makes folks feel excited about forthcoming festivities.


    Feel free to surf to my weblog christmas decorating tips

    ReplyDelete
  3. Roller blinds becoming one of many basic types of blinds, which are controlled by strings attached to a roller, are least costing selections for window blinds.
    Needless to say, the pretty 1st things of baby room decoration to
    contemplate are the wallpaper or paint, plus the floor.
    People will commit significant time trying to discover the ideal solutions so that they could
    have an remarkable place to call their own.

    Also visit my webpage country almanac small room decorating magazine

    ReplyDelete
  4. It's impressive that you are getting thoughts from this article as well as from our argument made here.

    My web blog ... diets that work fast for women

    ReplyDelete
  5. Highly energetic post, I enjoyed that a lot.

    Will there be a part 2?

    Review my weblog; is quantrim safe
    my page: is quantrim scam

    ReplyDelete
  6. These fitness tips in above some basic ideas for keeping fit and healthy body.
    This means you have to answer to all these people when they ask for a report.

    This can be achieved by adding more weight, increasing the number of repetitions, or by adding on additional sets.


    Here is my web-site; related web page

    ReplyDelete
  7. What's up, its good paragraph on the topic of media print, we all be aware of media is a fantastic source of facts.

    Feel free to surf to my webpage ... click the next web page

    ReplyDelete
  8. Very often, these people give up before giving the program a real chance to work.
    We know because they have done so for millions of other people.
    The decisive factor is that men would want to show themselves as hot and rock solid before
    the fashionable ladies as ever.

    Here is my homepage - fitness tips articles

    ReplyDelete
  9. I am actually happy to glance at this blog posts which includes lots of helpful
    facts, thanks for providing these kinds of data.



    Also visit my web blog :: don-benjamin.co.uk

    ReplyDelete
  10. I also Love playing Online Games, Contest and Challenges.
    It is hard to imagine how athletes can do such entertaining and funny facial expressions, but apparently the desire
    to win is more important than image. So, to overcome this situation and to remain in a positive mood laughter therapy is the best solution
    which can be done by various ways by watching funny movies,
    by downlaoding some funny pictures or by doing chit chatting
    of funny text with your dear freinds.

    Feel free to surf to my web-site socialstudio.org

    ReplyDelete
  11. You need to flex those muscles regularly to keep them strong and resilient.
    So if you adopt them punctually, you will be surely able to gain your holistic health
    very soon. Another item to consider is to buy resistance bands, which help
    with stretching and yoga.

    Visit my blog; fun fitness tips and facts

    ReplyDelete
  12. Thousands protest in Russia at rallies across the
    nation. Indeed, internet is the best source of because it
    is easily accessible and fast. Indian business news tells about the facts that Indian
    market is most preferred by the foreign investors and also about various other factors like quick
    population growth, high economic growth, English knowledge etc.


    Feel free to surf to my page; Latest Daily News

    ReplyDelete
  13. If you want to find the lowest possible price on
    the Jack Lalanne Power Juicer or any other small appliance,
    try your nearest Costco. The guide style is also lighter on
    the pocket ebook. This juicer is a pioneering sensation, in fact
    the Breville 800JEXL Juice Fountain Elite Juicer has been branded.



    Also visit my page www.bje200xljuicer.com

    ReplyDelete
  14. Take a look at your schedule and come of with solutions ahead of time for lunches and dinners out, this will give you a
    game plan to follow. According to experts, water and juices from various kinds
    of fruit are essential part of good diet. If you have never exercised in the morning, then we urge you to try it at least for one week.


    Here is my web page ... fitness tips abs

    ReplyDelete
  15. People are very interested to watch the
    latest crime news. He tells the tale of a young boy, a tot, who
    was riding a toy car near the railroad crossing.
    On you left you will notice list of content providers and on
    the right is the advanced search option where you can search
    video clips by typing in the exact phrase (in quotes), or at least one of the keywords
    to narrow down your search.

    Feel free to visit my homepage topbottomboys.com

    ReplyDelete
  16. " Forum Threads " Blog Comments " Corporate Blogging " Social Network Profiles " Link Baiting. Talking of the walking dead, congratulations to Hugh Hefner, who is getting married at age 84 to 24-year-old beauty Crystal Harris. This is why the said Albanian gossip thashetheme celebrity news blog page is written in Albanian '.

    My page: www.imasturbate.org

    ReplyDelete
  17. bookmarked!!, I love your website!

    my page: anybody tried quantrim

    ReplyDelete
  18. bookmarked!!, I really like your blog!

    Review my web site click here

    ReplyDelete
  19. Or maybe you look at it from a monetary standpoint and decide
    that Guy Ritchie and Madonna divorce was worse because they were married so long and
    have children and there is a lot of money involved. Who does not want to know what is happening in our favorite celebrity''.
    Celebritynewsapp has developed a celebrity app which is getting
    popular day by day.

    Also visit my web-site - latest celeb news

    ReplyDelete
  20. Definitely believe that which you stated. Your favorite justification seemed
    to be on the web the simplest factor to take into accout of.
    I say to you, I certainly get annoyed at the same time as folks think about worries that they just do not
    recognise about. You managed to hit the nail upon the highest and defined out the whole
    thing without having side-effects , other people can take a signal.
    Will likely be back to get more. Thank you

    my site; research paper format mla

    ReplyDelete

There was an error in this gadget