Show Posts
Pages: 1 ... 59 60 [61] 62 63 ... 231
901  Using Arduino / Programming Questions / Re: Turn relay for time on: July 17, 2013, 11:12:24 pm
Code:
startTime = millis();
...
if (millis - startTime == 5000)

millis is still a function, not a variable. You should be treating it like one, like you did in the first line of code. Also, you should be using >= instead of ==
902  Using Arduino / Programming Questions / Re: Sending problem on: July 17, 2013, 10:56:09 pm
What do I do?

Follow directions. Code should be posted using CODE tags, as is explained in the linked thread, and can be seen in just about any thread in these forums.
903  Using Arduino / Programming Questions / Re: Sending problem on: July 17, 2013, 10:51:15 pm
hmm. you mean I have to insert code so that people can see?

You've already "inserted code", you just didn't do it properly.
904  Using Arduino / Project Guidance / Re: Xbee Wifi Module Configuration on: July 17, 2013, 10:42:54 pm
What have you tried?
905  Using Arduino / Programming Questions / Re: Sending problem on: July 17, 2013, 10:33:13 pm
Hi, Thanks for helping. I already researched alot but could not find any answer.

Not enough, apparently, since you've ignored some of the instructions in the first link on how to post code...
906  Using Arduino / Project Guidance / Re: Can anyone help me on: July 17, 2013, 10:29:57 pm
Perhaps you can review some of the other posts that show you how to properly post code.
907  Using Arduino / Project Guidance / Re: Can anyone help me on: July 17, 2013, 04:05:30 pm
Isn't while loop just for analog signals? The vibration sensor is digital.

No...

Quote
And do I need to do "int TLLED = 12;" and "const int TLLED = 12;" is this not repetitive?

You can't have both

Quote
I feel like I would be fine with just "int"? I could be wrong though.

Pins don't (usually) change during execution, so using const is better practice.
908  Using Arduino / Project Guidance / Re: regarding usage of arduino board on: July 17, 2013, 02:48:40 pm
http://bit.ly/110B7pp
909  Using Arduino / Programming Questions / Re: get a string via serial port,, problem on: July 17, 2013, 01:47:26 pm
You're reading the data without checking if there is data to read. You should be using Serial.available() to check how much data is available, before your read it.
910  Using Arduino / Programming Questions / Re: Counting revolution of stepper - big number on: July 17, 2013, 01:45:49 pm
I get from serial monitor very big number like: 0, 7290, 17181, 27059, 36927, 46809, interval=1s.. I think it must be something like 0, 200, 400, 600. What's wrong?

You're not counting the pulses, you're incrementing count every iteration of the loop when your two conditions are true. It sounds like you should be looking for transitions, like when stepPinState transitions from LOW to HIGH.
911  Using Arduino / Programming Questions / Re: Counting revolution of stepper - big number on: July 17, 2013, 01:22:08 pm
Where's the rest of your code?
912  Using Arduino / Project Guidance / Re: Storing True/False bytes into bits on: July 17, 2013, 01:18:16 pm
I was wondering if this method would work below:

Seems like it would take much less time to test it yourself than it would take to make a forum post, have someone else test it, and report back whether it works or not.
913  Using Arduino / Programming Questions / Re: How to Program Specific Button Sequence and Others on: July 17, 2013, 01:10:20 pm
Why are you analog reading buttons?

Code:
if (val == LOW && val2 == LOW); {

We typically don't put semicolons after if statements...

My project consists of a buzzer and two push buttons and my idea of how it would work was: if you push button one, it would trigger the buzzer and it would stay on for the duration, whether the button is held down or not and after the buzzer goes off button one should do nothing.

This tells me that you want something in setup that waits (blocks) until the first switch is pressed. Only then, should you move into the loop which only handles the second switch.
914  General Category / General Discussion / Re: Home automation capabilities on: July 17, 2013, 10:44:54 am
Other than robotic systems, what could possibly be of reliable use for the average person? 

My porch lights turn themselves on at dusk, and back on at dawn, independent of the time of year.
My garage door closes itself if I've left it open for too long.
My vegetable garden is watered only when it needs it.
The cat's litterbox cleans itself, discards the waste into the toilet, and automatically flushes.
Next up is to have my pool keep itself filled, and notify me when I need to add Chlorine/Acid.

You just have to stop and think about what you are doing around your house that a machine can easily do. That's how people invented things like automatic sprinklers, washing machines, dishwashers, etc.
915  Using Arduino / Programming Questions / Re: How to start a loop with a manual switch on: July 17, 2013, 10:31:51 am
what function could I use to stall it there?   That would be the optimal place.

Code:
while (switch is not pressed) { }
Pages: 1 ... 59 60 [61] 62 63 ... 231