Open EloiStree opened 1 month ago
🐿️ Can we use all 12 analog pin on Leonardo ?
🤖 Yes, you can use all 12 analog-capable pins on the Arduino Leonardo, but with some distinctions:
Dedicated Analog Pins (A0–A5):
analogRead()
function.Additional Analog-Capable Pins (D4, D6, D8, D9, D10, D12):
So, in total, you get 12 analog-capable inputs (A0–A11).
To read from these pins, simply use:
int valueA0 = analogRead(A0); // Dedicated analog input
int valueA6 = analogRead(A6); // Digital pin D4 as an analog input
This flexibility allows you to maximize the number of analog inputs on your Leonardo if needed.
Planning to simulate a keyboard or Xbox controller? You'll need an Arduino Micro or an Arduino Leonardo—both are designed specifically for this purpose.
If you want something compact and stable, the Arduino Micro is a good choice. However, I often need to salvage parts from my projects, and for that, the Leonardo is generally better.
If you’re not a fan of C++, you could consider a Raspberry Pi Pico W with CircuitPython, though I haven’t found any code that replicates Xbox XInput functionality on the Pico like it does on Arduino.
11
https://amzn.to/4hzaxyl
Simulate Keyboard and mouse with this one is as simple 🤖:
Note: did not verified but apparently you could use 12 analog and not just 6 on them. Need to be check.