Show Posts
Pages: 1 ... 97 98 [99] 100 101 ... 244
1471  Using Arduino / Sensors / Re: sensor pressure 1115 on: April 01, 2013, 12:27:18 pm
To start with, wire the appropriate connections on the phidget up to 5V, ground and an analog pin on the arduino. Use analogRead to get a reading and display it using serial.println. Then you can figure out how to transform the voltage you're getting into the units of your choice with a little math.
1472  Using Arduino / Project Guidance / Re: How to stop sending SMS on: April 01, 2013, 10:55:29 am
Write a function that uses your existing sensors to return a number representing the level of whatever you're measuring. In conditionsToSendSMS, call it and compare it to a variable holding what it was last time. If the level has changed, send the SMS. Copy the new level reading to the previous.
1473  Using Arduino / Programming Questions / Re: IF statement with RETURN: HELP! on: April 01, 2013, 09:14:48 am
It's nothing to do with the return - you can delete it and the routine will function just the same.
1474  Using Arduino / Programming Questions / Re: HID IClass Reader + ArduinoUno at 57600 baud rate, is it possible? on: March 31, 2013, 08:34:04 am
The arduino can manage that baud rate. Your code suggests that you have your HID reader attached to the hardware serial pins and you're trying to read the result using the same pins on the serial monitor. Is that what you have?
1475  Using Arduino / Sensors / Re: LM35DT/NOPB vs LM35DZ about 1 Celsius degree diference? on: March 30, 2013, 07:32:47 am
They're analog, so vulnerable to variations in the components in their two circuits and the datasheet says they're accurate to 0.5 degrees. Thus, not an especially surprising result.
1476  Using Arduino / Motors, Mechanics, and Power / Re: Motors Will Only Go Backwards? on: March 29, 2013, 03:50:11 pm
Put another delay(5000); after the call to forward.
1477  Using Arduino / Programming Questions / Re: Strange behavior calling a function on: March 29, 2013, 02:39:47 pm
What value does this have:
Code:
Canbus.ecu_req(VEHICLE_SPEED, buffer)

Capture it in a variable, either in the if or beforehand and serial.print it.
1478  Using Arduino / Programming Questions / Re: Strange behavior calling a function on: March 29, 2013, 02:11:31 pm
I'm guessing this:
Code:
  if(Canbus.ecu_req(MAF_SENSOR, buffer) == 1 && Canbus.ecu_req(VEHICLE_SPEED, buffer) == 1)
evaluates to false. Need more serial prints to find out.
1479  Using Arduino / Project Guidance / Re: SoftwareSerial and NMEA question on: March 29, 2013, 12:30:22 pm
Does the arduino have any spare time in the send telemetry function it could use to be reading the GPS?
1480  Using Arduino / Project Guidance / Re: Bathymetry Measuring Apparatus on: March 29, 2013, 10:27:21 am
I think in your position, since you have a Mega, I'd just use it and be done. Do you need to get the Uno version working?
1481  Using Arduino / Programming Questions / Re: Arduino as part of larger C++ project on: March 29, 2013, 09:43:25 am
I'm not sure I'd burden the PC with the intimate details of what pins things are attached to - let the Arduino worry about that. I'd build a little protocol that would let me send packets on the serial port to say things like "Stepper 1, 300 steps clockwise" or "servo 6 to 150 degrees". Depending on your needs, you might have the arduino respond to let you know when it's done.
1482  Using Arduino / Project Guidance / Re: Bathymetry Measuring Apparatus on: March 29, 2013, 08:58:08 am
That getgps routine is designed to be called multiple times in the course of reading a gps sentence. It builds up the string in the buffer until it sees a end of line and then parses it. The problem is that as you are switching between soft serial ports, there is opportunity to miss data. You need to restructure this so that you listen on one serial port until you have a complete sentence ($ to '\n') and then you can parse it. Then switch to the other serial port and repeat.
1483  Using Arduino / Project Guidance / Re: Bathymetry Measuring Apparatus on: March 29, 2013, 07:03:21 am
Without the two key routines it's hard to say what's wrong. Do they share any buffer to accumulate NMEA sentences?
1484  Using Arduino / Programming Questions / Re: Arduino as part of larger C++ project on: March 29, 2013, 06:47:35 am
A brief look at the stepperbee suggests that it's working very much as an Arduino attached to a PC would. The PC program is sending commands to it over USB but that's wrapped in a library so that it looks more integrated. You could control a stepper and a servo from an arduino easily enough, but you would have a bit more coding work devising a serial protocol to handle the communication between the PC and the arduino for the PC to give instructions as to what those peripherals should do.
1485  Using Arduino / Project Guidance / Re: Want to build a spot welder. Need adjustable pulses and display on: March 29, 2013, 05:59:47 am
You have made two classic errors in this code:
Code:
if(buttonState = HIGH)

The first is that comparing for equality uses == not =. Everyone does this, usually multiple times. The other is to confuse the pin number with its state. You need to use digitalRead to find out what state the pin is in. Try it this way:

Code:
if(digitalRead(buttonState) == HIGH)
Pages: 1 ... 97 98 [99] 100 101 ... 244