Working with Outputs- Motors and Movement

Made by Nicole Korber ·

Skills Development IV

Created: December 4th, 2022

0

Outcome

    • This should provide at least one clear illustration of the final outcome (photo or video as appropriate).
  • It should ideally have several supporting images as well as a video demonstrating the working prototype, circuit diagrams, etc.)
  • Add completed code and any supporting documentation and file (and/or a completed zip folder containing all of your source code)
  • a clear overhead (or top-down) photo of your completed circuit

0

Process

Describe the process you underwent to reach the outcome (problems encountered, how you resolved them, as well as, experiments, hacks, tests, refinments, iterations, failures)

0

Reflection

Reflect on the process of making this project. What did you learn? What would you do differently?

0
int servoPin = A3;
Servo myServo;
int servoPos = 0;


void setup() {
    myServo.attach( A3 );
    
    Particle.function("servo", servoControl);
    
    Particle.variable( "servoPos" , &servoPos , INT );
}

void loop() {
}

int servoControl(String command){


    int newPos = command.toInt();
    servoPos = constrain( newPos, 0 , 180);
    
    myServo.write( servoPos );
    return 1;

}
Click to Expand
x
Share this Project

This project is only accessible by signed in users. Be considerate and think twice before sharing.


Courses

About

Skills Development IV