Show Posts
Pages: 1 2 [3] 4 5 ... 229
31  Using Arduino / Sensors / Re: WEMAUSA Liquid Level Sensors - SSS/SSL on: April 15, 2014, 06:13:09 am
It looks like it provides a variable resistance that depends on the depth of the measured fluid. Test it with a multimeter. If that'a what it is, try using a voltage divider to read it.
32  Using Arduino / Programming Questions / Re: Library error: 'Some thing' was not declared in this scope drive me Nuts on: April 14, 2014, 04:06:20 pm
Quote
Just as a design hint. Do not use an initialize function. Initialize all the things in your constructor. Otherwise a user might forget to call initialize and the code does not run as expected.

The use of constructors for this purpose in an arduino context is not appropriate. There is initialization of the hardware which must be complete before code such as serial.begin will work correctly. You should expect that the constructors will be executed before this init code. This is why so many Arduino libraries have a begin method to do the job that you might use a constructor for in a different environment.
33  Using Arduino / Programming Questions / Re: GPS with Arduino UNO - 2. on: April 14, 2014, 03:38:02 pm
It looks to me as though ground and power are connected on the shield already, so you can keep it connected. I'd like to see a bit more of the data - I'd expect to see some repetition, even if it's repetition of apparent garbage.
34  Using Arduino / Project Guidance / Re: Automatic Pilot System for Sailboat Using Arduino on: April 14, 2014, 03:33:57 pm
Very viable; the Arduino is orders of magnitude more powerful than the controllers in the early electronic autohelms.
35  Using Arduino / Programming Questions / Re: GPS with Arduino UNO - 2. on: April 14, 2014, 01:48:25 pm
Keep the hardware serial port at 115200 and keep a message in setup so you can see that the IDE is set correctly too.

Then send sketches that try to talk to the GPS at different rates. You might want to put the baud rate in a (long) variable so you can print it out so you know that the sketch actually loaded to the arduino.
36  Using Arduino / Programming Questions / Re: GPS with Arduino UNO - 2. on: April 14, 2014, 11:23:11 am
2 and 3 and there also needs to be a ground connection.

But, shield is connected on top of the arduino board, so, do you mean I have to separate them ?!!
No, it looks like the shield already takes care of it. I have an EM406 and breakout board so I connected it up to an arduino and ran your sketch - works fine once I set the IDE's serial terminal to 115200.

What you have still looks like a baud rate mismatch to me.
37  Using Arduino / Programming Questions / Re: GPS with Arduino UNO - 2. on: April 14, 2014, 11:00:01 am
2 and 3 and there also needs to be a ground connection.
38  Using Arduino / Project Guidance / Re: multiple devices on one serial port? on: April 14, 2014, 10:48:44 am
Do you need every packet from every device?

If not, you could indeed use multiple instances of softwareSerial and listen on each of them in turn.

If you need all the packets, a couple of Megas would give you enough serial ports (using one software port on each) to cover ten of your devices.
39  Using Arduino / Programming Questions / Re: GPS with Arduino UNO - 2. on: April 14, 2014, 10:28:12 am
Did you try michinyon's suggestion about a message in setup to confirm that your serial port matches the IDE's terminal program baud rate?
40  Using Arduino / Programming Questions / Re: Reversing a Sketch with a button on: April 11, 2014, 08:13:48 am
You have a inappropriate semi-colon here where you actually need an opening brace - {
Code:
if(buttonState == HIGH); //turn LED on
 
41  Using Arduino / Programming Questions / Re: Any suggestions how to organize this? on: April 10, 2014, 12:29:21 pm
I'd just build a function to handle each subsystem & call them all unconditionally from loop. Let each of them keep track of time using millis to see if it's time to do something.

Unless you're using one of the sleep modes though, the Arduino is going to be running at full speed/power so you won't get much benefit power wise from doing things less frequently.

You can get the arduino to sleep, see Nick Gammon's site: http://gammon.com.au/power. This will introduce an additional complication because of your communication with the house unit. You may need to arrange external circuitry to wake the arduino when data transmission is detected and you'll likely need to arrange for the sending unit to send some discardable data to wake the receiver before sending real data.

42  Using Arduino / Programming Questions / Re: Why this code is not running?? on: April 10, 2014, 05:35:30 am
To see that message you're going to have to call digitales1 from either setup or loop.

When you do though, your sketch will crash because of all the recursive calls you have - e.g. digitales2 calls itself.
43  Using Arduino / Project Guidance / Re: Just got Maker Kit w/ Arduino UNO - attempting to mix two beginner projects on: April 09, 2014, 03:12:06 pm
Quote
I have done a lot of basic tutorials over the last few months, and after learning some things, I am mostly intrigued by servo's and DC motors. I learned through study how to control servo's with a button, and learned how to work with the little DC motors.

Given this, it seems you have pretty much all the tools you need. Can you simply make a sketch that has these four things happening with suitable calls to delay() between them?

Note that later on, you'll want to drop the use of delay, but for your current requirement, it should work fine.
44  Using Arduino / Programming Questions / Re: HI I'm New, Trouble with simple one shot timer to turn on pin in SwitchCase on: April 08, 2014, 10:17:18 am
You've outsmarted yourself with that PORTB PORTD stuff. The gatepin is 11, which is part of PORTB, so all your individual cases mess with it.
45  Using Arduino / Programming Questions / Re: HI I'm New, Trouble with simple one shot timer to turn on pin in SwitchCase on: April 08, 2014, 06:24:40 am
Quote
The oneshot pulses each time the range changes, but the interval doesn't have much effect on the timing of the oneshot.
5000 gives me the same time on as 100.

How are you testing it? The code looks ok apart from the issue of overlap: if the range changes rapidly, gateTime will be repeatedly reset before interval is up.
Pages: 1 2 [3] 4 5 ... 229