Show Posts
Pages: 1 ... 70 71 [72] 73 74 ... 229
1066  Using Arduino / Programming Questions / Re: love o meter starting project on: January 08, 2014, 07:48:05 am
@PaulS
Ale_ale15 was already given working solutions by me and one other person. My guess is he tried them and it still does not work, which means it's not the code, but more likely the wiring itself. Possibly the LEDs are not grounded or are wired backwards.
1067  Using Arduino / Project Guidance / Re: motor movement sensing on: January 08, 2014, 04:48:00 am
Quote
how will i attach the rotary encoder.to the conveyor belt..
with a wheel or knob pressed against the belt.
1068  Using Arduino / LEDs and Multiplexing / Re: HELP for creating 8x8x4 LED MATRIX non-scrolling text on: January 08, 2014, 02:56:10 am
What chips are you using to drive the LEDs, and have you taken a look at all the LED matrix libraries in the Arduino Playground?
1069  Using Arduino / LEDs and Multiplexing / Re: LCD printing weird characters in loop function on: January 08, 2014, 02:52:52 am
Your libraries are most likely using the same pins. Are they loose boards connected by wires, or stacked on top of each other?
1070  Using Arduino / Programming Questions / Re: Help on LCD display backwards scrolling text on: January 08, 2014, 02:37:27 am
@UKHeliBob: You beat me to it.

You do know you have functions like  rightToLeft(); and leftToRight(); which moves whatever you print either left or right, not to mention being able to scroll your (S/s)trings with scrollDisplayLeft(); and scrollDisplayRight();

Here is a link you your LCD library, with all your possible functions. HERE

Unless of course, you are fully aware of these functions and don't want the (S/s)trings to bleed onto the next row, you just want them to disappear when they get to the edge of the lcd screen.
1071  Using Arduino / Project Guidance / Re: motor movement sensing on: January 08, 2014, 02:21:16 am
An encoder measures pulses, and depending on the pulses, the value calculated is either positive or negative. There are many example in the arduino playground, check them out.
1072  Using Arduino / Project Guidance / Re: combined lanc+PS/2 controller possible? on: January 08, 2014, 01:59:17 am
It should be as simple as combining the setup functions, loop functions and just drop-in everything else. Make sure they use different pins, or have it so that the same pins are called to do the same thing I.E open/close shutter, take photo, things like that.
1073  Using Arduino / Programming Questions / Re: multidimensional boolean array ?? on: January 08, 2014, 01:08:20 am
Not sure you fully understand arrays or maybe you just made "small" have different data on purpose, but you can use a FOR loop(s).

If you know how many elements you have per group (in this case you have 3) you can use the module operator (%) to change the group when you get to the last element of the group. But still, you should either have two different arrays, maybe  small and Small.
1074  Using Arduino / Project Guidance / Re: Learning about Arduino & Electronics on: January 08, 2014, 12:24:01 am
If you want to learn electronics and how everything works together, go by a small toy (anything) and take it apart. You know what most componets are, and I'm sure you know how to read a schematic, right? If you do, then you should study the toy's circuit board, write down a schematic of what you see (part numbers, resistor bands, everything). Once you are comfortable with your schematic, take apart the circuit board part by part, and try to put it back together without the actual circuit board. The only way to learn how something works is by taking it apart.

If you lack soldering skills, then you can simply buy a radio shack learners kit (if you haven't already) and make everything in the circuit books. Once you get something to work, try swapping parts and see what happens when you do.
1075  Using Arduino / Project Guidance / Re: touch screen buttons on: January 07, 2014, 09:16:32 pm
The Utouch library has a way to let you see your raw touch data. GetY and GetX. These will let you see if your screen is calibrated or not. There should also be a calibration sketch, if not, then it should be on henning's website.
1076  Using Arduino / Programming Questions / Re: love o meter starting project on: January 07, 2014, 08:57:21 pm
Link
1077  Using Arduino / Project Guidance / Re: Arduino + Bluetooth + Android + Motors on: January 07, 2014, 04:08:20 pm
No, this method should be fine. Are you having issues with the Android side or the Arduino side?

Added:
 I do see that your using Strings and upon testing your code, I noticed your not clearing "received" once it has been used. By you not clearing the String, it continues to concatenate the incoming chars to the String, and this could pose serious memory issues.

I suggest you use C strings (char Array) and the strtok() function.

More:
Here is my test results:
Code:
#include <SoftwareSerial.h>

SoftwareSerial bluetooth(7, 8); // RX, TX

int direcao[] = {
  9, 10};
int motor[] = {
  5, 6};
int ledPin =  13;

int veloc = 0;
String received = "";
char chrreceived;

//Funcao que faz parar
void para(){
  digitalWrite(ledPin, LOW);

  digitalWrite(motor[0], LOW);
  digitalWrite(motor[1], LOW);

  digitalWrite(direcao[0], LOW);
  digitalWrite(direcao[1], LOW);
  delay(25);
}

//Funcao que faz andar para frente
void marchafrente(int velocidade = 255){
  analogWrite(motor[0], velocidade);
  digitalWrite(motor[1], LOW);
}

//Funcao que faz andar para tras
void marchare(int velocidade = 255){
  digitalWrite(motor[0], LOW); 
  analogWrite(motor[0], velocidade); 
}

//Funcao que faz mover para a esquerda
void moveesquerda(int velocidade = 255){
  digitalWrite(direcao[0], LOW);
  analogWrite(direcao[1], velocidade);

  delay(100); 
  digitalWrite(direcao[0], LOW);
  digitalWrite(direcao[1], LOW);   
}

//Funcao que faz mover para a direita
void movedireita(int velocidade = 255){
  analogWrite(direcao[1], velocidade);
  digitalWrite(direcao[1], LOW);

  delay(100); 
  digitalWrite(direcao[0], LOW);
  digitalWrite(direcao[1], LOW); 
}

void setup() {
  //Configurando dados seriais
  Serial.begin(9600);
  bluetooth.begin(9600);

  //Configurando pino do led
  pinMode(ledPin, OUTPUT); 
}

void loop() {
  if (Serial.available() >  0) { //bluetooth
    while(Serial.available() > 0) {//bluetooth
      chrreceived = Serial.read(); //bluetooth
      received.concat(chrreceived);
      //Serial.println(received);   
    }

    if (received.substring(0,2) == "VE") {
      veloc = received.substring(2).toInt();
      Serial.print("Left: ");
      Serial.println(veloc);   

      moveesquerda(veloc);
    }
    else if (received.substring(0,2) == "VD")
    {
      Serial.println();
      veloc = received.substring(2).toInt();
      Serial.print("Right: ");
      Serial.println(veloc);   

      movedireita(veloc);
    }
    else {   
      Serial.print("Key: ");
      Serial.println(chrreceived);
      switch(chrreceived){
        //FRENTE       
      case '8':
      case 'w':
      case 'W':;
        marchafrente();
        break;

        //TRÁS       
      case '2':
      case 's':
      case 'S':
        marchare();
        break;

        //ESQUERDA
      case '4':
      case 'a':
      case 'A':
        moveesquerda();
        break;

        //DIREITA       
      case '6':
      case 'd':
      case 'D':
        movedireita();
        break;

        //PARADO
      case '5':
      case 'p':
      case 'P':
        para();
        break;

        //LIGA LED
      case 'L':
      case 'l':
      case '7':
        digitalWrite(ledPin, HIGH);
        break;

        //DESLIGA LED
      case 'K':
      case 'k':
      case '9':
        digitalWrite(ledPin, LOW);
        break;
      }
    }
  }
  received = "";   
  delay(100); 
}

Output:
Quote
Key: 8

Right: 111
Left: 444
Key: w
Key: W
Key: L
Key: 1

Right: 12
Left: 153
1078  Using Arduino / Project Guidance / Re: Robot arm "control board"... any thoughts? on: January 07, 2014, 03:51:18 am
You can implement the BT module any way you need to. But you also need to think about what you will be using to talk to the BT module, whether it's a computer or mobile device. You can come up with a bunch of commands to look for, or simply relay values.

Keep in mind iPhones and iPad are very picky when it comes to bluetooth modules, so not many of the cheaper modules work.
1079  Using Arduino / Project Guidance / Re: Robot arm "control board"... any thoughts? on: January 07, 2014, 03:00:24 am
His power supply put out 6, 9 and 12 volts at the same time, but it was an old unit and right now I'm having a difficult time finding it.

If you think the Dues 3v3 system will give you problems then your probably better off with a regular Mega Rev3, just to be safe. No point in spending money, only to find out it doesn't work.

This here is the closest I could find to his power supply. LINK
1080  Using Arduino / Project Guidance / Re: Robot arm "control board"... any thoughts? on: January 07, 2014, 02:31:29 am
I would personally go with the Due, it's faster and like the Mega, it has a lot of pins.  Another good reason is of course multiple serial ports, so you don't need to use software serial and risk any of your libraries using a timer that is already being used for the servos.

Interfaces:
It really depends on what you/she plans on doing with it. You could get a TFT with a touch screen to make it look high tech, or use say an android table or IPad via wifi or bluetooth. This would also double as a keypad and other various buttons, if needed. I would include the bluetooth anyways just so you can debug without needing to be connected to a computer.

Power:
There are some really good power units that are also quite compact and provide a good range of voltages. My friend had one, I'll see if I can get the name if it. If anything, you can make your own with a 12V power pack and use regulators to get the required voltages. This is not exactly what he had, but it is very similar 12 volt power supply

Accessibility:
You may want to make a breakout board, one with various connectors like Dupont pins (male and female) and some screw sockets.
Pages: 1 ... 70 71 [72] 73 74 ... 229