Show Posts
Pages: 1 ... 71 72 [73] 74 75 ... 232
1081  Using Arduino / Project Guidance / Re: Distributing current evenly between two parallel programmes on: January 10, 2014, 06:22:12 pm
The LEDs draw whatever current they need, you don't really have any control over that. Why do you think you need to balance the current?
1082  Using Arduino / Project Guidance / Re: Hey, need some help on where to start programming! (Balancing Bot) on: January 10, 2014, 06:20:03 pm
If the gyro is on a flat surface, I would imagine the numbers should not be fluctuating.
1083  Using Arduino / Programming Questions / Re: ping sensor works but all LEDs are lit up? on: January 10, 2014, 04:31:51 pm
Quote
long duration, inches;  Take these out of your code, throw them away, then burn the garbage.
ping.inches() == (duration/2) / 29.1;

  if (ping.inches() <= 27) { // sample IF statement, do this for the rest of them.

1084  Using Arduino / Project Guidance / Re: Controlling the Arduino with an Android over Bluetooth? on: January 10, 2014, 01:44:51 am
Quote
So, an example, I press 'a' on the keyboard of my Android and the Arduino detects the button I pressed and displays it on the Serial Monitor. I did this by using example provided in the USB Host Library called "SPP".
Ok, so you can get data from the Android with Serial.write(SerialBT.read()); and see it on the serial monitor. So in the example I gave you, change Serial.read() to SerialBT.read() and see if that helps.

Also from my example, only copy what you need. You don't need the whole thing, just the IF statements.
1085  Using Arduino / Programming Questions / Re: Wierd Single LED SOS on: January 10, 2014, 01:11:48 am
Use the on-board LED on pin 13, and see if that changes anything. Simply change the 10 (ledPin) to 13 in your code.
1086  Using Arduino / Project Guidance / Re: Controlling the Arduino with an Android over Bluetooth? on: January 10, 2014, 01:08:36 am
This here is a basic code that uses a Serial connection to compare the incoming char to a specific char to change the state of the LED. It should be quite the same with your particular library.

Code:
char val; // variable to receive data from the serial port
int ledpin = 13; // LED connected to pin 13 (on-board LED)


void setup() {
  pinMode(ledpin, OUTPUT);  // pin 13 (on-board LED) as OUTPUT
  Serial.begin(9600);       // start serial communication at 9600bps
  delay(10);               // 10 millisecond delay between starting the serial communication and sending out a message
  Serial.println("get data");    // read it and store it in 'val'
}

void loop() {

  if( Serial.available() > 0)       // if data is available to read
  {
    val = Serial.read();
    Serial.println(val);
    if( val == 'H' || val == 'h' )               // if 'H' was received
    {
      digitalWrite(ledpin, HIGH);  // turn ON the LED
    }
    if( val == 'L' || val == 'l' )
    {
      digitalWrite(ledpin, LOW);   // otherwise turn it OFF
    }
  }
}
1087  Using Arduino / Programming Questions / Re: Wierd Single LED SOS on: January 10, 2014, 12:59:33 am
So it works now or still no?
1088  Using Arduino / Programming Questions / Re: Wierd Single LED SOS on: January 10, 2014, 12:50:05 am
Is the LED grounded?
1089  Using Arduino / Project Guidance / Re: Controlling the Arduino with an Android over Bluetooth? on: January 10, 2014, 12:48:09 am
Well, you can check the incoming char and compare it to the character 'A' or 'a' and if they match, LED ON, if not then LED OFF.
1090  Using Arduino / Programming Questions / Re: ping sensor works but all LEDs are lit up? on: January 10, 2014, 12:43:27 am
The ping sensor is most likely putting out the correct data, but your IF statements are not look at that data, its looking at random data you made up.

This code here is the example code from that library. Notice anything different that it doesn't have?
Code:
/*  This code initializes a Ping))) sensor on pin 13 and
outputs the information over a serial connection */
#include <Ping.h>

Ping ping = Ping(13,0,0);

void setup(){
  Serial.begin(115200);
}

void loop(){
  ping.fire();
  Serial.print("Microseconds: ");
  Serial.print(ping.microseconds());
  Serial.print(" | Inches ");
  Serial.print(ping.inches());
  Serial.print(" | Centimeters: ");
  Serial.print(ping.centimeters());
  Serial.println();
  delay(1000);
}

Did you figure it out? If you didn't, its this part here.
Quote
long duration, distance;
  distance = (duration/2) / 29.1;
Why did you include this in your code, when it clearly does not have anything to do with the calculated data from the library. You should be using ping.inches() or ping.centimeters() instead of distance which is a random number.
1091  Using Arduino / Project Guidance / Re: How to avoid arduino from starting over each time I unplug it. on: January 10, 2014, 12:26:58 am
Why not use an SD card as a data logger? This way its not using the Arduino eeprom, but instead it uses the SD card?
1092  Using Arduino / Project Guidance / Re: motor movement sensing on: January 10, 2014, 12:14:09 am
Ok, what about this. Find out if the motor driving the belt is DC and not AC or 3 Phase. Because what you may be able to do is use Diodes connected to the motor wires to determine direction.

Say the belt is moving forward, the diode that is connected to the HIGH line will be outputting a voltage (with respect to ground), and assuming the LOW line is about ~0 Volts or ground, the other diode should be LOW; Reverse direction, the diodes reverse too.
1093  Using Arduino / Project Guidance / Re: Help me pick some parts for DIY Graphing Calculator on: January 09, 2014, 07:57:40 pm
You may want to get this instead. 128x64 LCD Graphic Display with Serial & I2C Controller kit, this only uses 2 pins, A4 and A5. As for your keypad, you simply need to download the Keypad library. 50 buttons = 15 pins. OR, you can use just one pin, but you will need about 50 resistors. And yes there is a different library made for that particular keypad. Note: the playground was changed and I am unable to find the library. Found it. HERE

Board wise, a Nano, Mini or Micro, should be prefect for your needs.
1094  Using Arduino / Project Guidance / Re: Board for final Project. on: January 09, 2014, 07:49:14 pm
What size lcd do you want? The links below are TFT LCDs only, Arduino board not included.

3.2" tft LCD for UNO/Mega

2.6" LCD for UNO/Mega

2.4" LCD for UNO/Mega
1095  Using Arduino / Project Guidance / Re: Hey, need some help on where to start programming! (Balancing Bot) on: January 09, 2014, 06:52:47 pm
What do you get for the raw gyro values, do they fluctuate too?
Pages: 1 ... 71 72 [73] 74 75 ... 232