Show Posts
Pages: 1 2 [3] 4 5 ... 79
31  Using Arduino / Programming Questions / Re: Help needed to code an Arduino for a project. on: April 07, 2014, 05:07:30 pm
Do you have the arduino? Can you get "blink" to download to the arduino and run?

We need pin numbers and schematics for the hardware. What are you using to drive the motor? The arduino cannot supply enough current!
32  Using Arduino / Programming Questions / Re: basic c question on: April 07, 2014, 04:45:21 pm
You don't want a comma there. You want an || or &&
33  Using Arduino / Programming Questions / Re: Sscanf ruins my code :( on: April 07, 2014, 04:30:11 pm
Just use a char array and pick it apart.
34  Using Arduino / Programming Questions / Re: basic c question on: April 07, 2014, 04:29:14 pm
With the semi-colon it should *always* execute the following printf.
35  Using Arduino / Programming Questions / Re: interrupt starts at different times depending on upload time of program on: April 07, 2014, 04:12:27 pm
Get out an oscilloscope to actually see what is going on. And a mono-stable multivibrator (555) will let you adjust the length of the response pulse.
36  Using Arduino / Programming Questions / Re: Sscanf ruins my code :( on: April 07, 2014, 04:10:42 pm
value is an int. what kind of string are you expecting from it? What happens if it is not 4 characters long?
37  Using Arduino / Programming Questions / Re: basic c question on: April 07, 2014, 03:47:56 pm
You need a #include <string.h>
38  Using Arduino / Programming Questions / Re: basic c question on: April 07, 2014, 03:45:27 pm
What is the error?
39  Using Arduino / Programming Questions / Re: interrupt starts at different times depending on upload time of program on: April 07, 2014, 03:14:37 pm
That is 800 uS, not mS. It should be OK, given there is nothing else going on in the code.
40  Using Arduino / Programming Questions / Re: Literal conversion from short or byte to char on: April 07, 2014, 03:12:57 pm
Try:

char randomVals[8];
randomVal[0] = var1;
randomVal[1] = var2;
randomVal[2] = var3;
//...

41  Using Arduino / Project Guidance / Re: Communication between 2 Arduino Uno and a third component on: April 07, 2014, 11:58:08 am
I2C might be better than serial, since C can cantrol just when it reads the data. If you use software serial it can only listen to one at a time. A mega would allow for multiple hardware serial ports, and might be a better choice.
42  Using Arduino / Project Guidance / Re: Finding NMEA device connection fault on: April 07, 2014, 11:50:14 am
You will need to change your program logic somewhat. At the very least, you need an else clause in your if loop.

Create an unsigned long variable (I will call it serTimeOut for this example.)
When you check Serial.Available()
if it is zero, save the value of the millis() counter in serTimeOut if serTimeOut is zero.
check to see if you timeout has been reached. IF so, reset the sensor.
if Serial.Available is not zero, set serTimeOut to zero.


43  Using Arduino / Project Guidance / Re: Need Help for Genetic Algorithm on: April 07, 2014, 11:01:47 am
This is the simplist I know:
http://www.ro.feri.uni-mb.si/predmeti/int_reg/Predavanja/Eng/3.Genetic%20algorithm/_04.html

But the point about genetic algorithms is that the program does lots of trials and mixes the results of the trials genetically to determine the optimum. This works well in simulations and nature, not so well for your robot. Do you really want it to fall off a cliff to determine that that is a "bad" outcome?
44  Using Arduino / Programming Questions / Re: Need help - Array with different size elements on: April 07, 2014, 10:36:59 am
Make the arrays the biggest that you need and use a sentinal, like -1, to signal the end of the array.
45  Using Arduino / Project Guidance / Re: how to connect amp to speaker to uno on: April 07, 2014, 10:28:17 am
I just hooked one up for an alarm clock. I just put the 10K pot right on the board like the quickstart says. It works fine.
Pages: 1 2 [3] 4 5 ... 79