Show Posts
Pages: 1 ... 47 48 [49] 50 51 ... 252
721  Using Arduino / Project Guidance / Re: Controlling an RC Car's remote with a Mega 2560 board on: May 19, 2014, 01:49:21 pm
Quote
If I understand correctly, you're proposing a transistor between bottom forward signal contact and ground, and control the transistor with the arduino?
Exactly or you can use mini relays, either way will work. Give me a sec to post a picture.

Added: no matter how much I crop and resize the pictures, they always end up huge.

This is an example of what you should do. (The cathode represents the forward pin on the chip)
722  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 01:42:50 pm
We'll get to that when you open it and learn how to get it to work. Once you are able to see the output from the axis, then you can start doing everything else.
723  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 01:36:22 pm
I have the MMA7361, how do I program this to do the command?

It has the XYZ pins on the board, so all you need to do is use an analogRead of each axis, and see what it produces.

There is a library and example sketch for that module here in this link.
724  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 01:26:36 pm
raschemmel is correct.

I am using this accelerometer, ADXL335. I know that on a flat surface, the XYZ axis' spit out something like this (305,455,435) in the serial monitor. I then tilt it to find the full range of motion for each axis. Then once I have the ranges, I map them. I have a fluid level and a protractor to help with the angles and any offsets it may need to be accurate.

Quote
What the accelerometer does is cancel the command of the light being on when the accelerometer reachers center. Which in this case is between +2 and -2 *figures are an example because I don't know how they actually calculate it*
This sounds like a state change machine, the accelerometer is tilted in a certain direction, then brought back to its original position, the led that corresponds to the angle it was tilted to gets turned off.
725  Using Arduino / Project Guidance / Re: Controlling an RC Car's remote with a Mega 2560 board on: May 19, 2014, 01:15:35 pm
Those are just the basic Bring-to-ground controllers. If a button is press, it is brought to ground and the chip sends out the appropriate command.

Since the arduino only has high and low output (5V/0V), those chips can only take about 2 - 3V, so I would recommend using a transistor and instead of wiring directly to the contact points, use a transistor to simulate a button press.
726  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 01:03:10 pm
Yea, but it is not a Go-Pro. I used this. Hidden Camera with this servo mount, Pan and Tilt Camera Platform

It works great in open areas, very clear, but since I live around a lot of buildings, the video quality is a little fuzzy.
727  Development / Other Software Development / Re: New TFT Extension Library on: May 19, 2014, 12:58:50 pm
You could put the reset functions inside the case statements before you load the pages. Or you can put them inside the pages themselves, whichever is easier for you.
728  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 12:53:25 pm
Exactly, which I why I made a pan and tilt camera mount for my RC truck and used that exact method.
729  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 12:46:51 pm
Yea, no personals, keep it here so others can see your progress.

@raschemmel
By themselves, they don't that is why I calibrate mine and use the map function to change the values from the accelerometer to degrees of motion. A gyro would be better thou.

I know that when I tilt my accelerometer, the X axis spits out (240,460) in the serial monitor and when it gets to a certain point, it starts going down from 460 or back up to 240, so that is the set range. The Y axis, when tilted left to right will output (240, 680) and I know it relates to 0-180 because of the way I tilt it. The Z axis is similar to the Y axis, but the values are slightly different.
So X has a range of 90 degrees, and Y,Z have a range of 180 degrees.

It is quite accurate.

However, not all accelerometers are the same, so kutenda would need to provide the ranges of the XYZ axis', then change that to degrees of motion and then make the statements that (s)he is looking for.
730  Using Arduino / Project Guidance / Re: accelerometer programming on: May 19, 2014, 11:40:44 am
Easy enough, a simple IF/ELSE statement can do what you want. What kind/type of accelerometer are you using, a link would be helpful.
731  Development / Other Software Development / Re: New TFT Extension Library on: May 19, 2014, 06:55:50 am
Ok, I can make a quick function to allow you to repaint the gauge.

Added:
Function: ResetGauge( byte _ID ), This should go in the next and previous pages of the gauge. So if your gauges are on page 2, then this function needs to be in pages 1 and 3. So when you go back to page 2, the gauge will be repainted.

Library added below.
732  Using Arduino / Programming Questions / Re: code compiling, but will not actually work on: May 18, 2014, 03:42:28 pm
Well then that means you need to start going through them and debug them one at a time.
Get one part to work then add another and keep doing this until it stops working, once it stops working then you will know which one it giving you the problems.
733  Using Arduino / Programming Questions / Re: code compiling, but will not actually work on: May 18, 2014, 03:03:50 pm
Do you know if your Serial monitor (the terminal itself) is set to 9600 baud?
734  Using Arduino / Programming Questions / Re: Help understanding why this concept doesn't work on: May 17, 2014, 10:44:19 pm
Get rid of XYZ and ROW1 and make ROW2 a two dimensional array with the stuff from XYZ.

ROW2[3][3] = {
{0,1,2},
{4,5,6},
{7,8,9}
};
735  Using Arduino / Project Guidance / Re: How to make arduino recognize a pair of numbers and turn on an led. on: May 17, 2014, 10:03:15 pm
It doesn't get much more simpler than this.
Code:
int buffer[8];
int counter = 0;

void setup()
{
  Serial.begin(115200);
}

void loop()
{
  if(Serial.available() > 0)
  {
    char temp = Serial.read(); // example incomming data <1,23,456,7890>
    if( temp == '<' ) // is incoming char equal to <, if so gather the rest
    {
      counter = 0; // make sure counter is set to zero
      while(1)
      {
        if(Serial.available() > 0)
        {
          char temp = Serial.read(); // read in incoming char
         
          if(temp != ',' && temp != '>')
          {
            buffer[counter] = (buffer[counter]*10) + (temp - '0');// converts temp into an int then stores it
          }

          if(temp == ',')
          {
            counter++; // increment buffer index
          }

          if(temp == '>') // if incoming char is >, then break out of loop
          { 
            break; // breaks out of the while loop
          }
        }
      }
    }
    for(int NUM = 0; NUM <= counter; NUM++) //will output "1,23,456,7890"
     {
       Serial.print(buffer[NUM]);
       if(NUM != counter) Serial.print(",");
     }
     Serial.println();
  }

  while(counter != -1) // clear the buffer
  {
    buffer[counter] = 0;
    --counter;
  }
}
Pages: 1 ... 47 48 [49] 50 51 ... 252