Show Posts
Pages: 1 [2] 3 4 ... 742
16  Using Arduino / Programming Questions / Re: Upload bigger than 28.800bytes does't complete? on: April 15, 2014, 11:11:44 am
I don't know the details, but I understand it's possible to select how much program memory is available for the bootloader versus the sketch. I think this is defined by the fuse settings. Is it possible that the board has a bootloader and fuse settings installed that make less space available for the sketch than you have indicated in your boards.txt? I notice that the error occurred on a nice round hex number which is the sort of thing you'd expect if you were just overflowing the space available for storing that sketch.
17  Using Arduino / Programming Questions / Re: how to calculate clock cycle of an instruction on: April 15, 2014, 11:01:02 am
in this program i want to create a 1 sec delay accurately for my another project.

That is not a good way to create an accurate 1 second delay. You should use the Arduino clock to control the timing, not try to guess how long your code takes and then pad it out.
18  Using Arduino / Programming Questions / Re: Webcam on: April 15, 2014, 10:58:50 am
Your question was really weird, you were like asking why arduino even exist !!

I'm not asking why Arduino exists, I'm saying that nothing you've said so far suggests that you need to use an Arduino in your project.

I need to control the camera over long distances

You haven't explained what you mean by 'control'. So far all you've said is that you want to be able to display the video stream on a PC. If you want to do more than that, you need to explain what.

It's unclear whether your PC has a connection to the WiFi network that camera is attached to. If it does, it should be trivial to display the video stream on the PC.  If it doesn't, you ought to explain what network connectivity you do have between the location of the camera and the location of the PC. There is very likely to be a solution, but without details of your environment I can't guess what options are feasible for you. You can be sure of one thing - you won't be sending the video stream via a microcontroller.
19  Using Arduino / Project Guidance / Re: Help using Photocells in connection with LEDs on: April 15, 2014, 09:09:47 am
A similar question was asked on another thread here recently.
20  Using Arduino / Programming Questions / Re: Webcam on: April 15, 2014, 09:05:49 am
The arduino is used to give the webcam a specific task to do other than its original work !.

I have no idea what that means, but in any case your question about how to display video from a WiFi webcam on a PC does not involve an Arduino. If you have some other requirement that you think needs an Arduino to implement, you haven't explained it so far.
21  Using Arduino / Project Guidance / Re: Arduino using telnet on: April 15, 2014, 09:03:43 am
I know this, and I have tried it, but this only works when you type something in the serial monitor which is not my question!
My question was, what should I write in my TERMINAL (after connecting it to my board using telnet), to send instructions to my board?

If 'TERMINAL' means your telnet client, then what you type in is the character or characters that you want to send the Arduino. That's so obvious that I can't believe you need to be told, and perhaps it's not what you're trying to ask. In that case you need to make your question clearer.
22  Using Arduino / Programming Questions / Re: Digital Pulse/Signal Counter using digitalRead ? on: April 15, 2014, 08:57:47 am
i am noob, and this my first Arduino Project

Get used to using Google for yourself before you call for help. You're trying to make an Arduino tachometer. I had no trouble finding dozens of similar projects, and you should be able to find them too.
23  Using Arduino / Project Guidance / Re: Wireless Switch Using Transmitters and Receivers on: April 15, 2014, 08:52:48 am
Note that it's possible to buy radio controlled relays and they are likely to be cheaper than an Arduino based solution, as well as nicer to use.

There's nothing wrong with making your own if you want to for the fun of it or as a learning experience, but it's probably not the most practical solution if the end product is all you want.
24  Using Arduino / Project Guidance / Re: Charlieplexing on: April 15, 2014, 08:43:29 am
The 'common rail' is just another digital output pin so it can be set HIGH or LOW as you want to drive the pair of diodes forwards or backwards.

Because the rail is common to all the other diode pairs you will need to control all four diode pairs in parallel, but that's just a matter of managing the timing.

If I was implementing that I would generate a fixed frequency square wave on the 'common rail' and at the start of the 'high' part of that cycle I'd turn on all the odd LEDS, and then turn them off after an interval corresponding to the desired duty cycle for each LED; then do the same for the even LEDs during the 'low' part of the cycle. All it needs is an array of timer values and a couple of FOR loops to do the timing, using the approach demonstrated in the blink without delay example.
25  Using Arduino / Project Guidance / Re: Smoothing Sensor Data on: April 15, 2014, 08:38:17 am
Can someone point me in the right direction in going about doing this?

An exponential decaying average is very convenient for this sort of smoothing. In pseudocode, the algorithm works like this:

smoothedValue = (weight * smoothedValue) + ((1-weight) * newValue)

The bigger value you assign to weight, the more smoothing will be applied.

If you're implementing this using integer values then it can be coded like this:

smoothedValue = ((weight * smoothedValue) + newValue) / (weight + 1);
26  Using Arduino / Project Guidance / Re: how to drive robot straight... on: April 15, 2014, 08:31:38 am
It would depend how much torque the motors make relative to the available friction. The feedback needs to be implemented first - if there's still a problem then add in acceleration control to keep wheelslip acceptably low.
27  Using Arduino / Project Guidance / Re: Log FuelFlow -Reading 4 frequency inputs (digital on/off) and logging to SD card on: April 15, 2014, 08:26:14 am
The opening braces at lines 74 and 110 are spurious but harmless.

On line 131 it would be better to use the defined constants HIGH and LOW rather than literals 1 and 0.

On line 132 and throughout the remainder of this function I suggest calling micros() once (and saving the result to a local temporary variable) rather than calling it multiple times. As well as saving a tiny amount of processing time, it also avoids inaccuracies if the value changes between these calls.

All time values should be held as unsigned long, not (signed) long.

The code on line 215 seems to be in the wrong place (it is outside the if statement that tests whether the interval has passed). In general, I suggest putting the 'previous time' update as close as you can to the start of the block that executes when the interval has elapsed, so it is always visually obvious that you are updating it in the correct place. Also, I suggest that you update startTime by incrementing it by the interval rather than setting it to 'now'. This avoids timing slip that would otherwise occur if there is any latency between the interval elapsing and your code running that detects that it has elapsed. There will be a similar issue at line 230.

Since pgenPreviousMicros is only ever used inside pgen(), it doesn't need to be a global and could be defined as a static local inside pgen(). By reducing the scope of the variable you no longer need to think about other code when looking at how it may be used, and no longer need to think about this variable when understanding what the other code is doing.

The variable pgenInterval should be defined as unsigned long. Since you're using a value larger than an int in its initialisation expression, I suggest you use 1000000UL to make sure the compiler evaluates this expression using the correct type.

Values which you don't intend to change at runtime should be declared as const.

The issues above might explain why the pulse generation isn't working. If not, I suggest you post your revised code and we can see what else might be causing it.
28  Using Arduino / Project Guidance / Re: nRF24L01 TX'ing instruxns to separate nRF RX'ers on: April 15, 2014, 08:01:40 am
The nRF24L01+ transceivers use addressing to identify the recipient for each message. Just allocate a unique address to each slave, and have the master send to the address of the slave the message is destined for.
29  Using Arduino / Project Guidance / Re: Possible to use photoresistors as digital in? on: April 15, 2014, 07:59:54 am
Yes it is, but you'll need to connect the photoresistor in series with a plain resistor and the value of the plain resistor must be chosen so that the digital input switches between a HIGH and LOW state at the brightness you want it to. You might find it convenient to use a potentiometer here so that you can adjust the value. You would connect the digital input to the junction between the photoresistor and the plain resistor, and the free ends to 5V and ground.
30  Using Arduino / Project Guidance / Re: Simple Finger Switch on: April 15, 2014, 07:55:52 am
Just run the Button example sketch, substituting your two wires connected via your finger in place of the switch. I don't know how much resistance your finger will have - you may need to vary the pull-up resistor to find what works, but if you have a resistor that worked previously I suppose it's likely it will work this time too.
Pages: 1 [2] 3 4 ... 742