Show Posts
Pages: [1] 2 3
1  Community / Exhibition / Gallery / Re: Sensor Testing Platform Started on: March 31, 2011, 07:08:29 pm
Didn't notice anything weird when I did a quick test, but I will watch for that.
I also read that in general you want to take averaged readings, that will be interesting to try.
2  Community / Exhibition / Gallery / Sensor Testing Platform Started on: March 31, 2011, 12:40:41 am
I have been super busy with other things, but I did get something new going. Since my turret is still needing some final details, I had some more parts for a 2nd test platform made.

Here is a pic. I got another standard Futaba servo, and a HC-SR04 ultrasonic sensor to start with.
I found the best deal on ebay of course and got fast shipping. I have been doing some testing, and this sensor is pretty easy to use with the Arduino.
Here is the link if you are interested in a similar part:

http://cgi.ebay.com/Ultrasonic-Sensor-Range-Finder-Arduino-HC-SR04-USA-/140529794152?pt=LH_DefaultDomain_0&hash=item20b83a7c68



LARGER RESOLUTION PICTURE

http://3.bp.blogspot.com/-5QdD_Ecisro/TZQR3aZXs8I/AAAAAAAAABg/B6Qjh7mAfyo/s1600/Test_Platform1.JPG
3  Using Arduino / Programming Questions / Re: Ultrasonic sensor sketch needs more precision on: March 06, 2011, 03:45:52 pm
Thanks, I will try the first suggestion, once I do the DFU reprogramming.
This little sketch is even worse to re-upload because of the serial communication.  smiley-cry
4  Using Arduino / Programming Questions / Ultrasonic sensor sketch needs more precision on: March 06, 2011, 12:12:37 pm
Hi All,

I ordered an ultrasonic sensor and received it ok. I plugged it real quick on the bread board and it works fine.
Only thing is, the sample sketch I found to test it returns a 1 digit measurement ?
I don't get it, the variables are Long.

Here it is:

Quote
int pingPin = 13;
int inPin = 12;

long microseconds;

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

void loop() {

long duration, inches, cm;

digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(10);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
pinMode(pingPin, OUTPUT);

pinMode(inPin, INPUT); duration = pulseIn(inPin, HIGH);

inches = microsecondsToInches(duration); cm = microsecondsToCentimeters(duration);

  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();
 
 delay(100); }

long microsecondsToInches(long microseconds) {
return microseconds / 74 / 2; }

long microsecondsToCentimeters(long microseconds) { return microseconds / 29 / 2;

}


Any suggestions to get a few more decimal places ?
5  Community / Exhibition / Gallery / Re: Rover 5 - The Beginning on: February 25, 2011, 11:14:11 pm
The pictures are too big.
6  Using Arduino / Motors, Mechanics, and Power / Re: Servo ansteuern ABER nur per PWM/AnalogWrite() on: February 12, 2011, 12:58:06 am
Ich lieber #include <Servo.h> benutzen. Es ist einfach .
7  Using Arduino / Motors, Mechanics, and Power / Re: Interfacing Arduino with 8.4V servo? on: February 12, 2011, 12:54:42 am
Do the wires not have connectors ? The picture seems pretty clear unless the wires are bare.
If the wires are bare, you need to get the diagram for your servo.
8  Using Arduino / Motors, Mechanics, and Power / Re: AC TIG ALUMINIUM WELDING on: February 12, 2011, 12:47:43 am
Any little mistake in this can be fatal. A commercially made TIG welder can be had for $1000.
Just throwing out a couple bits of information.
9  Community / Exhibition / Gallery / Re: Mini Turret Project Continues on: February 11, 2011, 01:34:58 am
So, I haven't made my other 2 sensors yet, so I thought about what I could do in the mean time.
Here is a simple little program for a single servo and a single IR sensor.
The servo sweeps to predetermined points, reads the values, and then calculates which direction gave the strongest reading (lowest number to Arduino) and then slews to that point for a few seconds.
Then starts over. I figure this can be modified to use as a range finder, or something similar. You will just have to change it to suit your needs.
You can open up the serial monitor to see the values populating.

Quote

#include <Servo.h>

/*******************************************************
Simple little program to sweep and scan with a single
sensor by Mr_Manny

********************************************************
*                define connections                    *
*******************************************************/

Servo myservo;     // create servo object to control a servo
int Sensorpin= 0;  // IR sensor pin
int Servopin = 11; // servo pin

/*******************************************************
*                define variables                      *
*******************************************************/

int scanPos[] = {0, 30, 60, 90, 120, 150, 180}; // Rotation for scans
int scanVal[7];
int i = 0;  
int M = 0;
int newVal = 0;
int Low = 1024;    //1023 is the darkest value
int Pos = 0;
/*******************************************************
*                set up section                        *
*******************************************************/

void setup()
{
  Serial.begin(9600);  // start serial communication
  myservo.attach(Servopin);  // servo pin
  myservo.write(90);  // initial start position
  delay(2000);
  }

/********************************************************
*                   start loop                          *
********************************************************/

void loop()

{
//*******************************************************
  while (i < 7 )
  
  {
  myservo.write(scanPos);
  delay(500);
  newVal = analogRead(Sensorpin);
  scanVal= analogRead(Sensorpin);
  Serial.print("Servo Pos=");Serial.print(scanPos);Serial.print("  Value=");Serial.println(scanVal);
  i++;  
  }
//*******************************************************
  {
   for (int M=0; M<7; M++)  // For IR Sensors 1023 is dark
   {                        // so I need the LOWEST value
     if (scanVal[M] < Low)
     {
       Low = scanVal[M];
       Pos = M;
     }
  }
  }
//*******************************************************
{
  delay(2000);
  Serial.print("Final Pos= ");Serial.println(Pos);
  myservo.write(scanPos[Pos]);  // Now I write the final position
  delay(5000);
}
//*******************************************************
{
  i = 0;      // This is how I reset the loop
  Low = 1024;
}
//*******************************************************
}


10  Community / Exhibition / Gallery / Re: Mini Turret Project Continues on: January 31, 2011, 06:52:42 pm
Ok, I get what you mean, but for me, it is horizontal. The sensors are horizontal at the 90deg position.
11  Community / Exhibition / Gallery / Re: Mini Turret Project Continues on: January 30, 2011, 11:22:16 am
Here is the assembled turret with a short demo to test the range of motion.

12  Community / Exhibition / Gallery / Mini Turret Project Continues on: January 26, 2011, 07:04:46 pm
Ok, cool! The new forum is up and I can post my updates here!

So, I finally got some missing parts, and now it looks more like a completed turret. So, to save some time, here is the link to the project page:

http://myblogduino.blogspot.com/

Hope you like how it looks. I will write up a simple demo program to show it slewing soon.
13  Forum 2005-2010 (read only) / Troubleshooting / Re: Trouble starting IDE on: January 20, 2011, 10:21:18 pm
I have experience IDE hanging when I open sketches.
Using Ubuntu 10.4, my best solution is to unplug the Uno and press reset several times.
The ACM0 comes and goes randomly...mostly goes.

Posting to see if somebody has better solutions.  :-/
14  Forum 2005-2010 (read only) / Exhibition / Re: Video Display in a Magic Eight Ball with Arduino on: January 19, 2011, 12:02:22 am
I like your projects in general! Nice!  smiley-wink
15  Forum 2005-2010 (read only) / Exhibition / Re: My First Sketch.. Hi Everybody... on: January 16, 2011, 10:49:38 pm
That's the great thing about the Arduino, you can focus on learning the programming instead of creating the circuit. It is an awesome timesaver! IMO
Pages: [1] 2 3