Outils d'utilisateurs

Outils du Site


projets:challenge_robotique_-_maker_faire_paris_2018

Ceci est une ancienne révision du document !


Challenge robotique - Maker Faire Paris 2018

L'équipe

Le brainstorming

Tests et maquettage

Les parties du robot

La mécanique

L'électronique

Les moteurs courant continu

Pour la propulsion du robot, on a choisi des moteurs à courant continu simple ou motoréducteur.

Pour les piloter, on opte pour une carte TB6612FNG de chez Sparkfun.

Une documentation est disponible ici : https://learn.sparkfun.com/tutorials/tb6612fng-hookup-guide#selecting-the-right-motor-driver-

Il faut télécharger la librairie SparkFun_TB6612 ici

Un premier programme

#include <SparkFun_TB6612.h>
 
// Pins for all inputs, keep in mind the PWM defines must be on PWM pins
#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()
{
}
 
 
void loop()
{
motor1.drive(80,1000);
motor2.drive(255,1000);
motor1.brake();
motor2.brake();
delay(1000);
motor1.drive(-80,1000);
motor2.drive(-255,1000);
motor1.brake();
motor2.brake();
delay(1000);
}

Le logiciel

projets/challenge_robotique_-_maker_faire_paris_2018.1543438681.txt.gz · Dernière modification: 2018/11/28 21:58 par thierry_dasse