Show Posts
Pages: 1 ... 80 81 [82] 83 84 ... 197
1216  Using Arduino / Project Guidance / Re: Counters in an array on: June 19, 2013, 10:38:30 am
Something like this.
 
Code:
if(((millis() - setTime) / 1000) >= action[0][ /*0 - 3)*/ ])
{
.
. // do something here for that time
.
}

setTime = millis();
1217  Using Arduino / Programming Questions / Re: keypad map on: June 19, 2013, 06:58:29 am
Why did you connect a ede1144 to the keypad, for what reason? The Arduino keypad library will decode the keypad for you.
1218  Using Arduino / LEDs and Multiplexing / Re: 4x4x4 cube on: June 18, 2013, 09:04:22 am
yes
1219  Using Arduino / Project Guidance / Re: Get the ball on: June 18, 2013, 07:59:19 am
Quote
how did you know how far to drive once you figured out the direction? Was the object big enough to be seen with ultrasonic sensors?

I used a IR distance sensor (Ultrasonic works too), and just calculated the distance between the robot to the object (soda bottle), and I told the robot to continue to take measurements until the distance was about 3 inches. Once the robot measured 3 inches, it knew to close the claw.
1220  Using Arduino / Project Guidance / Re: Get the ball on: June 18, 2013, 06:59:24 am
In college, I made a robot that could rotate 360 degs and search for an object within a set range. If it found the object, it would drive over to it, grab it and bring it back to where the robot first was. Then, using encoders, we (team) were able to tell the robot where to actually bring the object. We could not use GPS, only encoders, distance sensors and color sensors. We got it to bring it one of us (while holding a color card), with the color sensor. Overall, we received an A.
1221  Using Arduino / Project Guidance / Re: driving 12 transistors with few I/O's - is it possible? on: June 18, 2013, 06:53:13 am
Well if you have at least 4 pins available, you can use a 4 - 16 deMux here.
1222  Using Arduino / Programming Questions / Re: for (int i =... easy peasy... on: June 17, 2013, 05:28:55 pm
You need to post the full code.
1223  Using Arduino / Project Guidance / Re: New to arduino and need help on: June 17, 2013, 03:28:59 pm
If that is the case then you don't need the Arduino.
1224  Using Arduino / Programming Questions / Re: Using IF with smoothing code. on: June 17, 2013, 07:23:51 am
Quote
User types "1"
This will be sent as a byte, or in this case a char, so "if (userInput=='1' )" will work.

Quote
Loop runs 10 times, averaging out the values at A0
Easy, use either a FOR loop or WHILE loop.

Quote
Serial prints the average of the 10 measured values
Extremely easy, unless your already using your 0 & 1 pins ( TX/RX), in which case you may need to use software serial for that other shield or whatever is using pins 0 & 1. Or get an Arduino Mega.

Quote
Stops until user types in "1" again.
A simple latch will do just fine. Look up how to use state machines.
1225  Using Arduino / Project Guidance / Re: New to arduino and need help on: June 17, 2013, 07:14:32 am
Quote
I want to be able to control the pan, tilt, and servo by remote control.(esplora?)
Easy, there are plenty of examples for servos and the esplora, as well as simple joysticks controlling servos.

Quote
I want the live feed from the camera to be displayed on a monitor of a sort, e.g. iPad, smart phone, tablet, small tv. 
A small TV would work if the camera has a video output, otherwise it wont be possible unless the camera can somehow sync to a smart phone.

Quote
I was thinking of having the pan and tilt functions be hooked up to relays with 12 volt coils to trigger the 120 volt connections.
Why? the 120VAC to maybe charge the camera, fine, but the Arduino can run on 12VDC, no relays needed.

Quote
auto pan
Do you mean automatically tracking an object? This would require "special" software that can interface with the Arduino so it can control the servos itself.
1226  Using Arduino / Project Guidance / Re: Counters in an array on: June 17, 2013, 07:02:04 am
First, you have an array of 4 by 3, not 3 by 4, so it would be  "action[4][3]".
Second, so I can understand, is everything in bold the time, and if so what are the other two columns?
Quote
{2, 4, 1000}
  {3, 2, 800}
  {5, 5, 1000}
  {8, 4, 800}
1227  Using Arduino / Project Guidance / Re: OWI Robot arm Remote Help? on: June 14, 2013, 09:30:46 pm
Are the other switches the same? You may need to physically trace the connections by taking the controller apart.
1228  Using Arduino / Project Guidance / Re: OWI Robot arm Remote Help? on: June 14, 2013, 06:01:33 pm
The picture is blurry, so it is hard to tell what led is on. I can clearly see the first led on in the first picture. So is the UP led and the DOWN led both on, or just the down?
1229  Using Arduino / Project Guidance / Re: Controlling servo motor with arduino on: June 14, 2013, 03:03:31 pm
Quote
You can't specify how fast it takes to get to that position?

Sure you can, but just by saying servo.Write(0); and then have servo.Write(90); it will go however fast it is designed for. However, you can use a for loop to adjust the time it increments to a set point.

You will need to think a little, but with a simple for loop, you can do what you want. Now if you want to go reverse then you will need to add some logic to decide which for loop to use. You can make it a function and just add the value you want the servo to go to.

Code:
void ServoMove(int position)
{
  if(position > lastPosition)
  {
   // servo rotate left so many degrees
  }
 
 else
  {
   // rotate right so many degrees
  }
 lastPosition = position;
}
1230  Using Arduino / Project Guidance / Re: OWI Robot arm Remote Help? on: June 14, 2013, 02:58:00 pm
So are you saying that regardless of which way the switch is, it will light the same LED?
Pages: 1 ... 80 81 [82] 83 84 ... 197