Error Estimated pre-scale: 2.81

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
winnie15
 
Posts: 2
Joined: Thu Jul 10, 2014 2:00 pm

Error Estimated pre-scale: 2.81

Post by winnie15 »

Hello I have tried to make a stack with 2 step motor shield and arduino supply, but in serial monitor the next error is send ever:

Estimated pre-scale: 2.81
Final pre-scale: 3
Attachments
coTeste.png
coTeste.png (11.06 KiB) Viewed 260 times

User avatar
Franklin97355
 
Posts: 23938
Joined: Mon Apr 21, 2008 2:33 pm

Re: Error Estimated pre-scale: 2.81

Post by Franklin97355 »

Could you post your code and a description or drawing of your connections between it all?
Please use the code button as shown below.
Code Button.jpg
Code Button.jpg (4.49 KiB) Viewed 251 times

winnie15
 
Posts: 2
Joined: Thu Jul 10, 2014 2:00 pm

Re: Error Estimated pre-scale: 2.81

Post by winnie15 »

Ty for reply... here is the code!

Code: Select all

#include <Wire.h>
#include <Adafruit_MotorShield.h>
#include "Adafruit_MAX31855.h"

//Objetos de referencia as placas 
Adafruit_MotorShield AFMSbot(0x61); // placa com solda (Jumper)
Adafruit_MotorShield AFMStop(0x60); // placa sem solda

//==================================
// Conectando motores com 200 BANNED.
Adafruit_StepperMotor *motor1_top = AFMStop.getStepper(200, 1);
Adafruit_StepperMotor *motor2_top = AFMStop.getStepper(200, 2);

Adafruit_StepperMotor *motor1_bot = AFMSbot.getStepper(200, 1);
Adafruit_StepperMotor *motor2_bot = AFMSbot.getStepper(200, 2);
//==================================
//Configurando placa amplificadora do sensor
int thermoDO = 2;
int thermoCS = 9;
int thermoCLK = 13;

Adafruit_MAX31855 sensor(thermoCLK, thermoCS, thermoDO);
//==================================

void setup()
{
  Serial.begin(9600);
  AFMSbot.begin(); // Start the bottom shield
  AFMStop.begin(); // Start the top shield
  
  motor1_top->setSpeed(10);  // 10 rpm   
  motor2_top->setSpeed(10); 
  
  motor1_bot->setSpeed(10);  // 10 rpm   
  motor2_bot->setSpeed(10); 
}

void loop() 
{
  
   if (Serial.available() > 0)
   {
     int nVar = 0;
     String parte1 = "",parte2 = ""; 
     
     delay(300);
     int inputSize = Serial.available();
     char msg[inputSize];
     for (int i = 0; i < inputSize; i++)
     {
       msg[i] = Serial.read();
     }

     //msg[inputSize - 1] = ' ';

     char *p = msg;
     char *str;
     while ((str = strtok_r(p, ";", &p)) != NULL) // delimiter is the semicolon
     {
       if(nVar == 0)
       {
         parte1 = str;
         nVar++;
       }
       else
       {
         parte2 = str;
         nVar--;
       }
     }  
     //if (strcmp(msg, "check") == 0){}
     
     //Argumentos: num BANNED; avancar/voltar; tipo do BANNED
     for(int i = 0; i < parte1.toInt() ; i++)
     {
       motor1_bot->step(1, FORWARD, DOUBLE); 
       motor2_bot->step(1, FORWARD, DOUBLE);
     }
     
     for(int i = 0; i < parte2.toInt() ; i++)
     {
       motor1_top->step(1, FORWARD, DOUBLE); 
       motor2_top->step(1, FORWARD, DOUBLE);
     }    
   } 
   else //Caso nao haja coordenadas, envia dados do sensor
   {
      double c = sensor.readCelsius();
      Serial.println(c);
   }
}

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”