Show Posts
Pages: 1 ... 97 98 [99] 100 101 ... 251
1471  Using Arduino / Project Guidance / Re: submersible ROV project collaborator wanted on: April 21, 2013, 03:38:14 pm
What have you got working so far? Is the Pi talking to the gamepad? Do you have a protocol devised for the communication between the Pi and the Mega?
1472  Using Arduino / Motors, Mechanics, and Power / Re: help with dc motors on: April 21, 2013, 12:15:03 pm
Easiest way is to get yourself a motor shield. Alternatively, build a pair of H-bridges yourself.
1473  Using Arduino / Motors, Mechanics, and Power / Re: Arduino controlling ceiling fan on: April 21, 2013, 12:12:37 pm
Thanks! I would also like to know if it is possible to control the direction of the ceiling fan with an Arduino.

Should be. Ultimately something will need to be switched with a relay and the arduino can control that.
1474  Using Arduino / Sensors / Re: START DIESEL ENGINE on: April 21, 2013, 12:07:32 pm
Looks simple enough. A state machine is a common way of handling this, although it seems like overkill for your current requirements. Here's an example in a similar thread: http://arduino.cc/forum/index.php/topic,106335.0.html
1475  Using Arduino / Programming Questions / Re: Arduino autoreset ?! on: April 21, 2013, 11:56:43 am
How are the arduino and whatever the relay is switching powered? Does it make a difference if you power the arduino from batteries?
1476  Using Arduino / Project Guidance / Re: Actual distance with TinyGPS on: April 21, 2013, 11:46:25 am
Are you moving fast enough that a second would give a measurable difference on the GPS?
1477  Using Arduino / Project Guidance / Re: More Help With My Thermostat on: April 21, 2013, 11:43:53 am
This declares a prototype for a non-existant function rather than calling one. Get rid of the void and fix the typo:
Code:
void coolong() ;
1478  Using Arduino / Project Guidance / Re: Gas furnace temperature control on: April 21, 2013, 10:40:33 am
Quote
The Output would the position that you're writing to the servo. A servo (using the Servo library) expects a value from 0 to 90 so you need to use the PID Library's SetOutputLimits() function to set those limits from 0 to 90 (from the default of 0 to 255)... or whatever fraction is appropriate. Every time you call myPID.Compute() the PID library will change the value of the Output variable; it's just up to you to write it to the servo.

You'll need to adapt Chagrin's advice. Unlike the servo, the stepper motor has no concept of its position. You will need to keep track of it, which means you need a way to find out what it is. Encoders are one possibility. Simpler is a mechanical limit switch to tell you when the valve is fully closed and you can step towards it at startup until you detect it. When the output gives you an angle between 0 and 90, you need to tell the stepper to make the appropriate number of steps to get there. i.e. if you're currently at 15 degrees and the PID is asking for 30, tell the stepper to step twice (7.5 degrees per step) in the appropriate direction.
1479  Using Arduino / Programming Questions / Re: oil heater in greenhouse on: April 21, 2013, 07:05:24 am
It won't make any difference to how the sketch works, but I'd suggest that you sort out your indentation - as you have it, it looks like the first if contains the second, which isn't the case. Your second comment is a copy of the first too, which obviously isn't appropriate. Personally, I'd take this repeated code:
Code:
            digitalWrite (ovn, HIGH);
            delay(250);
            digitalWrite(ovn, LOW);

and put it in its own little function as well.
1480  Using Arduino / Programming Questions / Re: New to the world, any guidance? on: April 19, 2013, 04:26:37 pm
You have one of the most classic C mistakes there:
Code:
if (relay1state = HIGH){

= is assignment. == is comparison.

You need
Code:
if (relay1state == HIGH){
1481  Using Arduino / Programming Questions / Re: oil heater in greenhouse on: April 19, 2013, 01:38:50 pm
It looks like the code TobyB posted would do what you want. What does your latest version look like.
1482  Using Arduino / Project Guidance / Re: submersible ROV project collaborator wanted on: April 18, 2013, 12:28:39 pm
Interesting project. I'd assume it would be best to find someone near you - where are you located?
1483  Using Arduino / Project Guidance / Re: Hello to the Arduino community. "Water" project advice... on: April 18, 2013, 12:07:05 pm
You could implement a cap on flow time too: close the valve if there is continuous flow for more than a specified time. In my house that limit would probably be 15 minutes when someone takes a long shower. In that circumstance it would be nice if the arduino provided an alarm, whether that be a warning light or a text message/email.
1484  Using Arduino / Programming Questions / Re: Importing CSV from computer, Arduino Uno on: April 18, 2013, 11:47:24 am
Anything that goes in progmem has to be known at compile time and thus, is part of your sketch. The easiest way to do this would be to put that data in a separate file so that you can easily change it, recompile and reload your sketch. Making it a .h file would be a good way to do this, though not a requirement.
1485  Using Arduino / Programming Questions / Re: Completing a task in a loop before breaking out. on: April 17, 2013, 06:40:23 pm
Post your while loop version, with code tags please. Without seeing it though, I'm guessing that you don't redo the analog read and map in the while loops, so angle never changes and hence you see the apparent freeze.
Pages: 1 ... 97 98 [99] 100 101 ... 251