Show Posts
Pages: 1 ... 78 79 [80] 81 82 ... 295
1186  Using Arduino / Programming Questions / Re: Choosing an Array and turning it all off in one time on: March 15, 2014, 03:16:52 am
Quote
I would like it all to turn off at the same time, after delayTime.
Once you have got the loop structure sorted out and they turn off one after another with a delay between each one, if you really want them all to turn off at the same time (or so nearly the same time that you will not be able to tell) take the delay out of the for loop.
1187  Using Arduino / Programming Questions / Re: Right adjust number on LCD on: March 15, 2014, 02:39:52 am
Code:
void setup()
{
  Serial.begin(115200);
  for (int aNumber = 0; aNumber < 110; aNumber++)
  {
    padNumber(aNumber);
    Serial.println(aNumber);
  }
}

void loop()
{
}

void padNumber(int numberToPad)
{
  if (numberToPad < 10)
  {
    Serial.print("0");
  }

  if (numberToPad < 100)
  {
    Serial.print("0");
  }
}
1188  Using Arduino / Programming Questions / Re: Choosing an Array and turning it all off in one time on: March 14, 2014, 04:02:31 pm
Turning LEDs on
Code:
for(int i = 0; i <= 9; i++){{
Turning LEDs off
Code:
for(int i = 0; i <pinCount; ){
Spot the difference ........
1189  Using Arduino / Programming Questions / Re: Choosing an Array and turning it all off in one time on: March 14, 2014, 12:29:06 pm
What to you see if you print the value of i and ledPins[ i ] in each of the for loops ?

Hint
Code:
for(int i = 0; i <pinCount; ){
1190  Using Arduino / Programming Questions / Re: Printing with HEX on: March 14, 2014, 11:21:03 am
Quote
For a project i need to send 32 bits of data via serial in HEX format, 8 hex bytes. in addition to this i need to have an ascii " : " that supposedly symbolizes HEX. Does Serial.print( num, HEX); take care of this for me already? Do i need to have Serial.print(num, HEX); as well as put "3A" the Hex equivalent of " : " in front of my data?

I have had a brilliant idea.  Why don't you try printing to the serial monitor and see for yourself ?
1191  Using Arduino / Programming Questions / Re: Arduino interrupts on: March 14, 2014, 06:53:38 am
Quote
and is there any way to get the current time stamp ???
Unless you have a clock attached to the Arduino you cannot get the current time but you don't need it.  Millis() gives you a number that increases as time goes by.  So, by looking at millis() you can decide if one event occurred before or after another, which is what you need.
1192  Using Arduino / Programming Questions / Re: logic behind capacitiveSensor library on: March 14, 2014, 02:12:06 am
What do you mean by "will not  work with Rfduino" ?
1193  Using Arduino / Programming Questions / Re: Help with elapsedMillis! on: March 13, 2014, 01:15:23 pm
Who knows ?
You could, of course, not use the library and do the timing yourself using millis()
1194  Using Arduino / Programming Questions / Re: Help with elapsedMillis! on: March 13, 2014, 12:45:54 pm
The code you posted compiles for me using 1.0.5 and a Uno.
1195  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.
1196  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.
1197  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.
1198  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 ?
1199  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 ?
1200  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
Pages: 1 ... 78 79 [80] 81 82 ... 295