Show Posts
Pages: [1] 2 3 4
1  Using Arduino / Programming Questions / using timer interrupt on: June 21, 2011, 11:37:25 am
if i want to use timer interrupt on arduino uno, is there any pin i shouldn't use? the pin that belongs to the timer on the ATmega.. is that correct or i just can use all pin and the timer as well?

fyi, my program uses digital pin 0-11 and i want to use timer 2 interrupt.. i've downloaded the MsTimer2 lib from arduino playground, and i still can't use it.. any suggestion??

my code
Code:
void loop()
{
  MsTimer2::set(500, timing);
  MsTimer2::start();
 
    if (Serial.available()>0)
  {
   // digitalWrite(LED, HIGH);
    serial=Serial.read();
    if (serial=='w'){
      maju();
    } else if (serial=='d'){
      kanan();
    } else if (serial=='a'){
      kiri();
    } else if (serial=='s'){
      mundur();
    } else {
      selesai();
    }
  }
}

void timing(){
  ultrasonic();
    //motor();
    IR();
    printing();
    compass(); 
}


i had a very long code, i think this is the only part where i use the timer.. any help would be appreciated ^^ thankss..
2  Using Arduino / Programming Questions / Re: need help on PID programming on: June 04, 2011, 10:58:00 am
thank you for the references... i`ll to read them and let you guys know if i had more question.. thank you very much..
3  Using Arduino / Programming Questions / Re: need help on PID programming on: June 03, 2011, 01:04:32 pm
okay,

so if PID has 3 parameter, input, output, setpoint, i can say that the input should be sensor measurement, output is the PWM to the motor and setpoint is the desired range?
4  Using Arduino / Programming Questions / Re: need help on PID programming on: June 02, 2011, 11:25:04 am
1. by using simple program it is already done.. but the robot would do like zig zag move rather than smooth straight movement..

2. unstable means that even though its the exact same motor, the speed it yields wouldn't be the same with same PWM.. so if we send 50 PWM to both of the motor, the motor would have an alignment to the left.. as you know that a calibration is always needed for DC motor.. but in this case i want to add PID to smoother the movement rather than calibrating the PWM..

thankss..
5  Using Arduino / Programming Questions / need help on PID programming on: June 01, 2011, 12:23:45 pm
i've seen the PID library at http://arduino.cc/playground/Code/PIDLibrary .. and i`m start thinking to make some experiment..

how to use this PID if i had ultasonic sensor on pin 2 that sense left side range and i had two unstable motor on pin 3 and 4. what i want to use with PID is that i want to make the ultrasonic sensor always read 10cm even though the motor are unstable by controlling the PWM given to both motor.. so the ultrasonic sensor is like a reference to make both motor runs straight..


any ideas on how to use the PID library?
6  Using Arduino / Programming Questions / Re: bluetooth baudrate on: May 13, 2011, 09:05:58 am
there are two capacitor, one near the reset pin and one near the power plug in right? the i`m talking about is the one near the power plug in..is that after or before the regulator? and if its thrown away, what could be the effect to my arduino performance?
7  Using Arduino / Programming Questions / Re: bluetooth baudrate on: May 12, 2011, 08:18:59 am
okay thank you.. as the result i unplug the 100u capacitor and the arduino mega works perfectly "for now"... is there any information that i can know what exactly the use of that capacitor? why it was put there?
8  Using Arduino / Programming Questions / bluetooth baudrate on: May 09, 2011, 06:55:12 am
is there any limitation to bluetooth baudrate?

is use bluetooth blue SMiRF silver..


one noob question, i use arduino mega 1280, and when i plug my battery i make a mistake by plug the vcc to the gnd and gnd to the vcc of the battery.. in result my arduino make some blast on the resistor (i think, the two brown box beside the reset pin)..  smiley-cry smiley-cry smiley-cry is there any chance that i still can use my board? so far if i plug via serial cable and upload a simple program is no problem, but when i upload some long program the arduino just stay still and nothing happened plus the serial connection becomes weird.. is the problem comes from my program or is really the arduino is totally dead?  smiley-cry smiley-cry smiley-cry
9  Using Arduino / Networking, Protocols, and Devices / Re: help on bluetooth blue SMiRF tutorial on: April 21, 2011, 01:22:08 pm
i see.. thanks.. it gives me some revelation about what 'processing' is.. at first I thought it was process that done by the code in arduino.. but its not.. hehehe..


Quote
Well, first you need to define what you want to read from/write to
i just want to know if my bluetooth works correctly at first, so i want to create a simple program that it I send 1 it will replies with 2, if send 2 it replies 3.. just the data sent and will reply data+1.. the program is okay, but what i need is why my bluetooth won't work with the program, but if i use serial cable the program will work just fine.

the bluetooth pins are connected GND to GND, VCC to 5V, Rx to Tx, Tx to Rx..
baud rate are the same, 9600
the COM port used is correct, I double check the port of the bluetooth.. i don't think the problem is in the COM port..
what else that i could be wrong?
does my explanation clear enough or needs more?


btw why does bluetooth application in processing needs some added code, but my friend can use bluetooth in arduino just like and 'wireless' serial connection?

thank you very much..
10  Using Arduino / Networking, Protocols, and Devices / help on bluetooth blue SMiRF tutorial on: April 21, 2011, 06:24:49 am
http://www.arduino.cc/playground/Learning/Tutorial01

the tutorial said that we had to change the processing code.. i'm kinda confused about this processing code. where should i put this processing code?is it another tab? or where?

2nd, can somebody explain me a little about
Code:
import processing.serial

and

Code:
port = new Serial (this, Serial.list()[2], 9600)

3rd, this program needs another program right? myGUI?

4th, if I only want to use the arduino and the bluetooth to do simple read and write action, how to do that?

i use arduino mega, and bluetooth SmiRF from spark fun, http://www.sparkfun.com/products/10269 .. and I only connect the VCC, GND, Tx, Rx.. CTS and RTS are not connected.. is that correct if I want to use this bluetooth?

thanks a lot for the help..
11  Using Arduino / Programming Questions / Re: Path planning algorithm to code on: March 19, 2011, 12:18:37 pm
Can you tell more about the robot you (intend to) use?
The environment (s)he needs to move in?
How you define the nodes of the path?

Have you seen :
- http://msl.cs.uiuc.edu/rrt/
- http://msl.cs.uiuc.edu/~lavalle/
- http://planning.cs.uiuc.edu/     

the robot has 4 wheel like a standard vehicle that has side and front distance sensor. the will wonder around the maze that is given. the maze is created using plastic. just like in the fire fighter robot competition and right now I'm working on the path planning algorithm.

how I define the nodes of the path? honestly I don't fully understand what is the meaning of the question..

I've read the links you gave and read some about RRT. The thing that makes me confused the most is where to put the RRT algorithm and how to put it on Arduino. Is it just and if else loop or what? is there any example of path planning code that I can learn from or look from so I'm not that stupid about using the path planning.

To be honest... I've seen whole books on the subject of pathing algorithms... so you will likely find TOO MUCH information.

yes i know there are many types of path planning algorithms, I'm looking for someone that already use any path planning method so I can ask some details and learn from him/her.. sometimes its hard for me to learn from the tutorial because right now I really don't have any idea how the path planning is implemented on a code. all I know is the basic idea of the algorithm..


thank you for helping me out..
12  Using Arduino / Interfacing w/ Software on the Computer / Re: OPEN CV FACE DETECTION/PROCESSING/ARDUINO/ SERVO HELP! on: March 17, 2011, 02:55:21 pm
@lucandut

Although I can't help with original topic, I can tell you that yes, to enable visual processing (e.g. opencv) on a robot, you will need a more powerful processor than an atmega (arduino). Processing, for example, is run on a computer and is used to communicate over usb-->serial with an arduino, which is running its own code (independent of the visual processing code - it's just getting commands on what to do if whatever command is sent to it from the computer)


I get it.. thanks for the help!  smiley
13  Using Arduino / Project Guidance / Re: robot positioning technic and solution on: March 17, 2011, 02:54:04 pm
How about a resolver?

what is a resolver by the way??

i`m going to create a robot that able to map the surroundings and of course i need to know the exact position of my robot. is there any suggestion how to know the position of the robot beside using an optical encoders?

thanks for the info...

Well - before you can answer that question you need to know what kind of environment the robot will be operating in...

You might want to look into SLAM (Simultaneous Localization and Mapping):

http://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping

In short, there isn't a single sensor that will work for your needs; you're going to have to employ tons of sensors, from optical wheel encoders, to GPS, to potentially various kinds of distance measurement sensors (IR, ultrasonic, laser, etc), and even possibly machine vision techniques.

i've see the link you gave, and i`m not 100% understand about the SLAM, and according to what i understand it uses many complicated technic such as kalman filter and other and I don't understand any of it... I also aware that I would never accomplish this by only 1 sensor..

the environment that the robot will walk is 2Dimensional environment.. i've done the positioning using optical wheel encoder and somehow it has some errors and i want to find another method of positioning..

the other method that I try is using mouse coordinate system. it works better than optical encoders since the coordinates system is more accurate than accumulating pulses.

is the any other method that anyone can suggest?
14  Using Arduino / Programming Questions / Path planning algorithm to code on: March 17, 2011, 02:42:03 pm
i`m trying to use RRT path planning algorithm for my robot to choose where it moves and I`m confused where to start from.. any ideas? or anyone has any suggestion of other path planning that I can use?

thank you..
15  Using Arduino / Project Guidance / robot positioning technic and solution on: March 13, 2011, 12:36:54 pm
i`m going to create a robot that able to map the surroundings and of course i need to know the exact position of my robot. is there any suggestion how to know the position of the robot beside using an optical encoders?

thanks for the info...
Pages: [1] 2 3 4