Show Posts
Pages: [1] 2 3 ... 7
1  Using Arduino / Sensors / Re: Gyroscope (L3G4200D) on: July 01, 2012, 02:25:19 pm
Krodal, so the raw data values are offset. Are they also in degrees? (I guess there is only one way to find out). What do you mean by filters? The 250, 500 or 2000?

From what it sounds like the gyroscope needs to be in other words zeroed. I have worked with tangible/static zeroing such as zeroing a weight scale, calipers, tensile stress sensors, etc. but this kind of offset not sure how to filter it.

My guess is that I should leave it running for 30 seconds to a minute in a stationary, static position. Copy those values, find the range and average of those values and then add a line of code in the program that has an if/else statement. i.e. If x > -124 && x<238, x=0. That would be a program filter which I would then have to make it like a cluster for each major angular velocity. But then if I measure the offset values in the void setup, I wouldn't need to find the range and average and paste it in a spreadsheet... so then, setting up an array or vector?
2  Using Arduino / Sensors / Gyroscope (L3G4200D) on: June 30, 2012, 10:05:03 pm
This sensor output and code example is difficult for me to understand. I have posted what I get from the sensor when it is stationary on my desk and I get some huge variation. I am using I2C communication for my gyroscope, bought from The example code is off of their website and says it is for Arduino. I have tried contacting them with no luck on the issue. My current wiring setup is on a Duemilanove atmega 328. Could someone help me with this issue and converting the "raw" data or numbers into readable degrees? I cannot even tell if the gyroscope is reading relative or absolute change in the three axis'. Also, for an idiot like me, could someone sum up the differences between SPI versus I2C? I have seen an SPI example code for the Sparkfun version of the gyroscope but not sure how that would be wired up since I am missing an INT2 and not sure if my INT1 is same as the INT1 as the Sparkfuns or considered INT2... In any case, if it is "easier" to understand or translate raw data in SPI, could someone direct me in the right direction?

My wiring is as below:
SCL to Analog 5
SDA to Analog 4
Ground to Ground
VIN to 5v

Side note: I believe the reference for the arduino board pro mini for SDA and SCL is for analog 4 and analog 5. I have yet to confirm it. Right now I am using this on Arduino Duemilanove
A4 (SDA) and A5 (SCL)

Serial output (250 deg/sec):
starting up L3G4200D
X:105 Y:62 Z:46
X:111 Y:-26 Z:27
X:93 Y:-49 Z:7
X:47 Y:-65 Z:-225
X:-1 Y:-27 Z:4
X:59 Y:-94 Z:-63
X:66 Y:-151 Z:-21
X:10 Y:-120 Z:1
X:24 Y:-109 Z:-59
X:18 Y:-93 Z:-29
X:63 Y:-162 Z:-10
X:85 Y:-93 Z:-31
X:40 Y:-33 Z:-51
X:40 Y:-59 Z:-24
X:66 Y:-76 Z:0
X:82 Y:-6 Z:41
X:112 Y:-12 Z:64
X:71 Y:53 Z:61
X:84 Y:92 Z:44
X:74 Y:48 Z:67
X:123 Y:50 Z:102
X:117 Y:24 Z:45
X:72 Y:98 Z:44
X:104 Y:101 Z:5
X:146 Y:-5 Z:17
X:105 Y:-44 Z:45
X:111 Y:-9 Z:45
X:89 Y:5 Z:11
X:96 Y:-6 Z:8
X:107 Y:56 Z:12
X:160 Y:27 Z:42
X:123 Y:29 Z:26
X:67 Y:130 Z:19
X:92 Y:142 Z:34
X:142 Y:66 Z:78
X:149 Y:67 Z:123
X:159 Y:87 Z:50
X:115 Y:166 Z:70
X:124 Y:186 Z:70
X:135 Y:137 Z:68
X:169 Y:122 Z:98
X:135 Y:139 Z:69
X:111 Y:187 Z:92
X:77 Y:61 Z:64
X:114 Y:-25 Z:67
X:50 Y:-53 Z:9
X:31 Y:-42 Z:-48
X:40 Y:-53 Z:-221
X:41 Y:-143 Z:14
X:4 Y:-200 Z:17
X:-22 Y:-257 Z:-60
X:-56 Y:-216 Z:-108
X:-110 Y:-213 Z:-89
X:12 Y:-362 Z:-100
X:18 Y:-372 Z:-46
X:-75 Y:-276 Z:-115
X:-74 Y:-176 Z:-145
X:247 Y:-269 Z:-88
X:14 Y:-262 Z:-54
X:16 Y:-185 Z:-63
X:-29 Y:-116 Z:-68
X:69 Y:-92 Z:6
X:79 Y:-82 Z:56
X:92 Y:4 Z:51
X:68 Y:82 Z:54
X:67 Y:134 Z:-46
X:122 Y:-7 Z:50
X:72 Y:13 Z:34
X:93 Y:27 Z:24
X:37 Y:456 Z:64
X:22 Y:-465 Z:-337
X:622 Y:-739 Z:-361
X:473 Y:-526 Z:-278
X:129 Y:14 Z:-84
X:-88 Y:-92 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 Y:-12 Z:13
X:7 Y:-8 Z:-2
X:2 Y:-16 Z:-6
X:10 Y:-10 Z:0
X:11 Y:-10 Z:3
X:6 Y:-16 Z:11
X:20 Y:-14 Z:10
X:9 Y:-5 Z:7
X:55 Y:56 Z:14
X:-29 Y:45 Z:-108
X:52 Y:21 Z:15
X:55 Y:4 Z:58
X:-20 Y:47 Z:16
X:-23 Y:36 Z:-95
X:-33 Y:31 Z:18
X:-18 Y:8 Z:159
X:-63 Y:72 Z:168
X:-13 Y:-124 Z:305
X:71 Y:120 Z:-388
X:59 Y:206 Z:25
X:-121 Y:517 Z:-10
X:-29 Y:443 Z:78
X:30 Y:-924 Z:344
X:-191 Y:-402 Z:-327
X:-177 Y:-364 Z:-186
X:91 Y:-363 Z:193
X:-22 Y:-165 Z:-64
X:-4 Y:-176 Z:-113
X:-59 Y:-106 Z:-129
X:34 Y:-278 Z:27
X:-210 Y:87 Z:-205
X:167 Y:-45 Z:192
X:19 Y:15 Z:21
X:25 Y:-72 Z:75
X:-193 Y:162 Z:-198
X:38 Y:290 Z:45
X:71 Y:167 Z:76
X:85 Y:143 Z:156
X:-60 Y:99 Z:2
X:-13 Y:-29 Z:38
X:-23 Y:40 Z:21
X:-234 Y:100 Z:-406
X:-136 Y:19 Z:-191
X:135 Y:134 Z:56
X:180 Y:-11 Z:57
X:122 Y:-85 Z:100
X:33 Y:-176 Z:7
X:138 Y:-321 Z:295
X:-164 Y:608 Z:-218
X:123 Y:261 Z:79
X:587 Y:635 Z:-451
X:566 Y:613 Z:769
X:248 Y:282 Z:282

The code I was using with the sensor
//Arduino 1.0+ only

#include <Wire.h>

#define CTRL_REG1 0x20
#define CTRL_REG2 0x21
#define CTRL_REG3 0x22
#define CTRL_REG4 0x23
#define CTRL_REG5 0x24

int L3G4200D_Address = 105; //I2C address of the L3G4200D

int x;
int y;
int z;

void setup(){


  Serial.println("starting up L3G4200D");
  setupL3G4200D(2000); // Configure L3G4200  - 250, 500 or 2000 deg/sec

  delay(1500); //wait for the sensor to be ready

void loop(){
   getGyroValues();  // This will update x, y, and z with new values


  Serial.print(" Y:");

  Serial.print(" Z:");

  delay(100); //Just here to slow down the serial to make it more readable

void getGyroValues(){

  byte xMSB = readRegister(L3G4200D_Address, 0x29);
  byte xLSB = readRegister(L3G4200D_Address, 0x28);
  x = ((xMSB << 8) | xLSB);

  byte yMSB = readRegister(L3G4200D_Address, 0x2B);
  byte yLSB = readRegister(L3G4200D_Address, 0x2A);
  y = ((yMSB << 8) | yLSB);

  byte zMSB = readRegister(L3G4200D_Address, 0x2D);
  byte zLSB = readRegister(L3G4200D_Address, 0x2C);
  z = ((zMSB << 8) | zLSB);

int setupL3G4200D(int scale){
  //From  Jim Lindblom of Sparkfun's code

  // Enable x, y, z and turn off power down:
  writeRegister(L3G4200D_Address, CTRL_REG1, 0b00001111);

  // If you'd like to adjust/use the HPF, you can edit the line below to configure CTRL_REG2:
  writeRegister(L3G4200D_Address, CTRL_REG2, 0b00000000);

  // Configure CTRL_REG3 to generate data ready interrupt on INT2
  // No interrupts used on INT1, if you'd like to configure INT1
  // or INT2 otherwise, consult the datasheet:
  writeRegister(L3G4200D_Address, CTRL_REG3, 0b00001000);

  // CTRL_REG4 controls the full-scale range, among other things:

  if(scale == 250){
    writeRegister(L3G4200D_Address, CTRL_REG4, 0b00000000);
  }else if(scale == 500){
    writeRegister(L3G4200D_Address, CTRL_REG4, 0b00010000);
    writeRegister(L3G4200D_Address, CTRL_REG4, 0b00110000);

  // CTRL_REG5 controls high-pass filtering of outputs, use it
  // if you'd like:
  writeRegister(L3G4200D_Address, CTRL_REG5, 0b00000000);

void writeRegister(int deviceAddress, byte address, byte val) {
    Wire.beginTransmission(deviceAddress); // start transmission to device
    Wire.write(address);       // send register address
    Wire.write(val);         // send value to write
    Wire.endTransmission();     // end transmission

int readRegister(int deviceAddress, byte address){

    int v;
    Wire.write(address); // register to read

    Wire.requestFrom(deviceAddress, 1); // read a byte

    while(!Wire.available()) {
        // waiting

    v =;
    return v;
3  Using Arduino / Sensors / Gyroscope-L3G4200D & Arduino Mini Pro Compatibility on: June 10, 2012, 01:19:35 pm
In regards to the gyroscope, L3G4200D (, I am not too familiar with Arduino Pro Mini (5v, 328) or using any gyroscope sensor. I bought a Pro Mini due to its size. I have a duemilanove as well, where I did most of my learning. I have not purchased the gyroscope yet. Is it compatible with my pro mini as far as the libraries and being able to decipher the input from the sensor? If there is a library that works with Pro Mini and the gyroscope, could someone point me in the right direction? I know there is a library out there for UNO/Duemilanove and one for Mega but do not know if either one will work with the Pro Mini. I believe I don't want to use CS but SDA and SCL and I am not sure what SDO should be hooked up to if anything. I believe I can directly connect my 5v on my Pro Mini directly to the VIN. I want to use the gyroscope in a vertical water rocket. Basically, read when the rocket reaches apogee and starts to come down, nose first.

Edit: I have seen this tutorial,, but this is for duemilanove. I want to know if this can be applied to a Pro Mini (5v, 328) as well.
4  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: May 06, 2012, 12:32:38 pm
Is there another term or name for Break, Spring and Barrel for RCA?

I am still looking for a controller for an LCD but perhaps a more basic approach would be to find a controller with an SPR, BRK and BRL. If there is another term or name used for those three outputs on an LCD controller, what would they be?

Zoomkat, RC sites and spy sites and forums do not discuss LCDs that small with RCA communication. I wish it were that easy... Like I've said before there is the Eye Goggles but those are transparent and they cost $300. It is defeats part of the purpose for me to buy a pair of those just for the screen and place it in my own compartment.
5  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: May 02, 2012, 05:35:13 pm
Not sure if I understand your question. I want to watch what is being recorded on the camera that is on the bottle rocket in real-time. Real-time as in when the rocket is 50 feet in the air after 1 second, I want to see this with my own eyes speculating the rocket from a distance as well as seeing what it looks like from what the camera on the bottle rocket that is sending at the same time. I understand that there may be a slight delay in this transmission but I want it to be near the same time (real time, live, stream, or any non-english words that can express what I am envisioning). So I want to watch the bottle rocket move by watching through an lcd screen, laptop or other portable screen and also quickly glance at the rocket with my own eyes as it moves with respect to time. Does this answer your question?

Thanks, I will have to look into security transmitters. I have looked through numerous rocket and remote control hobby sites and forums and a lot of hobbyists use the eye goggles which are fairly pricey. I would like to constrain my project to the mini lcd.

I believe I found a video adapter on NewEgg called the Dazzle:
6  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: May 01, 2012, 11:39:39 pm
Okay, I was trying to limit myself to a mini screen. I'm considering other options now. What kind of converter and/or cable would I need if I were to record and stream the wireless video on a laptop? The wireless receiver would still have the RCA output.

I'm currently waiting for a response from the company selling the mini 1.8" screen. If this route does not seem likely, I will brainstorm more ideas on top of the laptop one.

The reason I was wanting to use a 1.8" lcd or 2" was because I have a very old game console sitting in my garage and decided to reverse-engineer it. I de-soldered the two keypads on it and mapped out all the buttons through analog voltage readings. Basically what I had in mind was to create a water bottle rocket, with a live feed in the tube, use the sub assault as a controller to launch the rocket from a distance and watch the action on-board. It is a bunch of mini-projects combined into one. The lcd, transmitter/receiver, camera, xbee wireless controller are all sub projects. If space allows it, I utilize all the buttons on the game console to have a video feed switch between two cameras which I have not decided if I want two cameras in the rocket or one hacked onto the game console and one in the rocket.

I will more than likely have to attach the wireless receiver externally on the console. It is the lcd I was hoping would add a wow factor to my project as well as provide a dark space to easily see what is going on and also record if possible.
7  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 30, 2012, 09:07:51 pm
Thanks Mr. Grumpy. You have been very helpful. That wiki-site came in handy.

I'd rather ask a stupid question here than at the online retailers:

Can the lcd + controller still operate without any keypad connected? Basically no inputs to the controller other than the video feed telling it what to do with no OSD menu pop ups.
8  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 29, 2012, 08:39:21 pm
Reference for later to read and ask questions (I'm on lunch break at work):

How to write video from RCA to micro SD using Arduino? I may be over my head and yet that is another project. I am probably jumping the gun on this.
9  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 29, 2012, 08:28:44 pm
That will definitely limit my receiving end of the project.

As far as NTSC cameras with output wires of red (power), black (ground), yellow (video), is this the same for all NTSC cameras with just three wires with a similar configuration of power, ground and video? Is a composite camera always an NTSC camera? If not, is an NTSC always a composite camera? I see the two often together when I am searching for the cameras. Either way can a composite camera have more than three wires for only the power, ground and video (no audio)?
10  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 29, 2012, 03:26:34 pm
The LCD uses a parall interface of 18 or so signals. A digital camara can output data in a number of diffrent formats but not parallel RGB like an LCD.
In conjunction with my previous post and your post:
Does this apply to all LCD's to have 18 (or so signals) or are they varying to some degree? If they vary, how are they categorized?
11  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 29, 2012, 02:07:47 pm
Do the two screens have a similar communication connection? If not, what are the different types of "raw" LCD connections that are similar to the ones provided in the links below? Would the controller in the 2nd link be able to work with the adafruit lcd screen?

How would I use or convert the two products in the link below? Are they even compatible or would I still be left with the same problem of needing a microprocessor/controller?
12  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 28, 2012, 11:57:41 pm
What type of communication does the lcd use? I thought cameras had outputs of either analog or digital with monitors adhering to one or the other.
13  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 28, 2012, 11:34:57 pm
Are the tx/rx locations fixed or moble?


Grumpy Mike, correct me if I am wrong but my next options if I choose not to go the ARM processor would be to use a digital output camera with my thread's stated specifications and use that in junction with the screen from adafruit or to find a pre-fabricated 1.8 inch (or 2 inch) lcd screen with a built in RCA to digital conversion.
14  Using Arduino / Networking, Protocols, and Devices / Re: High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 28, 2012, 09:58:12 pm
Another question:

What is the best way to have a RCA video video output converted and connected to this lcd screen?
15  Using Arduino / Networking, Protocols, and Devices / High Definition Wireless Micro/Mini Video Camera with a Live Feed on: April 28, 2012, 05:41:22 pm
Hey guys,

I am having trouble figuring this out. I understand that Arduino cannot process video streaming but I would like to either use it as a way to trigger a recording of a live stream or control turning on and off a wireless camera and its transmitter but this is not my current problem/project.

My project is looking for a mini camera with these specs:
Size: Smaller than half the size of your palm - preferred to have long and thin rather than wide and flat (camera + transmitter)
Transmission distance: 1000 feet (+/- 50 feet) or 300+ meters
Resolution: 480p or higher
Recording duration: t>=2 minutes
Durability: Sustain 7G acceleration force (excluding the Jerk)
Frames: 30+ fps
Operating frequency: 5GHz > 2.4GHz
Other specs: NTSC preferred

Does anyone know of any cameras that meet these specifications or point me in the right direction? I have looked at numerous spycam websites and RC Toy sites and still cannot find anything that meets these specs. My next solution would be to use create my own by buying parts through websites (sparkfun, adafruit) but I do not know enough about video equipment and compatibility. Any helpful information would be much appreciated.

Pages: [1] 2 3 ... 7