Skocz do zawartości

Nie mogę znaleźć biblioteki dla Arduino Leonardo


Pomocna odpowiedź

Napisano

Chcę znaleźć bibliotekę SparkFun_TB6612FNG do sterowania podwoziem robota   ale jej nie ma 😞    

kod do arduino :

#include <SparkFun_TB6612FNG.h>

// Pins for all inputs, keep in mind the PWM defines must be on PWM pins
// the default pins listed are the ones used on the Redbot (ROB-12097) with
// the exception of STBY which the Redbot controls with a physical switch
#define AIN1 2
#define BIN1 7
#define AIN2 4
#define BIN2 8
#define PWMA 5
#define PWMB 6
#define STBY 9

// these constants are used to allow you to make your motor configuration 
// line up with function names like forward.  Value can be 1 or -1
const int offsetA = 1;
const int offsetB = 1;

// Initializing motors.  The library will allow you to initialize as many
// motors as you have memory for.  If you are using functions like forward
// that take 2 motors as arguements you can either write new functions or
// call the function more than once.
Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY);
Motor motor2 = Motor(BIN1, BIN2, PWMB, offsetB, STBY);

void setup()
{
 //Nothing here
}


void loop()
{
   //Use of the drive function which takes as arguements the speed
   //and optional duration.  A negative speed will cause it to go
   //backwards.  Speed can be from -255 to 255.  Also use of the 
   //brake function which takes no arguements.
   motor1.drive(255,1000);
   motor1.drive(-255,1000);
   motor1.brake();
   delay(1000);
   
   //Use of the drive function which takes as arguements the speed
   //and optional duration.  A negative speed will cause it to go
   //backwards.  Speed can be from -255 to 255.  Also use of the 
   //brake function which takes no arguements.
   motor2.drive(255,1000);
   motor2.drive(-255,1000);
   motor2.brake();
   delay(1000);
   
   //Use of the forward function, which takes as arguements two motors
   //and optionally a speed.  If a negative number is used for speed
   //it will go backwards
   forward(motor1, motor2, 150);
   delay(1000);
   
   //Use of the back function, which takes as arguments two motors 
   //and optionally a speed.  Either a positive number or a negative
   //number for speed will cause it to go backwards
   back(motor1, motor2, -150);
   delay(1000);
   
   //Use of the brake function which takes as arguments two motors.
   //Note that functions do not stop motors on their own.
   brake(motor1, motor2);
   delay(1000);
   
   //Use of the left and right functions which take as arguements two
   //motors and a speed.  This function turns both motors to move in 
   //the appropriate direction.  For turning a single motor use drive.
   left(motor1, motor2, 100);
   delay(1000);
   right(motor1, motor2, 100);
   delay(1000);
   
   //Use of brake again.
   brake(motor1, motor2);
   delay(1000);
   
}

Bardzo proszę o pomoc😞 

@florek2904 ujmę to tak, najlepiej uważając na PPF. Rozumiem, że każdy się czegoś uczy, ale jak ja się uczyłem to najpierw z całych sił robiłem co mogłem, a jak już naprawdę kończyła się wyobraźnia, strony w googlu, książki w bibliotece to pytałem w możliwie grzeczny i wdzięczny sposób - przedstawiając treść pytania, podając na tacy szczegóły i to do czego już doszedłem.

Albo masz 9 lat i siedzisz przed komputerem bez nadzoru dorosłych, albo czegoś nie chwytasz. Prosiłbym o minimum obycia, bo od dłuższego czasu zasypujesz forum nieskładną treścią pozbawioną sensu, a wpisy jak tu pokazują że czekasz na ryby a wędka stoi nieużywana w kącie. 

17 godzin temu, florek2904 napisał:

Proszę 😞 morze mi ktoś pomóc ?   

Jeżeli chcesz, żeby inni czytelnicy chcieli Ci pomóc, spróbuj wykazać większą inicjatywę, np. przez opisanie swojego problemu w bardziej szczegółowy sposób i pogrzebanie samemu - kopiuj wklej biblioteke to nie jest zaangażowanie w problem. Przeczytaj log z błędęm, wklep to co istotne w googla, poczytaj forum w ten sposób jego treść przyda się więcej niż jednej osobie, która otrzymała odpowiedź na swoje pytanie - mówiąc dosadnie... weź się do roboty.

  • Lubię! 1
  • 3 lat(a) później...

@Gieneq Wracam po kilku pięknych latach...

Chciałbym Cię przeprosić za:

po pierwsze- Zaśmiecanie forum.

po drugie- Niestosowanie się do zasad ortografii.

po trzecie- Za ciągłe domaganie się odpowiedzi.

Teraz już jestem starszy i (trochę 🙂) mądrzejszy.

Pozdrawiam Cię serdecznie. Wesołych Świąt!

  • Lubię! 2

Bądź aktywny - zaloguj się lub utwórz konto!

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto w ~20 sekund!

Zarejestruj nowe konto, to proste!

Zarejestruj się »

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się »
×
×
  • Utwórz nowe...