Bonjour les Bidouilleuses et Bidouilleurs,
6 jours et plusieurs heures de lecture et de formation Arduino (Udemy) plus tard, voici un vrai projet sur lequel je souhaitais ardemment me lancer.
Je me suis inspiré d'un projet déjà réalisé par
DeepLift sur Youtube en 2021 :
https://www.youtube.com/watch?v=F_ZPMev6En0Cette personne utilise l'Arduino Nano, mais je voulais reprendre ce projet avec l'Arduino Uno, et aussi ajouter du code et un écran LCD au projet.
Avant de réaliser le projet en propotype réel, j'ai utilisé "Tinkercad" pour construire le circuit et faire beaucoup d'erreurs / corrections sur celui-ci, mais aussi sur le code en C++.
Bien entendu, j'utiliserai également "AAC Keys" pour configurer les raccourcis pour l'ordinateur / Microsoft Team.
Voici le code que j'ai utilisé pour mon projet jusqu'à présent, mais qui est encore en cours d'élaboration. Je pense ajouter autres choses :
#include <LiquidCrystal.h>
const int start_call = 5;
const int end_call = 4;
const int toggle_mute = 6;
const int screen_share = 8;
const int hand_raise = 9;
const int rs = 2, e = 3, db4 = 13, db5 = 12, db6 = 11, db7 = 10;
LiquidCrystal lcd(rs, e, db4, db5, db6, db7);
const char* start_call_cmd = "\033,hold,ctrl,hold,shift.C";
const char* end_call_cmd = "\033,hold,ctrl,hold,shift.B";
const char* toggle_mute_cmd = "\033,hold,ctrl,hold,shift.M";
const char* screen_share_cmd = "\033,hold,ctrl,hold,shift.E";
const char* hand_raise_cmd = "\033,hold,ctrl,hold,shift.K";
bool appelEnCours = false;
void setup() {
Serial.begin(9600);
lcd.begin(16, 2); // Initialize LCD
pinMode(start_call, INPUT_PULLUP);
pinMode(end_call, INPUT_PULLUP);
pinMode(toggle_mute, INPUT_PULLUP);
pinMode(screen_share, INPUT_PULLUP);
pinMode(hand_raise, INPUT_PULLUP);
}
void loop() {
if (digitalRead(start_call)) {
if (!appelEnCours) {
appelEnCours = true;
digitalWrite(start_call, HIGH); // Allume la LED lorsque l'appel démarre
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Debut appel");
sendCommand(start_call_cmd);
}
} else if (digitalRead(end_call)) {
if (appelEnCours) {
appelEnCours = false;
digitalWrite(start_call, LOW); // Éteint la LED lorsque l'appel se termine
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Fin appel");
sendCommand(end_call_cmd);
}
} else if (digitalRead(toggle_mute)) {
if (appelEnCours) {
appelEnCours = true;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Sourdine");
sendCommand(toggle_mute_cmd);
}
} else if (digitalRead(screen_share)) {
if (appelEnCours) {
appelEnCours = true;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Partage d'ecran");
sendCommand(screen_share_cmd);
}
} else if (digitalRead(hand_raise)) {
if (appelEnCours) {
appelEnCours = true;
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Je voudrais parler");
sendCommand(hand_raise_cmd);
}
}
if (digitalRead(start_call)) {
sendCommand(start_call_cmd);
} else if (digitalRead(end_call)) {
sendCommand(end_call_cmd);
} else if (digitalRead(toggle_mute)) {
sendCommand(toggle_mute_cmd);
} else if (digitalRead(screen_share)) {
sendCommand(screen_share_cmd);
} else if (digitalRead(hand_raise)) {
sendCommand(hand_raise_cmd);
}
}
void sendCommand(const char* commande) {
Serial.print(commande);
}
Liste de pièces:
Nom Quantité Composant
U1 1 Arduino Uno R3
R9 11 220 Ω Résistance
D1 1 Vert LED
D2 1 Rouge LED
D3 1 Jaune LED
D4 1 Bleu LED
D5 1 Orange LED
S3 5 Bouton poussoir
U2 1 Écran LCD 16x2

