Posted on Leave a comment

Arduino – Control a Servo

Materials

  • Arduino Uno
  • Micro-Servo
  • Hookup Wire

Coding

In order to easily code for a Servo motor, it is best to use a library. This example uses the Servo.h library from barraganstudio.com

The code below is from the example, but with the pin changed and the comments removed.

/* Sweep
by BARRAGAN http://barraganstudio.com
This example code is in the public domain.modified 8 Nov 2013
by Scott Fitzgerald
http://www.arduino.cc/en/Tutorial/Sweep
*/
#include <Servo.h>

Servo myservo;

int pos = 0;

void setup() {
  myservo.attach(10);
}

void loop() {
  for (pos = 0; pos <= 180; pos += 1) { 
    myservo.write(pos);  
    delay(15); 
  }
  for (pos = 180; pos >= 0; pos -= 1) {
    myservo.write(pos); 
    delay(15);
  }
}

Wiring

The wiring for this example is very simple

  1. Connect +5v on the Arduino UNO to the Red wire on the Servo ( or +5v / Vcc if marked )
  2. Connect GND on the Arduino UNO to the Black wire on the Servo ( or GND if marked )
  3. Connect Pin 10 on the Arduino UNO to the remaining wire on the Servo

Posted on Leave a comment

Cura – Slicing Software

Cura is a very popular and easy to use slicing software. It is an Open Source software made by Ultimaker. The novice 3d Printing enthusiast will generally find Cura simple enough to get started but powerful enough to use for a long time. Cura removes some of the chores of preparing G-Code by automatically performing tasks like “center” and “lay flat”.

A downside to CURA is that is increasingly moving away from Home-brew printers and relying on manufacturer printer definitions. This author is moving away form CURA for that reason.

Some of the newer more interesting features is the material handling. With material definitions getting it’s own management CURA has begun the abstraction of material specific settings away from machine settings. This is probably a good thing.