Show Posts
Pages: [1]
1  Community / Exhibition / Gallery / GPS Logger on: August 29, 2012, 10:46:58 am
Just a simple GPS logger using Arduino Uno, Seeed Studio SD card Shield, and Parallax 28500-RT PMB-648 GPS SiRF Internal Antenna. I hope the modified sketch is useful to someone like me who had difficulty finding a good example.

Code:
/*
 This Sketch uses the TinyGPS library and SD card library to log GPS data and save it on a SD card.
 
 Important: This version is intended for Arduino 1.0 IDE. It will
 not compile in earlier versions. Be sure the following files are
 present in the folder with this sketch:
 
 TinyGPS.h
 TinyGPS.cpp
 keywords.txt
 
 A revised version of the TinyGPS object library is included in the sketch folder
 to avoid conflict with any earlier version you may have in the Arduino libraries
 location.
 */

#include <SoftwareSerial.h>
#include "./TinyGPS.h"                 // Special version for 1.0
#include <SD.h>                        // Standard Arduino SD card library

File myFile;


TinyGPS gps;
SoftwareSerial nss(6, 255);            // Yellow wire to pin 6. (Based on using
                                       // Parallax 28500-RT PMB-648 GPS SiRF Internal Antenna)

void setup() {
  Serial.begin(115200);
  nss.begin(4800);
  Serial.println("Reading GPS");

// Initialize SD card

 Serial.print("Initializing SD card...");
 
   pinMode(10, OUTPUT);
   
  if (!SD.begin(10)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
 
// End initialize SD Card

}

void loop() {
  bool newdata = false;
  unsigned long start = millis();
  while (millis() - start < 5000) {  // Update every 5 seconds
    if (feedgps())
      newdata = true;
  }
  if (newdata) {
    gpsdump(gps);
   
  }
}

// Get and process GPS data
void gpsdump(TinyGPS &gps) {
  float flat, flon;
  unsigned long age;
  gps.f_get_position(&flat, &flon, &age);
  Serial.print(flat, 4);
  Serial.print(", ");
  Serial.println(flon, 4);
 
   /// And write it to SD card
       myFile = SD.open("tracking.txt", FILE_WRITE);
 
  // if the file opened okay, write to it:
  if (myFile) {
    Serial.print("Writing to tracking.txt...");
    myFile.print(flat, 4);
    myFile.print(", ");
    myFile.println(flon, 4);
    // close the file:
    myFile.close();
    Serial.println("done.");
  } else {
    // if the file didn't open, print an error:
    Serial.println("error opening tracking.txt");
  }
    /// 
 
}

// Feed data as it becomes available
bool feedgps() {
  while (nss.available()) {
    if (gps.encode(nss.read()))
      return true;
     
  }
  return false;
}


2  Community / Exhibition / Gallery / Re: 7ft Camera Slider on: March 12, 2012, 05:52:48 pm
So I went ahead and purchased and assembled the dolly shield from Dynamic Perceptions

Works great for a time-lapse version of this slider.

Learned the hard way that the dolly shield and MX2 firmware is not compatible with Arduino Mega 2560, only Arduino Uno.

http://youtu.be/ETPC0SXt-GU
3  Community / Exhibition / Gallery / Re: 7ft Camera Slider on: March 03, 2012, 02:41:38 pm
Even creating a simple intervalometer would be helpful. They make them in this form:

http://www.amazon.com/gp/product/B00404X7V6?ie=UTF8&tag=cheoocsy-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B00404X7V6

But I have yet to find much documentation on even just triggering the shutter with an arduino.
4  Community / Exhibition / Gallery / Re: 7ft Camera Slider on: March 02, 2012, 08:58:56 pm
Awesome!!

Ten points to you!

Thank you smiley

It's my first arduino project - hopefully many more to come - super addictive.

My next step is to figure out how to interface with the GH2. There seem to be some threads about controlling various DSLRs but I have yet to find anything specifically on controlling the GH2....
5  Using Arduino / Project Guidance / DSLR Control? on: February 23, 2012, 04:45:28 pm
I would like to figure out how to interface with a Panasonic GH2 and control it's shutter release like an intervalometer.

http://www.amazon.com/gp/product/B00404X7V6?ie=UTF8&tag=cheoocsy-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B00404X7V6

Anyone hear of this being done before with arduino? Point me in the right direction?
6  Community / Exhibition / Gallery / Re: 7ft Camera Slider on: February 23, 2012, 09:59:49 am
HAHA! That is either a GH1 or a GH2.....have you hacked it?

Yup - it's a hacked GH2.
7  Community / Exhibition / Gallery / 7ft Camera Slider on: February 22, 2012, 10:08:40 pm




I'm a DSLR video hobbyist and wanted to motorize this 7ft slider I built with Rig Wheels http://www.rigwheels.com/ and box track.

I used the Arduino mega and motor shield from radio shack, along with a potentiometer and switch to control the speed and direction of the servo. I modified the servo to rotate continuously by removing the control board and plastic tab on the gear that makes it stop.

Here's a video that shows how the project works: http://youtu.be/T3kRqQmtkjY

Here's some sample video with some shots with the slider: https://vimeo.com/37225344

And here's the sketch that makes it all work:

Code:
//This program controls the speed of the servo with a potentiometer

int potpin = A0; // Analog input 0 is used for the potentiometer
int val;
int dirA = 12; // Sets pin on motor shield for direction
int dirB = 13;  // not used in this example
int speedA = 3; // sets pin on motor shield for speed
int speedB = 11; // not used in this example
int buttonPin = A5; // sets pin for switch used for direction change

void setup()
{
  pinMode (dirA, OUTPUT);
  pinMode (dirB, OUTPUT);
  pinMode (speedA, OUTPUT);
  pinMode (speedB, OUTPUT);
  pinMode (potpin, INPUT);
  pinMode (buttonPin, INPUT);
  digitalWrite (buttonPin, HIGH); // Turns on pull-up resistor after input
}



void loop()
{
 

  while(digitalRead(buttonPin) == LOW) //when pin goes LOW
  {
    val = analogRead(potpin); // read the value from the potentiometer
    digitalWrite (dirA, HIGH);  // servo forward
    analogWrite (speedA, val); // Set the speed of the motor to the value of the potentiometer
  }
    val = analogRead(potpin); // read the value from the potentiometer
    digitalWrite (dirA, LOW);  // Servo Backward
    analogWrite (speedA, val); // Set the speed of the motor to the value of the potentiometer
}
 
 

Pages: [1]