Hi all,
How can I control 2 servo motor with attiny85,
I didn't find tutorial or anything else,
Please help
Thanks
Hi all,
How can I control 2 servo motor with attiny85,
I didn't find tutorial or anything else,
Please help
Thanks
I would start controlling one and ALL the stuff involved in that sentence (programming, etc)
Do you have one working already?
Connect the second to another output pin of your ATtiny85; create a second Servo object; and you should be good to go.
No, I didn't have working one yet,
I post this question because I don't know how to do for control servo with attiny85,
I didn't find a tutorial about this subject, please help !
Thanks
The default Servo library does not support the ATTiny85.
If you use ATTinyCore (installable through board manager using the json file in my sig), there is a built-in Servo library that DOES, however! (it otherwise behaves the same as the default Servo library, so code written for normal Arduinos will "just work")
If you've installed Servo (either manually or using board manager), however, it will use that (which doesn't support the t85) instead of the one supplied with the core (which does) - to handle that, recent versions of ATTinyCore also provide a copy of the t85-supporting version of Servo named Servo_ATTinyCore (identical except in name, so the IDE won't use the manually installed version of Servo)
Can you make an example of the source code
for controling 2 servo please ?
And what are the wiring between the attiny and the servo.
Thanks
Unnamedmaker:
I'm a beginner on arduino and attiny can you tell me how I can install attiny core and how to use it please ?
ATtiny projects are not beginner projects by a long stretch. Programming and especially debugging are much harder than on an Arduino (no Serial interface).
Start by getting your project working on a regular Arduino, then consider the move to an ATtiny and working with ATTinyCore (link because you're too lazy to even google that yourself).
DrAzzy:
If you've installed Servo (either manually or using board manager),
Doesn't it come installed by default with the IDE? I don't remember having had to install it manually.
I edited my post because I find how to install attiny core .
Someone can make a code example for control two servo? please
Thank you
Start with the sweep example, and other Servo examples of the IDE.
Thanks for your answer,
I find servo examples but they use the pin 9 and I don't understand why
I know the Attiny85 had only 8 pins so why it is the pin9 wich is used in those example ?
Can you tell me what wiring I need to do between Attiny85 and the servos
Unnamedmaker:
Thanks for your answer,I find servo examples but they use the pin 9 and I don't understand why
It's a nice number.
I know the Attiny85 had only 8 pins so why it is the pin9 wich is used in those example ?
Can you tell me what wiring I need to do between Attiny85 and the servos
The problem is that you quite obviously have NO CLUE of what you're talking about.
Do you even HAVE a servo and Arduino board of sorts?
If so, did you get any servos working already with it?
Do you even have an ATtiny85, and how do you (plan to) program the thing?
If you answer to any of those questions is "no", go do something about that instead of wasting our time with pointless questions that are way ahead of where you are now.
On the attiny85, you must use a pin number which exists on the chip - this would be 0~4 (it's an arduino pin number, not physical pin number). Any pin that is usable as normal I/O can be used to control a servo.
I would second the advice of making an identical sketch work on a normal arduino, and then moving to the attiny, so you can separate out problems related to the attiny85, vs problems relating to the sketch.
Since you seem to have no idea what you're doing, let me point out four common issues:
Ok, thank you very much