Show Posts
Pages: 1 ... 4 5 [6]
76  Forum 2005-2010 (read only) / Exhibition / Re: Camera Flash Trigger -- Includes pretty pictur on: April 14, 2008, 05:36:29 pm
I tried with a ultrasonic sensor, but found that refresh rate is too big for fast photos.
Also tried a gp2d12 infrared sensor, but the same happened.

I thought using a laser like yours, and i see that it works! I'll try it definitely.
thanks
77  Forum 2005-2010 (read only) / Exhibition / Re: Lightning Trigger for a Camera on: June 18, 2008, 02:02:48 pm
I've photographed lightnings, but in the normal way, this is, using a remote cable to do 5 minutes exposures.
It's like fishing.
78  Forum 2005-2010 (read only) / Exhibition / Timer2 library on: May 09, 2008, 04:40:42 pm
I've released a timer2 library, check it in the playground: http://www.arduino.cc/playground/Main/MsTimer2
79  Forum 2005-2010 (read only) / Exhibition / Re: Simple robot finger on: April 30, 2008, 06:09:33 am
ops, i forgot to say, that i connected 2 servos at the same control pin, and the video is the result.
80  Forum 2005-2010 (read only) / Exhibition / Re: Simple robot finger on: April 29, 2008, 07:08:59 am
Ok here is the code:

Code:
#include <Servo.h>

int smoothAnalog(byte pin, int samples) {
  unsigned long result = 0;
  int tmp;
  
  for(tmp = 0; tmp < samples; tmp++)
    result += analogRead(pin);
  
  return result/samples;
}

float get_range_size(float min, float max) {
  if (max < 0.0)
    return -min + max;
  else
    return max - min;
}

float value_to_range(int value, float input_min, float input_max, float output_min, float output_max) {
  int tmp;
  float input_range_size, output_range_size;
  
  input_range_size = get_range_size(input_min, input_max);
  output_range_size = get_range_size(output_min, output_max);
  
  if (value < input_min)
    value = input_min;
  if (value > input_max)
    value = input_max;
    
  return (((float)(value-input_min)*output_range_size)/input_range_size) + output_min;
}

Servo servo;

void setup() {
  servo.attach(2);
}

void loop() {
  int value;
  
  value = smoothAnalog(0, 20);
  servo.write((int)value_to_range(value, 700, 850, -90, 90));  // empiric values
  Servo::refresh();
  delay(10);
}

and the diagram:

81  Forum 2005-2010 (read only) / Exhibition / Re: Simple robot finger on: April 28, 2008, 10:22:45 am
Quote
can you post some more info about this
it looks really cool

the magic is done by a flexible sensor i bought on sparkfun.com

the code is very simple, read the sensor output, and encode to 0-180 degrees.
82  Forum 2005-2010 (read only) / Exhibition / Simple robot finger on: April 26, 2008, 05:59:23 am
I've done a robot finger with a few servos and arduino.

check video here:
83  Forum 2005-2010 (read only) / Exhibition / Re: new version of my rover robot on: April 30, 2008, 01:29:35 pm
yes i've used it and it's small and easy to use.
you can reduce your code at half or less with it.

for the different servos, there is no problem since you send directly the degrees to the servo.
for example: servo.write(45);

don't send more degrees than servo can support and that's all.
i have some code using the library on this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1209207563/4#4

check setup and loop, the other functions are for analogic purposes
84  Forum 2005-2010 (read only) / Exhibition / Re: new version of my rover robot on: April 30, 2008, 06:07:29 am
have you tried the Servo library?
85  Forum 2005-2010 (read only) / News / Re: Freeduino SB on: May 03, 2008, 05:16:19 am
mini usb, power switch and aref pot are great, i'll try one of these!
86  Forum 2005-2010 (read only) / Bar Sport / Re: great service from sparkfun.com on: May 08, 2008, 06:11:27 am
yeah, they work really well. In my last order, they forgot to send me a LCD, so i asked to check if it was an error and sent it very fast.
Pages: 1 ... 4 5 [6]