Show Posts
Pages: 1 ... 4 5 [6] 7 8 ... 73
76  Using Arduino / Programming Questions / Re: I am having problems writing the code for a temp controlled fan on: March 27, 2014, 10:06:57 pm
Code:
int tempPin = 0;   // Attach vout to analog pin.
You're attaching DIGITAL PIN 0 here. Try:
Code:
int tempPin = A0;   // Attach vout to analog pin.
77  Using Arduino / Programming Questions / Re: Running multiple commands together on: March 27, 2014, 09:42:01 pm
I tried making it with state machine but I think what I am doing is wrong, can someone please help me out
Look up 'switch case' in the reference section.
78  Using Arduino / Project Guidance / Re: pvc film thickness: i need to measure pvc (plastic) film thickness !!!! on: March 27, 2014, 09:21:47 pm
Is the film transparent? If so, what are its optical properties?
79  Using Arduino / Programming Questions / Re: Help in while, if & else on: March 27, 2014, 12:59:29 am
digitalRead() does not return true or false. Stop pretending it does.
Then what does it return?
80  Using Arduino / Programming Questions / Re: any code for arduino to stop servomotor ? on: March 27, 2014, 12:40:45 am
And yet there is still no link to the servo you have.
He said he's using one of these:
http://www.servodatabase.com/servo/hitec/hs-5245mg
81  Using Arduino / Programming Questions / Re: A means to track hardware usage after each loop on: March 27, 2014, 12:16:12 am
It's more likely to be a software problem. Post your code (between code tags) so that we can see what may be causing it.
82  Using Arduino / Project Guidance / Re: Automated Chicken Feeder - Noob needs help on: March 26, 2014, 11:52:33 pm
I didn't know automated chickens needed feeding!  smiley-grin
83  Using Arduino / Project Guidance / Re: TRRS Phone Jack Madness on: March 26, 2014, 11:21:53 pm
The tip switch is only closed when there's no plug in the socket. If you can make use of that facility, go for it. I wouldn't use a plug like that for power for the reasons you stated. If you're not going to pass much power through it, why not use a MicroUSB plug and socket?
84  Using Arduino / Project Guidance / Re: Timers on: March 26, 2014, 10:52:50 pm
Hello

I am undertaking a project, which has two tubes (one glass and copper) in the vertical, where I have to pass it a magnet, and has 2 sensors in each tube one upstairs and one downstairs and I have to measure time between the sensor top and bottom sensor, but I am having difficulty in timers, and need help.

I hope that the explanation has not been confused

I leave here a part of the program I could do:
Code:
    time1 millis();
What is that supposed to do?
85  Using Arduino / General Electronics / Re: powerswitch wires on: March 26, 2014, 12:48:14 am
Have you tried swapping the connections to A and 3?
86  Using Arduino / Programming Questions / Re: any code for arduino to stop servomotor ? on: March 26, 2014, 12:21:56 am
Use a flag.
Code:
boolean motorAt90 = 0; // false
...
void loop(){
 if(motorAt90 ==0){
    move motor to 90Degs;
    motorAt90 = 1;  //true
  }
}

   
87  Using Arduino / Programming Questions / Re: Help in while, if & else on: March 26, 2014, 12:12:32 am
sorry man i am new to this its something like that
i want to ask is how to add other button to with different time.
Get rid of the delays. Look up the 'blink without delay' example in the IDE and Finite State Machine.
88  Using Arduino / Programming Questions / Re: Does delay stop Millis on: March 26, 2014, 12:06:10 am
So I know that when you use delay it stops the code from running for that long. But does delay also stop the internal clock that counts millis?
No, but if you're using millis() to time events, when delay() ends you may have missed an event.
89  Using Arduino / Project Guidance / Re: Automated Chicken Feeder - Noob needs help on: March 25, 2014, 11:57:46 pm
More suitable would be http://www.jaycar.com.au/productView.asp?ID=YG2730. I would use limit switches instead of time to control its position. Just run it until it hits the limit switch, wait for 2 seconds and then reverse it until it hits the other limit switch. You might find problems closing the shutter against the flow of feed. Some feed may get trapped and stop the shutter from fully closing.
90  Using Arduino / Project Guidance / Re: Counter/timer questions on: March 25, 2014, 11:40:25 pm
Thank you for interest.

Pushing a button gives timer1 value:
timer1=millis()+3600000;
That's not in the code you posted above. I'm not a mind reader.
I suggest you look at the 'blink without delay' example in the IDE and also 'Finite State Machine'.
Pages: 1 ... 4 5 [6] 7 8 ... 73