Show Posts
Pages: 1 ... 89 90 [91] 92 93 ... 224
1351  Using Arduino / Programming Questions / Re: Noob - For Loop with Arrays on: June 02, 2013, 07:35:24 pm
You can't reference variables dynamically by there name without some sort of hash table. The compiler turns TankTempArray into a memory address by the time it finishes, so the String "TankTempArray" has no meaning to it. You can instead, use a multidimensional array (array of arrays) and pass the index of which one you wish to refer to.
1352  Using Arduino / Programming Questions / Re: Consistent flash on button press (Button + FlashWithoutDelay) on: June 02, 2013, 06:25:09 pm
I would like to learn how to accomplish this without using delays, and I'm still trying to work out the logic of what I want, but I'm stumped for now.

To get multiple switches working, separate the logic. The switch logic should only update the interval variable (and maybe a boolean that is set when at least one button is pressed).

Then, independent of the switch logic, you should have the BlinkWithoutDelay logic, almost exactly as it is in the example. Perhaps the only minor difference would be a check for the aforementioned boolean.
1353  Using Arduino / Programming Questions / Re: Arduino Uno .. Temperature Sensor with Led Display.. on: June 02, 2013, 09:57:52 am
Edit your post to surround your code with CODE tags.
1354  Using Arduino / Programming Questions / Re: Arduino Uno .. Temperature Sensor with Led Display.. on: June 02, 2013, 09:50:35 am
So what have you tried so far?
1355  Using Arduino / Project Guidance / Re: Additional Analog input via an external source on: June 01, 2013, 11:50:35 am
My question is how can I go about reading the said chip above on the arduino?

Quote
Interface Type:   Serial, SPI
1356  Using Arduino / Programming Questions / Re: Incremental Servo Movement on: May 31, 2013, 10:20:44 pm
prevPos is never updated, so it never changes.
1357  Using Arduino / Project Guidance / Re: how to programme arduino to move its servos at certain time,there is a ds1307RTC on: May 31, 2013, 03:50:44 pm
Thank you very much for replying to my message, can you give me an example because I need to see something to understand as Iam a total noob but I'd like to learn some things,
thank you again

There are plenty of examples that already come with the library for that particular component. Try playing with some of those.
1358  Using Arduino / Project Guidance / Re: Project Guidance for a website controlled Arduino greenhouse on: May 31, 2013, 03:48:44 pm
this is the error it gives: 'InitDHT' was not declared in this scope

You call the function in your code, but you don't define what its supposed to do, nor do you include a library that defines what it is supposed to do.
1359  Using Arduino / Project Guidance / Re: Project Guidance for a website controlled Arduino greenhouse on: May 31, 2013, 03:43:07 pm
I cant get the DHT 11 working when I compile it gives an error.

But you're not going to tell us what that error is?
1360  Topics / Home Automation and Networked Objects / Re: Solarometer Network problem on: May 31, 2013, 02:43:45 pm
It looks like "Network variables" belongs in a comment and not in the code.
1361  Using Arduino / Programming Questions / Re: How to check if a variable is a member of a set on: May 31, 2013, 02:41:16 pm
@ Arrch
I understand, but when you set it equal to zero, it does not show anything. Maybe it needs to be "if( (byte)((n & -n) + n) == 0)"

Yeah that, or mask away the higher order byte.
1362  Using Arduino / Programming Questions / Re: How to check if a variable is a member of a set on: May 31, 2013, 02:32:35 pm
Has to be 256

256 in byte form is 0.
1363  Using Arduino / Programming Questions / Re: How to check if a variable is a member of a set on: May 31, 2013, 02:19:13 pm
How do we get it to acknowledge zero as a valid subnet octet, without going back to the old case statements?

The quick and dirty way would be to add a secondary check:

Code:
if ( (((n & -n) + n) == 0) || n == 255)

I think the issue with it not working for 255 has to do with negation of unsigned variables and sign extension. Making n signed might help.
1364  Using Arduino / Project Guidance / Re: High Temperature Arduino Uno and XBee Wireless Device on: May 31, 2013, 02:13:05 pm
The Uno rev 3 does not use the FTDI chip does it?


Mark

No, you're right, but the chip it uses has the same temperature range.
1365  Using Arduino / Project Guidance / Re: Simple Code Correction I cant figure out on: May 31, 2013, 02:09:59 pm
That is the statement already in the code. It does not work. I think that the arduino needs a read command or something. The other reply says that analogWrite cannot be used, but I have used it on multiple occasions. Please provide an alternative.

Why are you trying to analogWrite a value of HIGH? HIGH is used for digitalWrites. analogWrites expect a value from 0-255. What kind of motor are you trying to drive? Can you get it to drive independently? How is it hooked up?
Pages: 1 ... 89 90 [91] 92 93 ... 224