Loading...
  Show Posts
Pages: 1 ... 21 22 [23] 24 25 ... 106
331  Using Arduino / Programming Questions / Re: Connect RF Link Transmitter / Receiver - 434MHz and MP3 Shield on an UNO on: March 29, 2013, 01:09:02 pm
Code?
332  Using Arduino / Programming Questions / Re: Weird problems with Wire.h on: March 29, 2013, 11:52:01 am
Please fix this
Quote
if (accelerationX >  500) control = B00000001; //tilt back
  if (accelerationX < -500) control = B00000010; //tilt forward
  if (accelerationY >  500) control = B00000011; //tilt right
  if (accelerationY < -500) control = B00000100; //tilt lfet
  if (accelerationX <  500) {
  if (accelerationY <  500) {
  if (accelerationX > -500) {
  if (accelerationY > -500) control = B00000000;}}} //back to blank state

For your last "control = B00000000" just use an ELSE statement.


Next, why does stop() need to be in every movement? Also all those delays are going to make your code very sluggish. Look into the "Blink Without Delay" example, it will help you greatly.
333  Using Arduino / Project Guidance / Re: Recording Peak Value on: March 28, 2013, 09:08:29 am
When does previousValue get updated? I would think the previousValue is the old peak value, so you can just substitute previousValue with peakValue, and it should work.
334  Using Arduino / Programming Questions / Re: Serial.read Problems on: March 27, 2013, 02:40:06 pm
@PaulS

I wanted the OP to answer that.
335  Using Arduino / Programming Questions / Re: Serial.read Problems on: March 27, 2013, 02:17:19 pm
What is this doing and why is it written like this?
Quote
while (Serial.available() == 0);
336  Using Arduino / Programming Questions / Re: Combining string to hexadecimal and maybe vice-versa on: March 27, 2013, 10:56:55 am
Try this, http://cboard.cprogramming.com/cplusplus-programming/23177-convert-decimal-int-hex.html
337  Using Arduino / Programming Questions / Re: TextFinder on: March 27, 2013, 10:41:14 am
You can maybe use strtok() to split the string into smaller parts and then use indexOf() to filter out the rest.
Try this, http://arduino.cc/en/Tutorial/StringIndexOf
338  Using Arduino / Project Guidance / Re: Honours Project on: March 26, 2013, 05:50:47 pm
You can just go straight to processing, no putty needed.
339  Using Arduino / Programming Questions / Re: Help with jumpy LEDs on: March 26, 2013, 11:33:31 am
What is wrong here?
Quote
int input = Serial.read(); //read data
Your cases are looking for CHARs but your giving it INTs (hint hint)
340  Using Arduino / Programming Questions / Re: Servo Movement Issues on: March 26, 2013, 11:02:35 am
The reason those "servos" will not work is because they lack the key feature normal servos have, which is a potentiometer. The potentiometer is the only way for the servo to get feed back from its position. You take that out, and it becomes a continiously rotating motor.

Added: why not just use a rotorary encoder to keep track of the position?
341  Using Arduino / Project Guidance / Re: PWM and timer issue, clever solution? on: March 26, 2013, 07:31:05 am
No, but you can get a Mega which has more PWM pins on it to choose from.
342  Using Arduino / Programming Questions / Re: Arduino freezes if I un-Rem some prints on: March 26, 2013, 07:13:17 am
 //Analog operation to read Wiper delay     <== Should there be something else here?
 {
                                                      <== IF / Else statement? This is just an open bracket, with nothing before it.
  raw = analogRead(analogPin);    // Reads the Input PIN
  Vout = (5.0 / 1023.0) * raw;    // Calculates the Voltage on th Input PIN
  buffer = (Vin / Vout) - 1;
  R2 = R1 / buffer;
if (R2>3.7 && R2<4){


Added: Those line you commented out, how did you come to the conclusion it was those particular lines?
343  Using Arduino / Project Guidance / Re: Honours Project on: March 26, 2013, 05:34:43 am
No, that is more of Processing, it's another program that the arduino software was based off of. I personally don't use processing , so I don't know how to go about making a graph, but that is what you need to look into.
344  Using Arduino / Project Guidance / Re: power arduino using cell phone batteries on: March 25, 2013, 08:59:36 pm
If you want a battery to power your arduino, go with one of these. http://www.batteryspace.com/96vrccarbatterypackseries.aspx
345  Using Arduino / Project Guidance / Re: Honours Project on: March 25, 2013, 06:18:42 pm
Post your code as of now, I you made any changes.
Pages: 1 ... 21 22 [23] 24 25 ... 106