Show Posts
Pages: 1 ... 99 100 [101] 102 103 ... 114
1501  Using Arduino / Programming Questions / Re: How to Run Multiple Functions Independently on: March 07, 2012, 10:28:32 am
Hi,
  Have a look at the timers too, they are effectively a separate hardware module that you set up and let run. You can use it it various modes to generate pulses, interrupts and even to measure input intervals all of which relate to your original post. As the timers run in hardware and are driven by the system clock, code that is also running does not stop the timers or effect their accuracy.

Try and read the data sheets sections on timers, the register bits are litle switches that you turn on or off to setup the timer mode and characteristics, the code might look a bit strange to begin with, but there are lots of examples of using the timers directly.

Duane b
rcarduino.blogspot.com
1502  Using Arduino / Project Guidance / Re: Building A self-balancing bicycle on: March 07, 2012, 04:28:04 am
Hi,
I have no idea if what you plan to do will work, but humans do not balance bicycles through any gyroscopic effect, instead whether they know it or not, cyclists make continual small adjustments to the steering to keep the bike centered under their weight.

Duane B

rcarduino.blogspot.com
1503  Using Arduino / Motors, Mechanics, and Power / Re: Powering up 4 TowerPro MG995 servos on: March 06, 2012, 07:40:43 am
Hi,
   Yes, but you will need to make sure they are all connected on a common ground with the Arduino. I also add a 1k current limiting resistor on the signal line but most say you don't need to.

Duane B

rcarduino.blogspot.com
1504  Using Arduino / Motors, Mechanics, and Power / Re: RC-Car, H-Bridge --- Need Help on: March 06, 2012, 07:38:04 am
Hi,

   If the car still works, why not use the existing components, there is a long thread here on doing this, I think it was titled 'Modding an RC car'

Duane B

rcarduino.blogspot.com
1505  Using Arduino / Project Guidance / Re: Outlaw Pinewood Derby Car on: March 05, 2012, 12:14:20 pm
Hi,

You could save yourself over 40 dollars and just use a wheel speed sensor and a 555 timer acting as a 'one shot' triggered by the wheel turning. The wheel will need to turn a bit before the system switches on, so it's not as immediate as the suggestion for a switch on the nose, but it's not dependent on any set up so will work again even if mis fired and will cost less than five dollars to build.

On my cars the wheels are turning 70 times a second, and I have a resolution of once per second. I will increase this to two or four times a second by adding more strips, you might go higher so that you can start the fan after 1/8 or 1/16 of a turn.

http://rcarduino.blogspot.in/2011/12/traction-control-part-11-monitoring.html

Duane B
rcarduino.blogspot.com



1506  Community / Local Groups / Re: South Wales - UK on: March 05, 2012, 09:57:23 am
Hi

south Wales gone a bit quiet on the Arduino front ? All too busy watching bouncers or the rugby ?

Anyone built anything interesting ? Here are some of my efforts - rcarduino.blogspot.com

Duane, formerly of Newport, Swansea and Cardiff.
1507  Using Arduino / Programming Questions / Re: How to Run Multiple Functions Independently on: March 05, 2012, 09:35:07 am
Hi,

Basically no, but the ATMega chip has some neat features that make it pretty good at measuring inputs and generating accurate output pulses and waveforms. The Arduino is a micro controller, not a computer and so a lot can be achieved using the hardware level rather than in software as you would on a computer - the timer/counters being a strong example of this.

As others have said, if you give a bit more detail on what you are doing you will get better advice.

Or If your up to it, read the ATMega328 data sheet for a complete view of what's available.

Duane B

rcarduino.blogspot.com
1508  Using Arduino / Project Guidance / Re: Protoshields and things! on: March 05, 2012, 09:14:43 am
Hi,

My approach is to use old parallel cables, some can be run direct to devices, others such as power I run To strip board and then branch them out to the devices. It's not pretty compared to stacked sheilds, but it's very low cost, very flexible and so much easier than wiring things individually and if your housing your project, no one will ever know  smiley-wink



Duane B

rcarduino.blogspot.com
1509  Using Arduino / Motors, Mechanics, and Power / Re: Detailed How To Posts - Reading From An RC Receiver on: March 05, 2012, 08:52:57 am
Hi Erni,

Thanks for taking the effort to check the performance of a 2.4 System, I expected that they would be better, but from your data its a lot better than i expected. Maybe I should not be so suprised after all my equipment uses technology that hasn't really changed since 1980.

I keep using the excuse that I am as fast around the track as anyone else as a reason not to upgrade, but just this weekend I was testing my Arduino based lap timer in a regular spot and someone somewhere unseen was interfering with my car. Maybe now that there are so many toy cars, helicopters and 'walky talkies' around that use 27 and 40 MHz It might finally be time for me to enter the 21st century and get a 2.4 system.

For anyone that does not have an existing collection of 27 or 40 MHz equipment your results would suggest there is no excuse to buy the older technologies.

Duane B

rcarduino.blogspot.com
1510  Using Arduino / Motors, Mechanics, and Power / Re: Detailed How To Posts - Reading From An RC Receiver on: March 05, 2012, 03:20:42 am
Hi,

Thanks for the feedback.

I had to look up 14 channel transmitters, I guess it is the Futaba one you have ?

What is is that you are building with so many channels ?

I have a post about a sneaky way to add on/off toggle channels here -

http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with_25.html

Not that you are going to be running out of channels any time soon.

Duane B

rcarduino.blogspot.com

1511  Using Arduino / Programming Questions / Re: Passing class-member function to another class on: March 05, 2012, 12:58:08 am
Hi,
   In a purely OO environment, the approach suggested above would work very nicely however while many Arduino libraries implement classes, they tend to be implemented to work with C rather than a pure 00 approach. The Alarm class expects a C function and will not work with interfaces however if you really want to use an OO approach, you could rewrite the Alarm library to work with interfaces, the previous poster has provided a good template.

   Then again, how much new code and reinventing of existing code do you really want to do to toggle a pin ?

Duane B

rcarduino.blogspot.com




   
1512  Using Arduino / Project Guidance / Re: Slotcar speed controller with display and electronic memory project on: March 04, 2012, 09:38:08 am
Hi,
   Its possible that this is another library which has not been updated to work with Arduino 1.0, there are quite a few, there is an easy fix if you search.

Duane B.

rcarduino.blogspot.com
1513  Using Arduino / Programming Questions / Re: Passing class-member function to another class on: March 04, 2012, 04:45:06 am
Hi,
   Quoting from the link provided by the previous poster -

Quote
[33.2] How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc?

Don't.

As I mentioned in my original response, an object orientated approach is valid, but in a micro controller you are much closer to the hardware and sometimes it good to acknowledge this and enjoy the differences.

If you want to continue with the OO approach, I would suggest that you revisit your objects so that they are less tightly coupled - i.e. should the alarms be inside the heat tape object - could you achieve what you want more easily if they were outside ?

Duane B.
1514  Using Arduino / Programming Questions / Re: Passing class-member function to another class on: March 04, 2012, 02:30:18 am
Hi,
   From very distant memory, you can only pass a static function as a callback function, static functions are associated with the class, not any individual instance (object) of the class so you will not have access to your object variables, only status variables.

   As all your doing is turning pins on and off, I might suggest that you take off your perfectly valid but may be out of context 'object orientated' hat and put on your microcontroller 'how can i get this done in 2k memory' hat and have another look at what your trying to do.

   Just a suggestion and there is nothing wrong with trying to do it in objects other than in this case your are inventing problems for yourself - i.e. how do I use half a dozen layers of complexity to change a pin.

Duane B

rcarduino.blogspot.com


1515  Using Arduino / Sensors / Re: Suggestions on IR communication on: March 04, 2012, 01:01:34 am
Hi,
   No need for headers, the problem you have is a very simple one that has been solved for over 40 years - how to get multiple proportional channels into a single transmission channel.

Read my last post again (and again if need be) and pay particular attention to the 'heres how' part.

I can put it another way which is - each channel has a fixed position within a fixed frame. If we dont see any pulses for a period we know the frame has ended and the next pulse is the first channel of a new frame, the pulse after that, the second channel. The order of the pulse within the frame gives us the channel number, the width of the pulse gives us the proportional signal for that channel.

something like this

1200000012000000120000001200000012000000

Duane B

rcarduino.blogspot.com

Pages: 1 ... 99 100 [101] 102 103 ... 114