Jugueteando con la BETA9 y la librería de servos – OPEN HARDWARE / SOFTWARE / MIND
Menú Close

Jugueteando con la BETA9 y la librería de servos

Aquí un diseño rápido y educativo de PINGUINO, utilizando las librerías de servos he realizado este seguidor de sol, para nuestros proyectos solares….

[sourcecode language=»py»]
// Seguidor solar con libreria de servo beta9
// Walii walterleonardo@gmail.com 2010
#define PIC18F4550
uchar pos = 0; // Variable to store the servo position.
int inputPhotoLeft = 13; //LDR left sensor
int inputPhotoRight = 14; //LDR right sensor
int Left = 0; // Store readings from the photoresistors.
int Right = 0; // Store readings from the photoresistors.
int servo1 = 0; // Attach servo to pin 0.
void setup()
{
servo.attach(servo1);
}
void loop()
{
// Reads the values from the photoresistors to the Left and Right variables.
Left = analogRead(inputPhotoLeft);
Right = analogRead(inputPhotoRight);
// Checks if right is greater than left, if so move to right.
if (Left > (Right +10))
// +10 is the deadzone, so it won’t jiggle back and forth.
{
if (pos < 179) pos++; servo.write(servo1,pos); } // Checks if left is greater than right, if so move to //left. if (Right > (Left +10))
// +10 is the deadzone, so it won’t jiggle back and forth.
{
if (pos > 1)
pos -= 1;
servo.write(servo1,pos);
}
// Added ALOT of delay, increase or decrease if you want less or more speed.
delay(70);
}
[/sourcecode]

Saludos

Related Posts

62 Comments

  1. Sphinx (Jesús)

    Hola Walterleonardo,

    Soy Jesús el autor de la librería de servos. Es interesante ver que la gente aprovecha esta nueva capacidad de Pinguino para hacer sus propias creaciones.
    Me encantaría ver un video de ese girasol.

    Saludos,
    Sphinx.

  2. walterleonardo

    gracias por la libreria… es perfecta!
    en cuanto tenga un segundo subo el video.

  3. walterleonardo

    Muuuchas gracias… estaba justo buscando informacion sobre ese problema….

    gracias nuevamente.

  4. Kylie Mensing

    You could certainly see your enthusiasm in the work you write. The world hopes for even more passionate writers like you who are not afraid to say how they believe. Always follow your heart.

  5. Praca Bielsko Biała

    I’ve been exploring for a little bit for any high-quality articles or blog posts on this sort of area . Exploring in Yahoo I at last stumbled upon this website. Reading this info So i’m happy to convey that I have an incredibly good uncanny feeling I discovered exactly what I needed. I most certainly will make sure to do not forget this web site and give it a look regularly.

  6. Tanesha Briney

    I’d be inclined to give blessing with you one this subject. Which is not something I usually do! I love reading a post that will make people think. Also, thanks for allowing me to comment!

  7. wow schools review

    Hey I just wanted to let you know, I actually like the writing on your web site. But I am using Firefox on a machine running version 8.x of Xubuntu and the design aren’t quite correct. Not a big deal, I can still fundamentally read the articles and explore for information, but just wanted to inform you about that. The navigation bar is kind of hard to apply with the config I’m running. Keep up the good work!

  8. Ogłoszenia Poznań

    Thank you a lot for providing individuals with an extremely breathtaking opportunity to read from here. It’s usually very great plus packed with a lot of fun for me and my office friends to search your blog particularly thrice every week to read through the latest guidance you will have. Of course, I’m also at all times impressed with all the excellent tricks you give. Certain 3 areas in this post are absolutely the very best we’ve had.

  9. dirt bike parts

    I from validate up dorsum behind to your blog multifarious times. The added articles are incredibly captivating and interesting. I truthful to signup contrariety as a remedy for of your rss supported not later than, so I can suffocate in the discern of your latest editorials.

  10. ulysse nardin chronograph

    I just wanted to post a word so as to express gratitude to you for all the great concepts you are posting at this website. My incredibly long internet research has at the end of the day been honored with pleasant strategies to exchange with my partners. I would state that that we visitors actually are undeniably lucky to be in a decent community with very many brilliant people with very helpful things. I feel very privileged to have seen the webpage and look forward to some more pleasurable moments reading here. Thank you again for a lot of things.

  11. instant cash empire review

    The guidelines you shared here are really useful. Rrt had been such a fun surprise to have that waiting for me after i woke up this very day. They are constantly to the point and straightforward to learn. Thanks a ton for the valuable ideas you have shared right here.

  12. Shawna Remmers

    Great work! This is the type of info that should be shared around the web. Shame on the search engines for not positioning this post higher! Come on over and visit my web site . Thanks =)

  13. Brynn Sass

    This blog appears to recieve a great deal of visitors. How do you promote it? It offers a nice individual twist on things. I guess having something real or substantial to talk about is the most important factor.

  14. Best Chair Slipcovers

    Great beat ! I wish to apprentice while you amend your website, how could i subscribe for a blog website? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast provided bright clear idea

  15. Strong John Deere Lawn Mowers

    Its like you read my mind! You seem to know a lot about this, like you wrote the book in it or something. I think that you could do with a few pics to drive the message home a bit, but other than that, this is fantastic blog. A great read. I’ll definitely be back.

  16. Merrick Dog Food

    Hello there, just became alert to your blog through Google, and found that it’s truly informative. I’m gonna watch out for brussels. I will appreciate if you continue this in future. Many people will be benefited from your writing. Cheers!

  17. Hayden Lanquist

    I wish more people would write blogs like this that are really fun to read. With all the fluff floating around on the net, it is rare to read a blog like this instead.

  18. ninja blender reviews

    Pretty nice post. I just stumbled upon your blog and wished to say that I have truly enjoyed surfing around your blog posts. After all I’ll be subscribing to your feed and I hope you write again very soon!

  19. electric skillet

    I like the helpful info you provide in your articles. I’ll bookmark your blog and check again here frequently. I’m quite sure I will learn plenty of new stuff right here! Best of luck for the next!

  20. Davis Tumbaga

    I’d come to concur with you on this. Which is not something I typically do! I really like reading a post that will make people think. Also, thanks for allowing me to comment!

  21. Strattera online

    The new Zune browser is surprisingly good, but not as good as the iPod’s. It works well, but isn’t as fast as Safari, and has a clunkier interface. If you occasionally plan on using the web browser that’s not an issue, but if you’re planning to browse the web alot from your PMP then the iPod’s larger screen and better browser may be important.

  22. diflucan 150 mg no prescription

    Hands down, Apple’s app store wins by a mile. It’s a huge selection of all sorts of apps vs a rather sad selection of a handful for Zune. Microsoft has plans, especially in the realm of games, but I’m not sure I’d want to bet on the future if this aspect is important to you. The iPod is a much better choice in that case.

  23. diflucan 150

    You sure do know what youre talking about. Man, this blog is just great! I cant wait to read more of what youve got to say. Im really happy that I came across this when I did because I was really starting to get bored with the whole blogging scene. Youve turned me around, man!

  24. Keflex

    You got numerous positive points there. I made a search on the issue and found nearly all peoples will agree with your blog.

  25. wpisy

    Many thanks for your personal anxiety as well as initiatives! These things in your web site is actually amazing. Also We dramatically love your own suggestions. Personally they are crucial matters. Nonetheless cheers. Wonderful browse.

  26. adult film

    I do not mind sitting within my mobile computer as well as doing nothing but being surprised about how excellent and fantastic this blog of yours is actually. There’s no other website that keeps me glued for a while apart from yours. Please keep it up!

  27. laptop disposal slough

    Thanks for making me to attain new tips about desktops. I also contain the belief that one of the best ways to keep your mobile computer in best condition is by using a hard plastic-type case, and also shell, that matches over the top of the computer. A lot of these protective gear are usually model targeted since they are manufactured to fit perfectly over the natural outer shell. You can buy these directly from the seller, or from third party places if they are available for your notebook computer, however only a few laptop may have a covering on the market. All over again, thanks for your ideas.

Deja una respuesta

Tu dirección de correo electrónico no será publicada.

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.