Show Posts
Pages: 1 ... 103 104 [105] 106 107 ... 114
1561  Using Arduino / Project Guidance / Re: Slotcar speed controller with display and electronic memory project on: February 24, 2012, 05:25:08 am
Hi,
    I used to build resin slot cars, what's the material the controller is made from, it looks like something you could make model parts from ?

Duane B


1562  Using Arduino / Sensors / Re: Suggestions on IR communication on: February 23, 2012, 11:46:58 pm
Hi,
   The servo needs this type of a signal which is easily generated by the servo library -



If you generate this on a pin with an ir transmitter connected, you can send it directly. I am not sure where you see the difficulty ?

is it that you haven't sent anything through ir yet ?

Duane b
1563  Using Arduino / Sensors / Re: Suggestions on IR communication on: February 23, 2012, 10:38:08 am
Hi,
   Still not on the plane yet.

   If you look on my blog there is a post on using interrupts to read a signal from an RC receiver, this will work for you, but you will be taking the interrupt from an ir receiver instead.

Prove the concept with the code from my blog and then I can give you some pointers on adding a second channel to the signal.

Rcarduino.blogspot.com look in the most popular posts.

Duane b

1564  Using Arduino / Sensors / Re: Suggestions on IR communication on: February 23, 2012, 09:01:06 am
Hi,

I don't know anything about the library you are using, but if I was trying to implement a proportional ir remote system, I would use an ir emitter driven directly from the servo library.

I would try something like three servos, on for throttle, one set at a fixed signal just to act as a separator, then the steering servo.

The servo library already implements the type of pulse width encoding used to drive servos and electronic speed controllers, so why invent something else less efficient when you can transmit this directly ?

I am about to get on a plane some will have to leave it at that for now, if your interested in this approach I can help out tomorrow

Duane B


1565  Using Arduino / Programming Questions / Re: Counting the impulses between two signals on: February 22, 2012, 01:47:48 pm
Hi,
   You can do this with interrupts, you have two of them available on the UNO. These links should help you give you some background, once you have read through them come back for more help if you need it.

http://arduino.cc/playground/Code/Interrupts

http://arduino.cc/en/Reference/AttachInterrupt

Duane B

rcarduino.blogspot.com
1566  Using Arduino / Programming Questions / Re: wave moving down line of servos on: February 22, 2012, 01:37:37 pm
Hi,
  The function map takes a long as its input so it is rounding your value p to either 1 or 0, easy to fix, multiply p by 100 and change the following -1,1 to -100,100.

Duane B

rcarduino.blogspot.com

1567  Using Arduino / Project Guidance / Re: Measuring tiny intervals on: February 21, 2012, 10:52:13 am
Hi,
    With regards to the smallest interval that Arduino can measure, I saw that at the hardware level timer1 has an 'input capture' facility that I would expect to be much faster and more accurate than calling micros().

    I have not used it myself but I have had it at the back of my mind to experiment with it, so if no-one else comes up with anything, I will have a go at using this to measure very short intervals and post my code/experience over the weekend.

If you want to have a go for yourself, its in the ATMega328 datasheet in the 16 bit timer section and I am sure there are examples for using it if you search around.

Duane B

rcarduino.blogspot.com
1568  Using Arduino / Installation & Troubleshooting / Re: OptiLoader Help ! on: February 21, 2012, 09:23:29 am
Hi,
   I think that in my case I had one or more pins connected wrong, I have since managed to program 3 out of 6 ATMega8's I am assume that for the 3 I can't program I have locked myself out by sending junk to set the fuses while the wiring was not correct.

Let me know if you find out its down to something else, good luck,

   Duane B

rcarduino.blogspot.com
1569  Using Arduino / Sensors / Re: Problem with IR receiver and Arduino Uno on: February 21, 2012, 06:40:09 am
Hi,
   Its possible that you IR Receiver and IR Transmitter are in different ranges. The receiver I use is tuned to signals around 40Khz, but from what I have seen others may be above or below this range.

   A simple way to check whether you IR Receiver is working is to create a standalone circuit with the receiver connected to an LED.

There is an example circuit using a few AA Batteries an LED and a Resistor here, there is also lots of useful background information -

http://www.ladyada.net/learn/sensors/ir.html

Duane B

rcarduino.blogspot.com
1570  Topics / Robotics / Re: Need help with RC and arduino on: February 21, 2012, 12:47:01 am
Hi,
   People have pointed you to good resources, however you do have to do some work yourself. Here are some pointers to get you going

1) If you use the code from here - http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

It should print the RC Input value to the serial monitor, have you done this ?

2) If yes to 1) after then after the line Serial.println(nThrottleIn);  you can add some code to turn one LED on if nThrottle in > 1500 and the other LED on if nThrottle in < 1500.

Over to you,

Duane B.

rcarduino.blogspot.com
1571  Using Arduino / Programming Questions / Re: Interrupts from IR Receiver? on: February 20, 2012, 01:48:48 pm
Hi,
   I am able to access it directly, however it may be cached on my machine. I don't want to clear the cache to find out so lets see if the OP can have a look for us.

Duane B.

rcarduino.blogspot.com
1572  Using Arduino / Programming Questions / Re: Interrupts from IR Receiver? on: February 20, 2012, 11:42:56 am
Hi,

something like this ?

http://www.ladyada.net/learn/sensors/ir.html

Duane B

rcarduino.blogspot.com
1573  Topics / Robotics / Re: Need help with RC and arduino on: February 20, 2012, 05:01:44 am
Hi,
   You also do not indicate if you are using hobby quality of toy quality radio control systems. In the case of toy quality, the signal is on or off, in the case of hobby quality, its mostly empty space with short pulses, you would need very different code depending on which it is.

See here for details of hobby quality signals - http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html

Duane B

rcarduino.blogspot.com
1574  Using Arduino / Motors, Mechanics, and Power / Re: Servo sweep speed controlling with rc transmitter on: February 19, 2012, 02:27:06 pm
Hi,

EDIT : Rewrite of a previously confusing response.

  At the moment your code is inside out for what you want to achieve. You should move you if statements inside a single loop. At the moment you use if to check a condition and then get into a fixed loop, you should turn this around to that you check the condition inside the loop. This will also allow you to deal with the special case of <5 which I assume means stop sweeping, return to center now and then stay there.

Duane B

1575  Using Arduino / Programming Questions / Re: ISR() External Interrupt Accuracy on: February 19, 2012, 12:25:56 pm
Hi,
   You could speed up your ISR by using direct port access instead of digitalWrite, see here -

http://www.arduino.cc/playground/Learning/PortManipulation

Duane B

rcarduino.blogspot.com
Pages: 1 ... 103 104 [105] 106 107 ... 114