Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed freescal_cup_k22f
source/main.cpp
- Committer:
- RobinN7
- Date:
- 2015-01-21
- Revision:
- 26:a836e62e0c98
- Parent:
- 25:f9d3d30cbb5d
- Child:
- 27:d1da489fc79a
File content as of revision 26:a836e62e0c98:
//Bibliothéque
#include "mbed.h"
#include "QEI.h"
#include "Gestion_Moteur.h"
#include "Camera.h"
#include "Servo.h"
//Differents objet/variable global
//test de commit
Serial uart(PTD3, PTD2); //xbee
//Serial uart(USBTX, USBRX); //port série usb ACM0
AnalogIn pot1(PTC1);
int main() {
// Initialisation
int compteur_uart=0;
int indice_pixel;
//float Kp_servo = 0;
uart.baud(115200);
init_led();
init_camera();
// Init UART baudrate
// Lancement boucle
while(1){
if (flag_new_image==1){
/* if (compteur_uart ==15) // on envoit une trame toute les 50 acquisitions de cameras
{
uart.printf("S1");//debug START
for (indice_pixel=0; indice_pixel<128; indice_pixel++)
{
uart.printf("%d,",pixel1[indice_pixel]);
}
uart.printf("E");//debug END
uart.printf("S2");//debug START
for (indice_pixel=0; indice_pixel<128; indice_pixel++)
{
uart.printf("%d,",pixel2[indice_pixel]);
}
uart.printf("E");//debug END
compteur_uart =0;
}
else {
compteur_uart =compteur_uart+1;
}*/
uart.printf("0,%d,%d\n\r",max_detect1,max_detect2);
flag_new_image=0;
}
}
}