Show Posts
Pages: [1] 2 3 ... 230
1  Using Arduino / Programming Questions / Re: i want to know how to write this syntax on: September 20, 2014, 05:46:09 pm
Use bitWrite and bitRead
2  Using Arduino / Programming Questions / Re: NEWBEE: About reading uninitialized number in EEPROM section. on: September 19, 2014, 03:39:12 pm
Whoops. That's what I get for testing in the wrong environment.
3  Using Arduino / Programming Questions / Re: NEWBEE: About reading uninitialized number in EEPROM section. on: September 19, 2014, 12:51:56 pm
Code:
if (config.c == 0xFFFFFFFFFFFFFFFF)
Code:
  Serial.println(f == 0xFFFFFFFF);

?

At least eliminate possible sources of error and match the parameters of the test.
4  Using Arduino / Programming Questions / Re: NEWBEE: About reading uninitialized number in EEPROM section. on: September 19, 2014, 12:35:46 pm
How can I test for example if config.a is a normal number or a NAN ?

Code:
if (config.c == 0xFFFFFFFFFFFFFFFF)
5  Using Arduino / Programming Questions / Re: Serial Port interval? on: September 18, 2014, 07:02:09 pm
but the problem is that i am not using buttons connected to the arduino
So?
these buttons are connected to an arduino shield, and being read by a chip on the shield, the arduino only asks for its state through the i2c bus
So?

Quote
so i'm not sure i can use the millis method?

Why not? The millis model shows how to perform an action at intervals without a delay(). You're asking how to print to the serial port at an interval without a delay(). What does external hardware have to do with this?
6  Using Arduino / Programming Questions / Re: Serial Port interval? on: September 18, 2014, 05:48:30 pm
Blink without Delay example
7  Using Arduino / Programming Questions / Re: Problems with strings and &chars on: September 18, 2014, 05:46:57 pm
But I can't find any more info about strings as variables. So it is probably an object or a function call.

strings aren't variables. In the example you provided, you'll notice there is a #include <string> at the top, to give you the object. In the Arduino environment, they are known as "Strings" and are a piss poor way of abstracting very simple concepts.
8  Using Arduino / Programming Questions / Re: I need a little help for a club project on: September 17, 2014, 04:43:16 pm
Could you now figure out what i mean??

You may have better luck on the international forums.
9  Using Arduino / Programming Questions / Re: I need a little help for a club project on: September 17, 2014, 12:38:46 pm
have no one an Idea?


I couldn't figure out what you're asking with this sentence:

Quote
I have no idea how I can spend time on the timer Shiftout and to be the times displayed in the change.
10  Using Arduino / Programming Questions / Re: arduino strucks on Serial.println(); SRAM or other fault on: September 17, 2014, 11:26:11 am
Post code, not screenshots.
Use code tags.
11  Using Arduino / Programming Questions / Re: I need a little help for a club project on: September 17, 2014, 10:21:07 am
So what problem are you having?
12  Using Arduino / Programming Questions / Re: Sub Routine on: September 17, 2014, 10:17:12 am
Right now it's in the loop "sub routine". So create one that looks like loop, but has a different name and copy the code into it. That's the easy answer, but I get the feeling you're going to run into issues with trying to do other things in the loop because that code is blocking. If that's a problem, you'll need to learn about writing non blocking code using millis() and state machines. The former of which is demonstrated in the blink without delay example.
13  Using Arduino / Programming Questions / Re: do this to any variable that equals y, do that to any variable that equals x on: September 16, 2014, 07:02:39 pm
That would print true, correct?

It wouldn't even compile.
14  Using Arduino / Programming Questions / Re: can I call one function from within another? on: September 16, 2014, 05:58:13 pm
do you agree that my problem is due to the variable 'a' being assign within the function and it is not recognised outside the function?


You can't assign multiple values to elements of the array using the curly brace notation outside of it's declaration. If you want to change it's values, you must assign the values to the elements individually.
15  Using Arduino / Programming Questions / Re: can I call one function from within another? on: September 16, 2014, 05:53:03 pm
I think my problem is that I am assigning the variable 'a' as a byte within the function so it is not recognised outside it but how can I get round this?
Either pass it as a parameter or make it global.
Quote
If I assign 'a' globally and remove 'byte' from the function it tells me it expects a primary expression before the { token.
Probably because you did something wrong.
Pages: [1] 2 3 ... 230