Editing SG90 Servo
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
'''In many computers the current is not enough to drive the servo!!!''' | '''In many computers the current is not enough to drive the servo!!!''' | ||
− | '''If it does not work, keeps disconnecting, or rebooting the ESP the power is not sufficent and you need | + | '''If it does not work, keeps disconnecting, or rebooting the ESP the power is not sufficent and you need an extra power supply.''' |
− | |||
− | |||
= Schematic - Connecting the SG90 = | = Schematic - Connecting the SG90 = | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | = | + | = Code Example ESP8266 = |
A0 is the analog input with 10 bit resolution. It reads the analog value every second and print it to the console and sets the servo based on the analog input. | A0 is the analog input with 10 bit resolution. It reads the analog value every second and print it to the console and sets the servo based on the analog input. | ||
Line 56: | Line 26: | ||
sleep(1) | sleep(1) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |