Show Posts
Pages: 1 ... 20 21 [22] 23 24 ... 236
316  Using Arduino / Programming Questions / Re: please can someone help me? on: March 13, 2014, 12:34:26 pm
Can you give a link to the operating system that you have downloaded.
317  Using Arduino / Programming Questions / Re: Need Help With Reading In RC Input And Using As An Interrupt on: March 13, 2014, 12:32:24 pm
To implement a 'kill' using the KK2 board you need to send low throttle and left yaw simultaneously.  This puts the KK2 into safe mode as I expect you already know.  In this state power is off to motors and it will not accept any further control inputs until it gets low throttle and right yaw which arms it again.

Frankly it scares the pants off me that you are proposing to let loose an autonomous quad with no way of controlling it manually.   What size is this quad ?  At least a 450 I imagine which implies quite a weight and size.
318  Using Arduino / Programming Questions / Re: LCD display using 4 Buttons on: March 13, 2014, 03:55:39 am
6 buttons would be easier to program.
Up, Down, Left, Right, Accept, Quit

You can use fewer buttons but would then need to code for short and long presses to be recognised.
319  Using Arduino / Programming Questions / Re: Default compiler in Arduino on: March 13, 2014, 02:23:40 am
Can you post a simple example of some code that you are having problems with and details of where you have your libraries installed ?
320  Using Arduino / Programming Questions / Re: Need Help With Reading In RC Input And Using As An Interrupt on: March 13, 2014, 02:18:23 am
Are you planning for the Arduino to control the transmitter and for that to control the quad in turn, or for the Arduino to be on the quad and directly in control of it ?  I hope that whichever method you use the quad can be controlled by a human at a moment's notice and that human input always overrides the autonomous controls.

You could, of course, buy or make an Ardupilot and associated hardware such as the GPS receiver.

Have you got any experience of flying RC quads ?
321  Community / Gigs and Collaborations / Re: Need help programming a photocell/relay shield on: March 13, 2014, 02:12:44 am
Quote
Ans also, what exactly is a dip switch
DIP = Dual Inline Package

http://en.wikipedia.org/wiki/DIP_switch
322  Using Arduino / Programming Questions / Re: Debugging Arrays and printing to serial on: March 13, 2014, 02:09:33 am
Quote
Yeah I can see that it's a lot more hardware, but how do they do it on cars? I have to ask
Maybe by measuring the current flowing (or not).  Turn a pin HIGH.  Current flows through a resistor and LED.  Measure the voltage across the resistor to determine if current is flowing.  But again, is it worth it ?  How many LEDs are we talking about here compared with the number of lights in a car and how much are you prepared to pay ?
323  Using Arduino / Programming Questions / Re: lcd blink particular index variable on: March 13, 2014, 02:04:03 am
What about the technique I used in my code in a previous post using millis() ?  You must keep the code responsive if you expect the user to enter values and using delay() will slow down input and make it impossible to use.

So, to edit a value take a copy of it, say the month, and use millis() to alternately show the value and a blank or other character.  Whilst this is going on accept user input to increment/decrement the value and display it flashing.  When the user decides to accept the input copy it to the original variable and display (no flashing) it before exiting that part of the program.

In summary.  Display the digit until it is time not to then change it to another character.  Display that until it is time not to then display the digit again.  Use millis() timing so that you can accept user input whilst flashing the digit.
324  Using Arduino / Programming Questions / Re: Debugging Arrays and printing to serial on: March 12, 2014, 03:18:15 pm
Quote
My big question is: is there some way to "test" the pins in the array and tell if someting is wrong, and then print it to Serial.Println()?
What test do you want to apply ?  You could write something that set each of the pins HIGH in turn and read the output using another pin I suppose.  If a particular pin does not produce LOW and HIGH outputs at the appropriate time then report it.  But how do you know that the pin used to read the output is working ?

More usefully perhaps, flash each LED in turn at startup and watch them.  Simple to do and use.  No need to even have a PC connected.
325  Using Arduino / Programming Questions / Re: Generate random numbers WITHOUT using the analog pin 0 on: March 12, 2014, 03:09:15 pm
Nothing you have said would preclude the use of the method that I suggested.  You are presumably going to run the program more than once so, power up the Arduino and have a button labelled START.  It will be pressed at a different time after the Arduino is powered up each time that happens, hence the seed will be different each time, or largely so.
326  Using Arduino / Programming Questions / Re: I might have figured out my problem with delays!!! (maybe not) on: March 12, 2014, 02:55:08 pm
Quote
Seems like unsigned longs are related to if and else statements.
Wrong, I am afraid.

unsigned longs are just a type of variable.  They allow longer (larger) integers to be stored than an int and being unsigned are always positive.  Look at the data type pages on here http://arduino.cc/en/Reference/HomePage#.UyC9kD9_s1I for an explanation of the range of values that each data type can hold.
327  Using Arduino / Programming Questions / Re: Need Help With Reading In RC Input And Using As An Interrupt on: March 12, 2014, 02:31:41 pm
Quote
Atm I would rather have it be killed easily.
Don't make it easy to do by mistake.  Quads don't glide too well !

You will not be able to use an interrupt to interpret an RC input because it is a pwm signal which constantly alternates between HIGH and LOW, so catching it with an interrupt will be challenging.
328  Using Arduino / Programming Questions / Re: I might have figured out my problem with delays!!! (maybe not) on: March 12, 2014, 12:49:12 pm
If it worked then your program would leave the Relay3 pin HIGH as it is never taken LOW.  Is that what you want ?

As to whether it will work.  Did you read what PaulS said about literal values being interpreted as ints and his suggestion as to how make the be regarded as unsigned longs ?

Can I suggest that you write the millis() value to the serial monitor when the delays in your program finish.  That way, even if you are asleep you will know that they happened.
329  Using Arduino / Programming Questions / Re: Generate random numbers WITHOUT using the analog pin 0 on: March 12, 2014, 12:32:04 pm
Can you have the user press a button to start the program ?  If so, then use the millis() or micros() value at the time of the button press to seed randomSeed().  It will still not be entirely random but should differ for most runs of the program.
330  Using Arduino / Programming Questions / Re: please can someone help me? on: March 12, 2014, 12:23:57 pm
I have followed the guide but it may not work anyway?
If you have followed the guide then this will not be true
Quote
Library is located in the arduino folder run arduino from a folder on the desktop.

Which is it ?  Have you followed the guide or are the library files in the arduino folder on the desktop ?
What is the exact path to the folder in which you have installed the DHT library ?
Pages: 1 ... 20 21 [22] 23 24 ... 236