Show Posts
Pages: 1 ... 80 81 [82] 83 84 ... 196
1216  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 09:09:03 am
Pretty much. Thank holmes4 for pointing that out.
1217  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 09:01:14 am
You have an UNO R3 so you only have 14 digital pins and 6 analog pins, so why are your servo set for pins 21 and 22?
1218  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 08:49:45 am
You didn't mention you were using a motor shield, that's why I ask how everything was powered.

Also what is "a simple command engine management"
1219  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 08:27:54 am
Quote
I use the battery is 9V. It is powered by two motors and bt module. Maybe I need more power?


9 Volt batteries are horrible for an Arduino project. Also please tell me you are not putting 9V directly into the BT module and servos, the Arduino is fine, it can handle 9V, but not the BT and servos.
1220  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 08:07:10 am
First: For right now, get rid of everything, but if (mySerial.available())
    Serial.write(mySerial.read());
and see what do you get from the phone. You wont be able to do anything correctly, if you don't know what your getting.

Second:
Quote
if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
  if(mySerial.available()>1)
  {
This does NOT connect the BT module to the phone. This just checks to see if there is any data available to be read.
===================================================================================================

Quote
I fix some problem, BT connect to the smartphone. When i press "forward" i have receive data:
qualifier = 68
dataByte = 1
But robot dont go forward.

Ok great, now you have something to show. So now my question is how are the servos powered?
1221  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 07:51:35 am
Quote
if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
  if(mySerial.available()>1)
  {

All you need is this,
Code:
if (Serial.available()) // from USB
    mySerial.write(Serial.read());
  if(mySerial.available()>1) // from Bluetooth
  {
1222  Using Arduino / Programming Questions / Re: Size of array on: June 13, 2013, 07:48:48 am
"up + 1" will give you what you are looking for without any other functions needed.
1223  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 07:47:23 am
Quote
But not responding to commands
I understand that, that's why I asked what are you sending from the android and what are you receiving? I'm assuming you have an android phone, am I correct, or is it an IPhone?
1224  Using Arduino / Project Guidance / Re: Keypad not working on standalone Arduino on: June 13, 2013, 07:27:48 am
Quote
When I built a standalone version of the same on a PCB, its not working any more.

What did you build, a keypad or an Arduino mega?
1225  Using Arduino / Programming Questions / Re: Need very fast help!!!!! on: June 13, 2013, 07:15:26 am
No need to declair mySerial.begin twice. Same in your loop function.
Quote
mySerial.begin(9600);
  Serial.begin(9600);
  mySerial.begin(9600);   

.
.
.
if (mySerial.available())
...
if(mySerial.available()>1)

And this can be made into a case statement.
Quote
if (dataByte == 1)
      {
        forward();
      }
      if (dataByte == 2)
      {
        left();
      }
      if (dataByte == 3)
      {
        right();
      }
      if (dataByte == 4)
      {
        backward();
      }
      if (dataByte == 5)
      {
        stop();
      }

Other than that, what are you sending from the android and what are you receiving?
1226  Using Arduino / Project Guidance / Re: Mega 2560 and bluetooth on: June 13, 2013, 07:07:07 am
Your Bluetooth module might not work with the Arduino serial monitor, because I have the same module (4 of them) and I know they don't. However there was one guy who says his module did work, and it looked just like mine but I doubt it was from the same company, so its up in the air.

If you pair it and it does work, Great, if it doesn't work, then try Putty.
1227  Using Arduino / Project Guidance / Re: Two arduinos + bluetooth question on: June 13, 2013, 07:00:56 am
Bluetooth is serial, so a regular serial setup and connection should work. I would know, I do it all the time with my robot and controller (Uno and Mega).

If you can read and print data to/from the serial monitor with one, you can get the two Arduino to talk to each other. The only thing that may be an issue is range. Bluetooth can only go ~30 ft, depending on your surroundings.

Start with simply reading data to and from the serial monitor, get that to work, then substitute the computer with a second Arduino with the same code.
1228  Using Arduino / Project Guidance / Re: Controlling servo motor with arduino on: June 12, 2013, 11:34:06 am
Not sure if your aware of the Servo library or not but, under your Arduino examples, there is one for servos. Give it a try. Make sure you are using an external power supply for the servos, and the grounds (Arduino GND and extrn supply GND) are tied together.
1229  Using Arduino / Programming Questions / Re: Push button doesn't response well. on: June 12, 2013, 11:30:21 am
I'm happy you put your code in code tags, but could you also format it too?

Anyway, it sounds to me like a debounce issue, but I can't be sure because the code is difficult to read.
1230  Using Arduino / Project Guidance / Re: coding troubleshoot! on: June 12, 2013, 08:14:39 am
I know its not valid, I was asking nattyD96 if (s)he thinks its valid.
Pages: 1 ... 80 81 [82] 83 84 ... 196