Show Posts
Pages: 1 ... 97 98 [99] 100 101 ... 252
1471  Using Arduino / Sensors / Re: 1 wire temp sensor on: April 25, 2013, 06:38:36 am
discoverOneWireDevices populates the addr variable with each address in turn. Use memcpy in the while loop to copy those addresses to a global array of addresses.

This is problematic though because if you have multiple devices on a bus, you can find the addresses of each of them, but you will have no idea which is which. If they're all doing the same job, perhaps that doesn't matter, but if you're hoping to monitor kitchen temp, basement temp, attic temp, you have a problem.
1472  Using Arduino / Programming Questions / Re: logic problem on: April 24, 2013, 06:49:10 pm
Use serial.print to tell you what those switch states are. It should help you zero in on your apparent wiring issue.
1473  Using Arduino / Project Guidance / Re: Trigerring a camera inside a moving car on: April 24, 2013, 04:18:50 pm
Go with GPS - confirm first that it's  able to get a fix in the vehicle. Then just start taking picutures as you approach the waypoint and continue until a little after you pass it.
1474  Using Arduino / Project Guidance / Re: Line follower on arduino mega on: April 24, 2013, 01:41:15 pm
My initial thought was that there's no way you could get a JVM on an arduino. A little google apparently shows otherwise:
http://hackaday.com/2012/10/15/%CE%BCj-a-java-virtual-machine-for-microcontrollers/

I'd still suggest that you would be a lot better off coding this up in C++ though.
1475  Using Arduino / Programming Questions / Re: PWM motor speed question on: April 24, 2013, 09:57:06 am
It looks like the routine you have nearly does that. You just need to add a boolean variable, named stirring perhaps and only do the ramp up if you're not already stirring.

Presumably you'll need something in loop to decide when to stir, rather than doing it unconditionally as you are now.
1476  Using Arduino / Project Guidance / Re: Using Digital Thermometer to tell GSM Shield to send a text alert on: April 24, 2013, 09:21:34 am
Start with a sketch that uses the DallasTemperature library to read your thermometer - I assume it's a DS18B20, but if not, whatever is needed to read it.

Print the temperature to the serial port. Then add the if statements that check for high temps and print messages for each threshold as you see them.

Write a seperate sketch to master sending a text, then combine the two.

You'll need to add some logic to stop the text messages being sent repeatedly while the temp is high - one text message per threshold is enough!
1477  Using Arduino / Project Guidance / Re: Gas furnace temperature control on: April 24, 2013, 05:25:36 am
Quote
If I remove: outputPin=(9);
I get this:
error MyPID was not declared on this page,,, expected initializer before myPID

If I remove:   int val = analogRead(9);  // get the sensor value
I get this:
val was not declared in this scope
I suspect that when you removed the definiton of outputPin, you left the definition of inputPin without a semicolon or with an extra comma. Such errors tend to manifest themselves as an error at the next statement which can be confusing because that statement itself has nothing wrong with it. Easy fix though, you don't need inputPin either.

As to the issues with val, it is used in the few statements that follow its definition. All of them need to go.
1478  Using Arduino / Project Guidance / Re: Using Arduino to interface with servos on: April 24, 2013, 05:10:08 am
Quote
But as I read in reference, I'll have to connect :
- servo's red wire (+) to the power supplier
- the ground wires (-) to the Arduino board
- the signal wires to the Arduino board too?

All of the above and the power supply ground to Arduino ground as well.
1479  Using Arduino / Programming Questions / Re: PWM motor speed question on: April 23, 2013, 03:54:51 pm
Quote
I want to call the stir() function passing a duration in seconds ..ramp up count to the variable passed ... then ramp down and then exit the function. I want to stay in the function until the ramp down is complete

In which case, why are you doing all that stuff with millis and seconds? Isn't that routine just:
Code:
RampUp();
delay(10000);
RampDown();

I initially assumed you were trying to avoid delay so that you could attend to other matters in loop.
1480  Using Arduino / Programming Questions / Re: PWM motor speed question on: April 23, 2013, 02:54:33 pm
What does it do? What would you like it to do? What serial output do you get?

Since you're calling it in loop, I assume you're expecting it to spool up for a 10 second stir and then wind down and stop and then do it all again repeatedly. If that's the case but it only works once, the likely cause is that you never set you second variable back to zero. After the wind down would be a good place.
1481  Using Arduino / Programming Questions / Re: Serial print pin status on: April 23, 2013, 12:32:41 pm
Also in Arrch's (nicer) scenario, you'll need to change your test to look for LOW.
1482  Using Arduino / Programming Questions / Re: Serial print pin status on: April 23, 2013, 12:28:24 pm
Sounds like you have a floating input - you'll need a pulldown resistor on your switch.
1483  Using Arduino / Project Guidance / Re: Wifi E-ink on: April 23, 2013, 09:51:58 am
That shield, an uno and a wifi shield would be the obvious starting point. Check though that the shields don't have any conflict in the pins they use, If they do, it's probably not a show stopper, but you will have to wire them up manually, rather than just plugging them together. In this scenario you may need to tweak any libraries that those shields use too.

For power you can either regulate the supply from your batteries to 5V and provide it on Vin or you can provide it via the barrel connector. In the latter case, you'll need a minimum of 7V.
1484  Using Arduino / Project Guidance / Re: Using Digital Thermometer to tell GSM Shield to send a text alert on: April 23, 2013, 09:35:53 am
Certainly plausible. What is the purpose of the two switches?
1485  Using Arduino / Project Guidance / Re: Using Arduino to interface with servos on: April 23, 2013, 09:23:02 am
Note that although you can control your sevos from the arduino, you cannot power them from it - you will need a separate supply - don't forget to connect the grounds.
Pages: 1 ... 97 98 [99] 100 101 ... 252