Bonjour
Je travaille sur un projet de clavier mathématique (frape de code Latex) afin d'aider un étudiant en situation d'handicap à pouvoir prendre ses cours. J'utilise un Arduino mega mais la librairie HID semble ne pas être compatible. Pouvez-vous me donnez des pistes de résolution.
Information supplémentaire :je suis sur windows 11 , l'éditeur latex est Texmaker
Voici mon code :
#include <Arduino.h>
#include <DigiKeyboardFr.h>
#include <Keypad.h>
const byte ROWS = 6;
const byte COLS = 18;
const char* touches[ROWS][COLS] = {
const char* touches[ROWS][COLS] = {
{"\\alpha", "\\beta", "\\gamma", "\\Gamma", "\\delta", "\\Delta", "\\epsilon", "\\nu", "\\mu", "\\theta", "\\Phi", "\\rho", "\\tau", "\\sigma", "\\pi", "\\omega", "\\Omega","\\eta"}, // 18
{"\\times", "\\sum", "\\int", "\\iint", "\\iiint", "\\prodd", "\\otimes", "\\land", "\\frac{\\partial}{\partial t}", "\\frac{D}{Dt}", "\\vert", "\\sqrt{", "+", "-", "\\div","\\pm", "\\mathcal{F}" }, // 18
{"\\chapter{}", "\\section{}", "\\subsection{}", "\\subsubsection{}", "\\begin{align}", "\\end{align}", "\\begin{equation}", "\\end{equation}", "\\begin{itemize}", "\\end{itemize}", "\\begin{enumerate}", "\\end{enumerate}", "\\begin{cases}", "\\end{cases}"}, // 13
{"\\dot{}", "\\ddot{}", "\\dddot{}", "\\overline{\\overline{", "\\overrightarrow{", "_", "^", "{", "}", "\\left(", "\\right)", "\\left[", "\\right]", "\\mathbb{R}, \\mathbb{R}^2, \\mathbb{R}^3", "\\hat{}", "\\"}, // 18
{"\\infty", "\\leq", "<", "\\geq", ">", "\\neq", "\\in", "\\notin", "\\exists", "\\nexists", "\\cup", "\\cap", "\\perp", "\\parallel", "\\forall","\\sum"}, // 16
{ "=", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9","$","\\[","\\]"} // 14
};
};
byte rowPins[ROWS] = {7, 8, 9, 10, 11, 12};
byte colPins[COLS] = {22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 13, 26};
Keypad keypad = Keypad(makeKeymap((char*)touches), rowPins, colPins, ROWS, COLS);
void setup() {
Serial.begin(9600);
Serial.println("Initialisation terminée");
}
void sendKey(uint8_t key) {
DigiKeyboardFr.sendKeyStroke(0, key);
}
void loop() {
char key = keypad.getKey();
if (key) {
Serial.print("Touche pressée : ");
Serial.println(key);
// Envoyer la frappe de clavier
sendKey(key);
}
}
Merci par avance pour votre réponse, je reste à votre disposition pour toute information complémentaire