L'équipe robotique FIP a pour but de participer à la Coupe de France de Robotique (http://www.planete-sciences.org/robot/?section=pages&pageid=79). L'équipe est composée d'étudiants de l'école d'ingénieur Télécom Bretagne en filière par partenariat. Nous utilisons comme plateforme les microcontrôleurs STM32 associés aux cartes NUCLEO.
Dependencies: mbed HC_SR04_Ultrasonic_Library Nucleo_Sensor_Shield VL6180x_lib
Fork of Coupe Robotique FIP by
We are a team of students building an autonomous robot which will compete in the French Robotic Cup.
main.cpp
- Committer:
- julientiron
- Date:
- 2015-07-07
- Revision:
- 15:4d1ac5094455
- Parent:
- 14:4f85e35de719
File content as of revision 15:4d1ac5094455:
#include "mbed.h"
#include "ultrasonic.h"
#include "VL6180x.h"
#include "easyspin.h"
#define VL6180X_ADDRESS 0x29
Easyspin myEasyspin;
DigitalInOut sdaDummy(D14);
DigitalInOut sclDummy(D15);
VL6180xIdentification identification;
// mbed uses 8bit addresses shift address by 1 bit left
VL6180x sensor(D14, D15, VL6180X_ADDRESS<<1);
int main()
{
sdaDummy.mode(PullUp);
sclDummy.mode(PullUp);
myEasyspin.Begin(2);
while(1) {
if(sensor.getDistance()<255) {
myEasyspin.Run(0, FORWARD);
myEasyspin.Run(1, FORWARD);
} else {
myEasyspin.Run(0, FORWARD);
myEasyspin.Run(1, BACKWARD);
}
wait_ms(200);
}
}
Robotique FIP
