Show Posts
Pages: [1] 2 3 ... 91
1  Products / Arduino Due / Re: Native port driver BSoD on: April 08, 2014, 05:18:27 am
It is recognized again doing this procedure:

1- Press the erase button for 2-3 sec
2-Press the reset button for 8 seconds

I don´t know why, but now It works.

I hope this will help someone,
Fabrizio.
2  Products / Arduino Due / Re: Native port driver BSoD on: April 08, 2014, 05:09:29 am
So guys, my Arduino DUE at some point is not recognized anymore if connected through Native Port. I am working with Windows 7 64bit.

I have another Arduino DUE and if I connect it through the native port it works.

What should I do?

Thanks for the help,
Fabrizio.
3  Using Arduino / Installation & Troubleshooting / Re: Native port not recognized in windows 8.1 pro on: April 08, 2014, 04:30:29 am
I have also this problem. Can someone help us?

Thanks.
4  International / Hardware / Re: Self Balancing Robot on: February 12, 2014, 05:11:41 am
Prova a iscriverti al sito e vedrai che é possibile effettuare il download della cartella completa.

5  International / Hardware / Re: Self Balancing Robot on: January 14, 2014, 04:17:35 am
@Fabrizio: Grazie molte smiley-kitty

Non c´é di che. In bocca al lupo per il progetto.
6  International / Hardware / Re: consigli servo motori on: January 13, 2014, 09:08:23 am
Proprio oggi mi ci sono messo a rilavorare e ti voglio dire una cosa (che probabilmente non ti servirá ma che ti puó aiutare in futuro).

Se sei interessato al controllo di velocitá e non piú a quello di posizione puoi modificare il servo in modo da avere una rotazione continua e non limitata a 180° smiley.

Ciao,
Fab.
7  International / Hardware / Re: Self Balancing Robot on: January 13, 2014, 09:05:50 am
Ti allego un link del nostro progettino super low cost. Ma sappi che era un progetto universitario , quindi serviva a provare la "bontá " di alcuni algoritmi di controllo e non usare quindi un SEMPLICE PID.

Robot FMA smiley
http://schianorobotics.altervista.org/

Fammi sapere,

Fab.
8  Using Arduino / Sensors / Re: Incremental Encoder Sendix 5000/5020 on: January 09, 2014, 06:14:48 am
not yet. Thanks for the hint.

I was on that page but I didn´t finish to read smiley
9  Using Arduino / Sensors / Re: Incremental Encoder Sendix 5000/5020 on: January 08, 2014, 10:03:33 am
I solved my problem.

Upload the following code to the Arduino (I have a DUE).

With the following connections:
-------------------------------------------
ENCODER -> ARDUINO
-------------------------------------------
Signal A    -> digital pin 3 Arduino
Signal B    -> digital pin 4 Arduino
Signal 0    -> digital pin 5 Arduino
Signal 0V -> GND Arduino
Signal +V -> 5V Arduino
-------------------------------------------

To read the value of the encoder you should type an E and press ENTER in the serial monitor. This because otherwise, if the the movement is too fast, it is not possible to print the value every time.

Moreover in the following code is also inserted the zeroIndex signal and so after one entire round (360°) the counting goes to 0.

If you want to see the degrees instead of the pulses . You just have to modify the following line:
Serial.println(encoder0Pos);
in
Serial.println(encoder0Pos*360/n);

where n is the number of pulses of the encoder per revolution (you find this value, for sure, on the datasheet).

Code:
#define encoder0PinA 3

#define encoder0PinB 4

#define encoderZeroIndex 5

volatile int encoder0Pos = 0;

void setup() {

  pinMode(encoder0PinA, INPUT);
  pinMode(encoder0PinB, INPUT);
  pinMode(encoderZeroIndex, INPUT);   


  attachInterrupt(3, doEncoderA, RISING);
  attachInterrupt(5, doEncoderZero, RISING);

  Serial.begin (9600);
}

void loop(){
 if(Serial.available()){
 if(Serial.read()=='E'){
 Serial.println(encoder0Pos);
 }
 }
 
  }

void doEncoderA(){

  // look for a low-to-high on channel A
  //if (digitalRead(encoder0PinA) == HIGH) {
    // check channel B to see which way encoder is turning
    if (digitalRead(encoder0PinB) == LOW) { 
      encoder0Pos = encoder0Pos + 1;         // CW
    }
    else {
      encoder0Pos = encoder0Pos - 1;         // CCW
    }
  //}

}


void doEncoderZero(){
encoder0Pos=0;
}

I hope this will help someone,
let me know if there is some error or if something is not clear.

Fab.
10  Development / Other Software Development / Re: Sublime Text and Stino: Best IDE you can have. on: January 08, 2014, 07:04:08 am
I have some problems with Sublime text. For example some code that is compiling in the Arduino IDE it is not working in the Sublime Text.

For example I have the following errors:
Code:
C:\Users\***********\Controller_v3_2.ino.cpp:509: error: 'SPI_CONTINUE' was not declared in this scope
C:\Users\***********\Controller_v3_2\Controller_v3_2.ino.cpp:510: error: 'SPI_LAST' was not declared in this scope

I have no idea how to solve this problem. Could you help me?
11  Using Arduino / Sensors / Re: Incremental Encoder Sendix 5000/5020 on: January 08, 2014, 04:03:36 am
I solved partially my problem. Now I have the following code:

Code:
/*ENCODER*/

int encoder0Pos=0;
int encoderA=3;
int encoderB=4;
int encoderPinALast=LOW;
int n= LOW;


void setup() {
  // put your setup code here, to run once:
pinMode(encoderA,INPUT);
pinMode(encoderB,INPUT);
Serial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
  n= digitalRead(encoderA);
  if((encoderPinALast==LOW)&&(n==HIGH)){
  if(digitalRead(encoderB)==LOW){
  encoder0Pos--;
          }
          else{
          encoder0Pos++;
          }
  Serial.println(encoder0Pos);
//Serial.print("/");     
  }
encoderPinALast=n;
}

The output is always starting from 0 and it increases (if I turn the encoder counterclockwise) or decreases (if I turn the encoder clockwise).

The wiring is the following:

-------------------------------------------
ENCODER -> ARDUINO
-------------------------------------------
Signal A    -> digital pin 3 Arduino
Signal B    -> digital pin 4 Arduino
Signal 0V -> GND Arduino
Signal +V -> 5V Arduino
-------------------------------------------
Now my problem is the following, how can I use the signal 0 of the encoder as reference signal to understand the movement from the home position?

Thanks in advance,
Fabrizio.
12  Using Arduino / Sensors / Incremental Encoder Sendix 5000/5020 on: January 08, 2014, 03:27:28 am
Hi to everyone,

I need to read data from the following encoder:
http://www.kuebler.com/usa/prod-sen-inkremental-5000.html

It has the connections listed in the attachment.

I would like to know if someone of you could give me some hints or links on how to connect this sensor to arduino.

I can connect the pin 1 to GND of the Arduino, the pin 2 to 5V but then I don´t know what to do with A, B, 0 and A_ , B_, 0_

Thanks for your help,
Fabrizio.
13  International / Software / Re: Tab Multiple on: December 06, 2013, 04:46:00 am
Questo sarebbe davvero molto utile smiley

Lo allego perché é molto lungo e non mi permette di incollarlo e dovrei fare piú post, spero vada bene smiley

Qualunque aiuto é davvero ben accetto smiley

Grazie davvero
14  International / Software / Re: Tab Multiple on: December 06, 2013, 04:32:07 am
Penso che per ora lascio l´inizializzazione nel main file cioé prima delle funzioni setup e loop .

In questo modo non ho bisogno del file header.

Forse piú in la creeró una libreria.
15  International / Software / Re: Tab Multiple on: December 04, 2013, 04:53:11 am
non so quanto aiuti.

Ma ripeto il mio problema.

Ho tante funzioni che posso raggruppare in tante tabs perché ho le funzioni legate al DAC , le funzioni legate alla SD card etc.

Il problema ora é dove mettere l´inizializzazione delle variabili. All´inizio avevo pensato a un file .h perché viene compilato all´inizio (almeno credo).

Astro mi ha detto che non é il modo pulito di farlo e quindi ho cercato di virare verso la creazione di una libreria, ma probabilmente questa non é l´idea migliore. Quindi forse la soluzione é semplicemente aggiungere l´inizializzazione delle variabili in testa al file Controller_v3_2 dove c´é la funzione setup() e loop().

Cosa ne pensate?
Pages: [1] 2 3 ... 91