Pages: [1] 2   Go Down
Author Topic: Problema Upload  (Read 845 times)
0 Members and 1 Guest are viewing this topic.
italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Buona sera a tutti i presenti, da neofita di arduino ringrazio e pongo una questione.
Ieri ho avuto un problema con il mio Arduino Uno, ho provato a fare un Upload ed all'improvviso mi è comparso questo messaggio di errore:


avrdude: stk500_recv(): programmer is not responding

Qualcuno saprebbe spiegarmi che cosa è successo, e se esiste una eventuale soluzione ??
(Utilizzo Arduino con MAC )

Grazie mille per le eventuali risposte
Logged

Dueville (VI)
Offline Offline
Edison Member
*
Karma: 28
Posts: 1740
http://cesarecacitti.wordpress.com/
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

La soluzione e' il form Cerca sul forum. E' un argomento trattato diciannovemilacinquecentocinquantanovemilsessantatre volte.
Logged

Arduino UNO r3, Arduino MEGA 1280, adafruit motor shield, bluetooth module, enc28j60 shield.
Ultimi acquisti: un sacco di componenti elettronici, ATTEN AT 8586

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Immagino, ma magari qualcuno poteva essere cosi gentile da fornirmi una spiegazione meno tecnica, o magari in termini piu terra terra !!!
Logged

Marche
Offline Offline
Edison Member
*
Karma: 33
Posts: 2261
azioni semplici per risultati complessi
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Manca un punto e virgola alla riga trentordici
Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

...La simpatia REGNA !!!!...
Logged

Marche
Offline Offline
Edison Member
*
Karma: 33
Posts: 2261
azioni semplici per risultati complessi
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Finchè non dici che hai fatto, che sketch hai caricato è impossibile darti una risposta sensata
Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Non potevi farla suvito la domanda !?

Comunque, grazie per l'interessamento.
Ho ho creato un circuito ( credo si chiami cosi ), per comandare un motore passo passo bipolare, due pulsanti per L ed R, potenziometro per regolarne la velocità, ho utilizzato arduino uno e easydriver 4.4
Ieri ho caricato lo sketch tutto funzionava correttamente. Staccato il cavo usb ieri, oggiricollegaro senza fare alcun tipo di modifica e non andava piu nulla mi dava solo quell'errore
Logged

Marche
Offline Offline
Edison Member
*
Karma: 33
Posts: 2261
azioni semplici per risultati complessi
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Usi la seriale?
I pin digitali 0 e 1 sono collegati a qualcosa?
Puoi mettere schema elettrico e il codice?

Ora hai le domande smiley-wink
Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

pin 0 e 1 non sono collegati a nulla

Questo il codice:
in allegato anche i collegamenti


Code:
EasyDriver stepper test sketch
 


// constants won't change. They're used here to
// set pin numbers:
const byte stepUpPin = 4;     // the number of the step pin
const byte stepDownPin = 5;     // the number of the step pin
const byte stepOut = 2;
const byte directionOut = 3;
const byte ledPin =  12;      // pin # for direction indicator LED
const byte readyPin =  11;      //pin # for LED that comes on when all the steps have been completed
const byte inMotionPin = 10; // pin # for the LED that light up when the stepper is supposed to be still moving
const byte ratePin = 0; // A0 - analog 0 pin on Arduino to control the stepping dealy (i.e. RPMs)
const byte enablePin = 6; // turn EasyDriver off when not turning (saves power but ONLY use when there's no need to hold position)

// Variables will change:
byte ledState = LOW;         // the current state of the output pin
byte lastStepUpButtonState = HIGH;   // the previous reading from the step UP pin
byte lastStepDownButtonState = HIGH;   // the previous reading from the step DOWN pin
byte directionState=HIGH;             // the current direction
byte stepUpState=HIGH;             // the current state of UP button
byte stepDownState=HIGH;             // the current state of DOWN button
int stepsPassed = 10; //how many steps?
int stepsPassedMax = 50; // trying to calculate steps per revolution (remember the microstepping settings 1/8th is default)
// most small and micro steppers, especially those that came from a CD- or DVD-R/RW drives
// have 20 steps per revolution. So 160 mircosteps should make the motor spin 360 degrees once.

long lastStepUpDebounceTime = 0;  // the last time the output pin was toggled
long lastStepDownDebounceTime = 0;  // the last time the output pin was toggled
long debounceDelay = 10;    // the debounce time in ms; increase if the output flickers

long stepDelayBase = 1; // 1ms base rate. Multiply by the reading from the RATE potentiometer for actual step delay
long stepDelay; //
long lastStepTime = 0; // last time the step signal was sent

void setup() {
  pinMode(stepUpPin, INPUT);
  pinMode(stepDownPin, INPUT);
  pinMode(ratePin, INPUT);
  pinMode(stepOut, OUTPUT);  
  pinMode(directionOut, OUTPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(readyPin, OUTPUT);
  pinMode(inMotionPin, OUTPUT);
  pinMode(enablePin, OUTPUT);
  digitalWrite(readyPin, HIGH); // turn OFF all LEDs in the beginning
  digitalWrite(inMotionPin, HIGH);  // turn OFF all LEDs in the beginning
  digitalWrite(ledPin, HIGH); // turn OFF all LEDs in the beginning
}

void loop() {

  // read the state of the switch into a local variable:
  int readingStepUp = digitalRead(stepUpPin);
  int readingStepDown = digitalRead(stepDownPin);
  stepDelay = analogRead(ratePin) * stepDelayBase/50;
  if(stepDelay < 1) stepDelay = 1; // reality check - a pot can read 0 and then it would mean infinite RMP - not possible

  if(readingStepUp == LOW || readingStepDown == LOW) { // only read buttons if either one of them is LOW

      // If the switch changed, due to noise or pressing:
    if (readingStepUp != lastStepUpButtonState) {
      // reset the debouncing timer
      lastStepUpDebounceTime = millis();
      lastStepUpButtonState = readingStepUp;
    }

    if ((millis() - lastStepUpDebounceTime) > debounceDelay) {
      // whatever the reading is at, it's been there for longer
      // than the debounce delay, so take it as the actual current state:
      lastStepUpButtonState = readingStepUp;
      lastStepUpDebounceTime = millis();
      stepUpState = readingStepUp;
    }



    // If the switch changed, due to noise or pressing:
    if (readingStepDown != lastStepDownButtonState) {
      // reset the debouncing timer
      lastStepDownDebounceTime = millis();
      lastStepDownButtonState = readingStepDown;
    }

    if ((millis() - lastStepDownDebounceTime) > debounceDelay) {
      // whatever the reading is at, it's been there for longer
      // than the debounce delay, so take it as the actual current state:
      lastStepDownButtonState = readingStepDown;
      lastStepDownDebounceTime = millis();    
      stepDownState = readingStepDown;

    }


  }
  else{
    stepUpState = HIGH;
    stepDownState = HIGH;

  } // end of if block that reads button states

  if(stepsPassed == 0 ) { // if the previous command has completed, make the direction decision
    if(stepUpState == LOW || stepDownState == LOW) {
      if(stepUpState == LOW && stepDownState == LOW) {
        directionState = LOW;
      } // why are you holding both UP and DOWN buttons?
      if(stepUpState == LOW && stepDownState == HIGH) {
        directionState = HIGH;
      } // go up
      if(stepUpState == HIGH && stepDownState == LOW) {
        directionState = LOW;
      } // go down
      stepsPassed = stepsPassedMax+1;
    }
  }


  if(stepsPassed > 0 ) // send step signals now
  {
    digitalWrite(enablePin, LOW); // wake up
    digitalWrite(ledPin, directionState); // set proper direction
    digitalWrite(directionOut, directionState);
    if((millis() - lastStepTime) > stepDelay) // delay expired, send another step
    {
      digitalWrite(stepOut, HIGH);
      stepsPassed--;
      lastStepTime = millis();
    }
    else
    {
      // time for one step not yet expired, hold the STEP signal low
      digitalWrite(stepOut, LOW);
    }
  }
  else{
    digitalWrite(enablePin, HIGH); // go to sleep

  }

  if(stepsPassed == 0) {
    digitalWrite(readyPin, LOW);
    digitalWrite(inMotionPin, HIGH);

  }
  else{
    digitalWrite(readyPin, HIGH);
    digitalWrite(inMotionPin, LOW);
  }

}


* foto.JPG (2312.97 KB, 2592x1936 - viewed 23 times.)
« Last Edit: September 02, 2013, 11:23:20 pm by leo72 » Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

dimenticavo, queste in allegato sono le uniche porte che mi da


* Schermata 09-2456538 alle 23.45.44.png (22.89 KB, 505x108 - viewed 16 times.)
Logged

Tuscany
Offline Offline
Edison Member
*
Karma: 65
Posts: 1939
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 hai alimentato i motori con i 5V di Arduino ?
Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mmmmmm direi di si !!!  smiley-eek smiley-sad

Ho sbagliato ?
Logged

Tuscany
Offline Offline
Edison Member
*
Karma: 65
Posts: 1939
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

beh, bene non gli fa'...

1) si accende qualcosa collegando la scheda al PC ?
2) Hai provato a collegare un alimentatore esterno ?
3) Hai provato a cambiare la porta USB ?
Logged

italy
Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Mmm ok, allora quando collego l' usb si accende il led verde ON su arduino e quello rosso su easydriver, provato alimentatore esterno, ma non cambia nulla, cambiato usb nulla anche li.

Il motore è un nema 47 se non ricordo male
Logged

Global Moderator
Italy
Offline Offline
Brattain Member
*****
Karma: 325
Posts: 22498
Logic is my way
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@qpixvideo
esite un regolamento sull'uso di questo forum.
Ti chiedo di leggerlo e rispettarlo, grazie.
Logged


Pages: [1] 2   Go Up
Jump to: