Show Posts
Pages: 1 ... 14 15 [16] 17 18 ... 231
226  Using Arduino / Programming Questions / Re: Arduino IDE WIth Break point option on: March 17, 2014, 03:28:43 am
Quote
I would like to know is there any IDE .which COmes up with Breakpoint So to determine The postion Where it being getting struck
The easiest things that you can do is to print messages at various points in your code.  The messages can contain the value of variables. 

If you really want, to you could write a function that when called prints out the position it was called from and the value of variables and waits for a button press before returning and continuing the program, but you could end up writing more code than is in the program itself.
227  Using Arduino / Programming Questions / Re: how to change pin assignments in SoftSerial on: March 17, 2014, 02:49:09 am
Post the code that you are trying to use.  What pins are defined in the SoftwareSerial setup, the equilvalent of this line ?
Code:
SoftwareSerial mySerial(10, 11); // RX, TX
228  Using Arduino / Programming Questions / Re: Simple Switching Sequences on: March 16, 2014, 05:48:04 pm
Sounds like a job for a Finite State Machine to me.
Each time through the loop() function read the button pin. 
Every time the button is pressed add one to a variable. 
Use the value of the variable with switch/case. 
Write the code that should be executed in each case, but don't use delay() as it stops anything happening but the delay, including reading the button.  Instead, use millis() for timing as in the BlinkWithoutDelay example in the IDE.
229  Using Arduino / Programming Questions / Re: how to change pin assignments in SoftSerial on: March 16, 2014, 05:18:50 pm
Quote
I'm guessing that pins 7 and 8 used to be the defaults for SoftwareSerial, but they no longer are, and that's where the GPRS board is looking for inputs, so it doesn't see anything coming in
Surely one of the reasons for using SoftwareSerial is that you can define the Tx and Rx pins used when creating the serial instance, and that they are not hard coded.  There are, however, some limitations on which pins can be used depending on the Arduino board being used.  Which board are you using ?
230  Using Arduino / Programming Questions / Re: Problem in Serial.Available() using for Password and Clearing it on: March 16, 2014, 03:02:19 pm
What have you got the line ending set to in the Serial monitor ?
231  Using Arduino / Programming Questions / Re: Do all of the "Linux" Arduino boards work with Macs? on: March 16, 2014, 02:16:57 am
What "Linux" Arduino boards did you have in mind ?
232  Using Arduino / Programming Questions / Re: Problems with LCDs and SPI on: March 15, 2014, 05:16:34 pm
Quote
the sketch wont compile.
What sketch would that be ?
233  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.
234  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");
  }
}
235  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 ........
236  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; ){
237  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 ?
238  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.
239  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" ?
240  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()
Pages: 1 ... 14 15 [16] 17 18 ... 231