AERO Interface Simulateur PPM -> Bluetooth HID Joystick

Trouvez vous ce sujet intéressant ?


  • Total des votants
    5

pierrotm777

Membre Sénior
Bonjour à tous,

Je me suis remis, depuis quelques temps, au modélisme par l'intermédiaire de l'électronique et de l'Arduino.

Partant de ce sujet ainsi que celui-ci qui traitent de la réalisation d'une interface permettant de connecter son émetteur à son PC via l'Arduino UNO, il m'est venu l'idée de remplacer l'Arduino UNO et son port USB connecté au PC, par un couple Arduino Mini Pro / Bluetooth Modem – BlueSMiRF HID.

Le montage lirait un signal PPM pour le transférer au PC via le module bluetooth.
Le tout serait monté dans le récepteur via un inter coupant l'alimentation du module ou dans mon cas (FUTABA FC18 V3 plus) dans un boîtié de module HF vide à l'arrière de l'émetteur.
Cela permettrait de ce libérer du câble reliant l'émetteur au PC.

Configuration du module BlueSMIRF:
https://learn.sparkfun.com/tutorials/using-the-bluesmirf/example-code-using-command-mode
User's Manual

Configuration du module en mode HID ou SPP:
$$$ = command mode
S~,0 = enables SPP protocol
R,1 = reboot using SPP
$$$ S~,0 R,1
$$$ = command mode
S~,6 = enables HID protocol
R,1 = reboot using HID
$$$ S~,6 R,1

Exemple de configuration du module bluetooth par l'arduino


Voici le montage de test avec une carte Uno (permet le debug par le port série)

Cablage RN42.jpg

Un premier code de test:
Code:
/*
  Example Bluetooth Serial Passthrough Sketch
 by: Jim Lindblom
 SparkFun Electronics
 date: February 26, 2013
 license: Public domain

 This example sketch converts an RN-42 bluetooth module to
 communicate at 9600 bps (from 115200), and passes any serial
 data between Serial Monitor and bluetooth module.
 */
#include <SoftwareSerial.h>  

int bluetoothTx = 2;  // TX-O pin of bluetooth mate, Arduino D2
int bluetoothRx = 3;  // RX-I pin of bluetooth mate, Arduino D3

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

void setup()
{
  Serial.begin(9600);  // Begin the serial monitor at 9600bps
/*
$$$ = command mode
S~,0 = enables SPP protocol
R,1 = reboot using SPP
$$$ S~,0 R,1
$$$ = command mode
S~,6 = enables HID protocol
R,1 = reboot using HID
$$$ S~,6 R,1
*/

  bluetooth.begin(115200);//bluetooth.begin(115200);  // The Bluetooth Mate defaults to 115200bps
  delay(500);
  bluetooth.println("$$$");  // Enter command mode
//  bluetooth.print("S~,0");//enables SPP protocol
  delay(200);  // Short delay, wait for the Mate to send back CMD
//  bluetooth.println("R,1");//reboot using HID  
  bluetooth.println("U,9600,N");  // Temporarily Change the baudrate to 9600, no parity
  delay(200);
  bluetooth.begin(9600);
  delay(200);
//  bluetooth.print("C\r\n");
  delay(5000);
}

void loop()
{
  if(bluetooth.available())  // If the bluetooth sent any characters
  {
    // Send any characters the bluetooth prints to the serial monitor
    Serial.print((char)bluetooth.read());  
  }
  if(Serial.available())  // If stuff was typed in the serial monitor
  {
    // Send any characters the Serial monitor prints to the bluetooth
    bluetooth.print((char)Serial.read());
  }
  // and loop forever and ever!
}

à suivre ...
 

Fichiers joints

  • Cablage RN42.jpg
    Cablage RN42.jpg
    73 KB · Vues: 8
Perso comme je ne trouve aucun composant dans le supermarché du coin, le sujet ne m'intéresse pas... Et de plus un câble avec prise USB me suffit pour brancher ma radio avec le simulateur.

Sinon ça se vend tout prêt à fonctionner aussi il me semble.

Par contre un boitier à brancher directement sur ma TV je suis partant...
 
Murphy2;2387566 à dit:
Perso comme je ne trouve aucun composant dans le supermarché du coin, le sujet ne m'intéresse pas... Et de plus un câble avec prise USB me suffit pour brancher ma radio avec le simulateur.
Le but est de ne plus avoir de cable !

Murphy2;2387566 à dit:
Sinon ça se vend tout prêt à fonctionner aussi il me semble.
Tu aurais un lien ?

Murphy2;2387566 à dit:
Par contre un boitier à brancher directement sur ma TV je suis partant...
Tu verrais ça comment ? Il faut tout de même un PC !!!:)
 
Haut