Dear DAVID Community,

As you are probably aware, the entire DAVID company, team and product range has been integrated into HP Inc.
This forum is now read-only. Relevant content has been migrated to HP and merged into HP's Support Forums on November 1, 2016.

To start new discussions for 3D Scanning, please register and post your new topic at the HP Support Forums

Arduino + Arduino Shield

Arduino + Arduino Shield

Postby Kondor1 » Sun Jan 13, 2013 3:40 am

Okay, i may seem lazy for asking, but I am going go try and reach out to those that have successfully used an Arduino + Arduino Shield (perhaps code is same for adafruit?)
I do know the Katie code will not work, I have my stepper working with the Arduino stepper test code, so i know it is wired properly. I am a little lost on getting it to work with David.
I purchased an Arduino Uno r3 and the matching Arduino Stepper Motor Shield r3. I do not need to power the laser at this point, or a turntable. I still have my LegoNxt for the turntable as of now as it was my previous setup. I intend to get setup for planeless scanning. SL scanning is already nice, but i want to replicate what i have seen others do. coins to cars. I am sorry that i am asking if someone else has already done this for assistance with coding, as i am brand new to Arduino controllers. I guess i was trying for simple thoughts of... hey i can get these off the shelf parts and jump right in without any knowledge....yeah i was wrong. Here is my test code that moves it one way then back...etc repeat. I will look over the katie code again to see what/how it does its thing.

Code: Select all
// Include the Stepper Library
#include <Stepper.h>

// Map our pins to constants to make things easier to keep track of
const int pwmA = 3;
const int pwmB = 11;
const int brakeA = 9;
const int brakeB = 8;
const int dirA = 12;
const int dirB = 13;

// The amount of steps for a full revolution of your motor.
// 360 / stepAngle
const int STEPS = 48;

// Initialize the Stepper class
Stepper myStepper(STEPS, dirA, dirB);

void setup() {
  // Set the RPM of the motor

  // Turn on pulse width modulation
  pinMode(pwmA, OUTPUT);
  digitalWrite(pwmA, HIGH);
  pinMode(pwmB, OUTPUT);
  digitalWrite(pwmB, HIGH);

  // Turn off the brakes
  pinMode(brakeA, OUTPUT);
  digitalWrite(brakeA, LOW);
  pinMode(brakeB, OUTPUT);
  digitalWrite(brakeB, LOW);

  // Log some shit

void loop() {
  // Move the motor X amount of steps
  // Pause

  // Move the motor X amount of steps the other way
  // Pause
Posts: 35
Joined: Mon Mar 14, 2011 2:51 pm

Re: Arduino + Arduino Shield

Postby Kondor1 » Mon Jan 21, 2013 4:27 pm

I am sorry, i meant to put in Arduino "Motor" Shield @
Posts: 35
Joined: Mon Mar 14, 2011 2:51 pm

Re: Arduino + Arduino Shield

Postby Kondor1 » Mon Feb 04, 2013 4:01 pm

Please disreguard and bump this thread, i found out with experimentation and the adafruit code that the generic one motor Arduino Motor shield at radio shack needed to be set at motor 1. Most people's code in the forums, have the default stepper motor as motor #2. Now i have 2 boards that function the exact same, one with 1 stepper motor support and one with stepper motor support. I love being an electronics noob. LOL

I guess later i will just use the second motor port to turn the turntable.
I might purchase a second arduino for the single motor controller and just use it as a turntable for SL scanning.
Posts: 35
Joined: Mon Mar 14, 2011 2:51 pm

Return to Hardware

Who is online

Users browsing this forum: No registered users and 2 guests