Aller au contenu


Photo
- - - - -

Serial troubleshooting for titi


1 réponse à ce sujet

#1 Mike118

Mike118

    Staff Robot Maker

  • Administrateur
  • PipPipPipPipPip
  • 9 963 messages
  • Gender:Male
  • Location:Anglet

Posté 08 septembre 2020 - 08:57

First step : check that the raspberry pi provide serial outputs as expected :

 

To activate this in hardware config activate " WRITEUSERDEVICE " . 

 

activeSerial.JPG

 

Nothing more is needed for this first step. 

 

By default Raspberry serial0  is selected, this is connected to GPIO 14 (TX ) and GPIO 15 (RX ) 
And default baudrate is 115200 Baud. 

 

 

 

You should check that the data is available on the TX pin ( GPIO 14 )  with an oscilloscop or just a led.

Note refer to this to double check that you are using the correct raspberry pi GPIO : 
 

GPIOPinout.png


 

You can also use simple this arduino sketch: 

// Connect RX arduino pin digital 0   to Raspberry Pi Tx Pi Gpio 14
// Connect Arduino GND and Raspberry Pi GND 
// Either connect Arduino 5V to Raspberry pi 5V or connect Arduino USB on your computeur. 
// If some data is received, the led will be on and text will be display on Serial monitor if arduino is connected with USB
// If no data the led will stay off. 

#define LED 13

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);  
  pinMode(LED, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (Serial.available()) {  // Data received
    digitalWrite(LED, HIGH);
    int incomingByte = Serial.read();
    Serial.print("I received: ");  // Display received data
    Serial.println(incomingByte, DEC);
    
  } else {
    digitalWrite(LED, LOW);
  }
 
}




 


Si mon commentaire vous a plus laissez nous un avis  !  :thank_you:

Nouveau sur Robot Maker ? 

Jetez un oeil aux blogs, aux tutoriels, aux ouvrages, au robotscope  aux articles,  à la boutique  et aux différents services disponible !
En attendant qu'une bibliothèque de fichiers 3D soit mise en place n'hésitez pas à demander si vous avez besoin du fichier 3D d'un des produits de la boutique... On l'a peut être ! 
Si vous souhaitez un robot pilotable par internet n'hésitez pas à visiter www.vigibot.com et à lire le sous forum dédié à vigibot!

 

Les réalisations de Mike118  

 

 

 


#2 littletiti

littletiti

    Nouveau membre

  • Membres
  • 4 messages

Posté 19 septembre 2020 - 10:07

Merki ;)





Répondre à ce sujet



  


0 utilisateur(s) li(sen)t ce sujet

0 members, 0 guests, 0 anonymous users