Loading...
  Show Posts
Pages: 1 2 [3] 4 5 ... 164
31  Using Arduino / Sensors / Re: Weather Station on: June 15, 2013, 07:33:27 am
It appears that all you need to do is apply vcc (5V), ground and read the analog output from the sensor using analogRead. That'll get you a number between 0 and 1023. Use another thermometer to calibrate it and then a little math will convert that number to Celsius or Fahrenheit.

To start with though, just get the analog readings and display them in the IDE's serial terminal.
32  Using Arduino / Programming Questions / Re: Adding power supply control in a ServoEaser code on: June 15, 2013, 07:17:00 am
Ignoring the servoEaser for the moment, can you get a sketch that just turns on the atx power and moves the servo to work? For preference, just use servo.Write and delay in setup to move the servo to a few different positions once the power is on.
33  Using Arduino / Project Guidance / Re: Multiswitch timming? on: June 14, 2013, 08:19:24 am
Depending on the accuracy you need and what you mean by a few milliseconds, you might consider using micros() instead.
34  Using Arduino / Programming Questions / Re: purpose of Local server on: June 14, 2013, 05:57:35 am
Not sure what you mean by local server without a bit more context. If you mean localhost, it's shorthand for "the server I'm running this code on" you might use it when testing web pages by running a browser on the machine that serves them up.

Alternatively, local server may just mean a server on my LAN as opposed to a server out on the internet somewhere.
35  Using Arduino / Programming Questions / Re: Help with continuous rotation servo on: June 14, 2013, 05:42:42 am
Quote
I was able to calibrate my servo, but I am still trying to figure out something. How can I make it rotate for a specific amount of time, and then stop? If it set it at a speed, put in a delay, and them set it to stop, it just seems to keep rotating.

For testing purposes, put the code that achieves this at the end of setup and comment out (or remove) everything in loop, so it only runs once.
36  Using Arduino / Project Guidance / Re: Building an Aquarium controller on: June 13, 2013, 05:42:58 pm
That's an ambitious first project. It sounds like a lot of I/O too, so you'll probably outgrow an Uno by the end of it, but I suggest you start with one - cheaper to replace if you have any accidents.

I'd suggest you pick one of your requirements - temperature probes sound good and get it working to the point where you can display the temp on the serial monitor in the IDE, then do another stand alone. By the time you've done a few, you'll have a better appreciation of the level of difficulty involved in doing the whole thing, but you can build a subset of the whole thing that actually does something and work towards your all singing all dancing version.
37  Using Arduino / Programming Questions / Re: Can I keep logging a sensors data to an sd card while the arduino is in delay on: June 13, 2013, 05:50:34 am
So this seems to work but it starts in an off state is there a way to flip it, the led is off 30min then on for 3min i want on for 3 then off 30.

Set ledState to HIGH where it is declared, instead of LOW as you have it now.

copy the digitalWrite statement and put it at the end of the setup function.
38  Using Arduino / Project Guidance / Re: Arduino + Raspberry Pi question on: June 12, 2013, 06:12:46 pm
It's certainly possible - be careful connecting the Pi and the arduino - depending on which arduino you use, you may need level translation so that they can communicate (Pi is 3.3V).

Depending on what you mean by an extensive list of drinks, it should be quite feasible to do it without a Pi at all though. A Mega will be able to hold loads of recipes. Alternatively, you could hold them on an SD card. Or you can get them from a web server over ethernet. That web server might well be a Pi of course.

But if you want the Pi to be the front end and the Arduino to handle the mechanicals that mix your drinks, then sure, it's quite feasible.
39  Using Arduino / Project Guidance / Re: Help required in washing machine project on: June 12, 2013, 08:34:31 am
I'd suggest, rather as Pylon did, that even if you plan to build a machine from scratch, it would be a very useful learning experience as a prerequisite for that project to replace the broken PCB in your existing system with an arduino.
40  Using Arduino / Project Guidance / Re: auto aquarium water changes on: June 12, 2013, 06:10:43 am
I am thinking of making an auto water changer for my reef aquarium.  I already have a pump thatpumps water out and another to pump water in but I have to plug them in and then unplug them  was going to use floats and timers but it has been tricky getting them timed right.  So is it possible to put a water meeter inline with each pump and set them up with an arduino so once a week or every other week the drain pump will pull out a set amount of water and the fill pump will then put back that amount?

Rather than using meters, you can just find out by experiment how long each pump should run and control the time from the arduino. It would be good to have several sensors measuring water level to help avoid problems. I'm curious as to why you would do this weekly - if it were automated, I'd be inclined to do it more often with a smaller amount of water to minimise temperature change - daily?

The big issue here is getting your code reliable and making sure it recovers gracefully after a power outage. Defects can cause flooding or dead fish. You'll generally want to put a cap on how much water you can pump each day. Avoid plumbing the system into your home water supply, so you can cap the amount of possible flooding. Using the watchdog timer may be useful. Test your code very extensively and consider posting it here for review.

It's not a particularly complex system, but it is effectively life support and it's amazing how easy it is to pack bugs into a seemingly simple piece of code.
41  Topics / Home Automation and Networked Objects / Re: 2 room auto lighting with pir's on: June 12, 2013, 05:57:10 am
To get it working in the crudest possible way, copy the code in loop (all six lines of it) and paste it after those six lines. Change every 1 in the new piece to a 2. Fix the compilation errors you get, which will mean declaring the motion pin for room two. Don't forget to set it's pinmode. That should do it.

It'll work poorly because of the delays, but it'll get you started I hope.
42  Using Arduino / Programming Questions / Re: Ethernet Connection with Arduino on: June 12, 2013, 05:48:59 am
Typo here:
Code:
if(client.avialable())

But over and above that, you will need to loop looking for input - your code sends a request and then immediately looks for a response. The arduino is fast, your server won't have had a chance to send you anything when you make your single check for it. Take a look at the client example in the ethernet examples in the IDE.
43  Using Arduino / Programming Questions / Re: Autonomous Sail Trimming on: June 12, 2013, 05:39:43 am
Per PaulS, those variable names make it really hard to understand what you're trying to do.

Pos seems to be apparent wind direction. Have you confirmed that that piece works standalone? If not I'd suggest that you reduce the sketch to something that ignores the servo and ensure that your reading of the encoder works for all angles of the wind, being particularly careful to test the transition through 0 degrees from both sides for the compass.

Given that you're trying to navigate within a box, I'd expect to see some consideration of your desired course - I'm not clear what your trimming will achieve without it.

Do you have a instrument measuring apparent wind speed? If not, you may at least want an accelerometer to tell you angle of heel - without it you may well trim yourself into a broach or capsize. I'd prefer to have both sensors.

Edit: Clarity, as noted by the man from Seattle
44  Using Arduino / Programming Questions / Re: 2 "void loop"s? on: June 11, 2013, 07:19:47 pm
You can call as many functions from the loop function as you like. In your example you could choose which one to call based on the value of your x variable. If you want to be able to share variables between these functions, you will either have to pass them as parameters, probably as references, or more simply, make them global (declare them outside any function).
45  Using Arduino / Programming Questions / Re: Ethernet Connection with Arduino on: June 11, 2013, 07:16:18 pm
IS your IP address correct? Given the fact that you've redacted it, I assume it isn't a 192 series address and it rather looks as though it should be.
Pages: 1 2 [3] 4 5 ... 164