Show Posts
Pages: 1 2 3 [4] 5 6 ... 745
46  Using Arduino / Programming Questions / Re: Correlation matrix to calculate similarity? on: April 15, 2014, 04:14:34 pm
It works just fine (in a dumb way) for some tests but it's faaaaar from accurate.
My teacher asked me to replace it with something like "correlation matrix" and I have no idea what it is or how to use it or is it really the right method to use!

You teacher obviously expects you to recognise these terms, or at least have the initiative to go look them up and make sense of articles explaining them. Have you tried doing that?
47  Using Arduino / Programming Questions / Re: Pulse train comparrison/matching on: April 15, 2014, 04:12:44 pm
You need to understand how this data is encoded i.e. when an event of interest occurs, how is this represented in the data? Looking at those numbers, it's not obvious what the corresponding signal represents and I have no idea how to derive the data that you're interested in.
48  Using Arduino / Project Guidance / Re: Using 2 tachometers and 2 motors, how do I get my robot to drive straight? on: April 15, 2014, 04:09:39 pm
That page mentioned a 'speed encoder'. I'm not sure what that is, but if it's a rotary encoder for each wheel then you can measure the distance that each wheel has traveled, subtract left from right to find the differential distance, slow down the motor which has traveled the furthest by an amount which is proportional to the difference in distance.
49  Using Arduino / Project Guidance / Re: interfacing Jpeg colour camera C329 with Arduino mega 2560 on: April 15, 2014, 04:03:25 pm
Google suggests that camera type has a UART interface so you have some chance of being able to receive the jpg image data from it but I have no idea what you'd do with it then - the image would be too big to be held in memory and you would have very limited time available to store/forward it.

To understand how to use the camera you need to read and understand the camera's data sheet. You also have the option of looking for other people who have already done the same thing you want and were generous enough to publish details of their solution - a quick search here turned up several promising-looking projects and you should be able to find them as easily as I did.
50  Using Arduino / Project Guidance / Re: Simple Finger Switch on: April 15, 2014, 03:54:38 pm
Are you sure this project uses your finger to complete the circuit, and didn't just involve pressing the two wires together? The resistance across your finger is likely to be several MOhms and definitely too much to pull down a 220 Ohm resistor.
51  Using Arduino / Project Guidance / Re: Arduino multiple motor driver switch system on: April 15, 2014, 03:50:40 pm
So I have to work with millis that I found out. But how I can do such a thing with making it easy to control so much steps. (is jumping for me) I thought I would be able to find it on my own build I'm trying for a week or two and just got stuck and frustrated.

This is a completely separate problem from how you can drive all these motors.

In order to control this many things independently you need to use a non-blocking approach. This means that your code does not ever stop (block) and wait for something to happen - instead, it checks repeatedly whether anything has happened and handles the things that have happened. In this case, all the activities you're looking at would be controlled on a timed basis. The blink without delay shows you how to run code on timed basis without blocking. That is only a very simple example and your code would be more complex, but it would use the same fundamental approach.

Where you want to control a sequence of actions, use a finite state machine to keep track of the current action so that you can walk through the sequence. A very simple way to implement a finite state machine is to define a number for each state, and use a switch/case statement to execute the code associated with the current state.
52  Using Arduino / Project Guidance / Re: RC for servos and the like. on: April 15, 2014, 03:44:16 pm
The nRF24L01 range is about 10 ft

In my experience it's highly variable, and can be affected substantially by tiny changes in the position and orientation of the transmitter and receiver. It might be enough for what's needed here, or it might not. I think the latency issue is more likely to be a problem here, though, since this application would require a fairly high transmission frequency and I don't think that would be achievable.
53  Using Arduino / Programming Questions / Re: very very important - help me on: April 15, 2014, 03:36:39 pm
and run this code print message
No controller found, check wiring, see readme.txt to enable debug. visit for troubleshooting tips  

Your subject line is extremely unhelpful. The fact the problem is important to you is irrelevant and we already know you're asking for help - by using the subject line to indicate the nature of the problem, you would make it much more likely that people interested in that area would notice your problem and try to help you. It would also save other people who can't help you from wasting their time reading your post before they realise that. Please change it to give a meaningful idea of the sort of help you're asking for. Also read the sticky at the top of this section which tells you how to post code.

The message you gave indicates that this line returned the value 1:

error = ps2x.config_gamepad(13,11,10,12, true, true);   //setup pins and settings:  GamePad(clock, command, attention, data, Pressures?, Rumble?) check for error

You will have to look at the documentation for the PS2X_lib library to understand what that means, and obviously you will also need to read the readme.txt file to see what further information is available about the problem. Since you haven't told us what library this is or given us any details of your hardware, there's no way for us to do that for you. In any case you ought to do it for yourself - or at least try to.
54  Using Arduino / Programming Questions / Re: Webcam on: April 15, 2014, 03:30:09 pm
My device works outside the range of the wifi, so, I'll need to control it by sending sms's to the GPRS, and therefore, take the sms and translate it to an action

This is getting into more useful detail but it is still ambiguous. If you have a GPRS connection then that means you have network connectivity so you should be able to carry the video stream directly over the GPRS, and you should also be able to carry commands the other way. You will need to look into the available bandwidth and costs for your GPRS service. If the IP webcam is steerable, it will almost certainly be steerable by HTTP so the mechanism you use to connect to it to receive the video stream will be the same one you use to send steering commands and view/change the configuration. In this case I don't see any reason for using SMS messages or an Arduino. All you need is a GPRS modem which has a network interface compatible with the IP webcam. A MiFi adapter would be the simplest approach, but you can assemble your own equivalent from discrete components (Ethernet/WiFi network adapter, router, GPRS modem) if you are familiar with this sort of equipment and don't mind doing a lot of work to save a little money.

This solution would essentially give you network connectivity between the PC and the camera. Once you have established that, it is trivial to display the video stream on the PC and to steer the camera from the PC. Most likely, the IP camera already provides a webapp to take care of this whole problem for you.
55  Using Arduino / Project Guidance / Re: RC for servos and the like. on: April 15, 2014, 03:20:17 pm
I don't know what sort of range is required for the wireless part. The cheap un-amplified nRF24L01+ transceivers would be fine for line-of-sight over a few yards of a shorter distance through thin partition walls etc, but in my experience the available bandwidth is pretty low and I suspect the latency would not be acceptable - it can easily take tenths of a second to send a single message. I would have thought that a Bluetooth serial link would be easier and cheaper to use. With this approach the bluetooth modules would just provide an async serial data stream so the programming would be relatively easy and you could use a direct wired setup for development testing. The last option would be a pair of 433MHz transmitter/receivers, which again would give you a one-way async serial data stream.

You would need to decide how to encode your data for serial transmission. The simplest approach would be to encode your servo positions textually as a set of comma separated values with each set separated by a linefeed. This makes the data very easy to generate and view for test purposes.
56  Using Arduino / Programming Questions / Re: Need Help how to control 4 dc motors with 2 potentiometers atAdafruitMotorShield on: April 15, 2014, 11:14:37 am
That's a very complicated sketch, and too much to debug in one go. Start with the basics: Can you make each motor run forwards and backwards at the speed you want? Can you read the value of a potentiometer? You should expect to write test sketches to do each of these things in isolation and get all the different parts of your project working in isolation before you start trying to integrate them.
57  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.
58  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.
59  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.
60  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.
Pages: 1 2 3 [4] 5 6 ... 745