Questions tagged [arduino-leonardo]
An Arduino board based on the ATmega32u4 chip with built in USB HID functionality
334 questions
67
votes
2
answers
230k
views
How do you use SPI on an Arduino?
With reference to the Arduino Uno, Mega2560, Leonardo and similar boards:
How does SPI work?
How fast is SPI?
How do I connect between a master and a slave?
How do I make an SPI slave?
Please note: ...
22
votes
2
answers
28k
views
Why do some pins have a different PWM frequency?
According to the Arduino reference for analogWrite(), the PWM frequency on most pins is ~490 Hz. However, it's ~980 Hz for pins 5 and 6 on the Uno, and for pins 3 and 11 on the Leonardo.
Why are ...
10
votes
3
answers
11k
views
Upload code on Arduino Leonardo using command line
I'm trying to upload a compiled .hex file on an Arduino Leonardo, using the terminal. Uploading a sample code using the Arduino IDE works well, and from the Arduino IDE I got the upload command
...
10
votes
4
answers
9k
views
How to really shrink a sketch
I want to make a sketch that is as small as possible, for test purposes. The problem is, when i compile the BareMinimum sketch (with an empty setup and loop), i get 466 bytes for the Uno and a ...
8
votes
4
answers
2k
views
Leonardo (32u4): ways to brick it programmatically
When the Leonardo was introduced, I think, I've read some articles about being cautious to do some things, that could cause it to not load any new sketches any more, so one has to rewrite the ...
7
votes
3
answers
1k
views
Multiple SPI device
I want to connect Ethernet board (W5100 HR911105A) to Arduino Leonardo with SPI and I also want to connect SD reader.
When I test these boards separately everything working. But when I connect them ...
6
votes
2
answers
11k
views
A question about resistance measurement with arduino
Lately I was asking myself about the possibility of measuring a potentiometer resistance with Arduino.
My questions are:
Is it possible?
If it's possible, what kind of restriction does the Arduino ...
6
votes
3
answers
15k
views
How can I filter out noise from ADC lines without delay or signal change?
I'm working on a project with a joystick and I'm trying to keep everything a simple and low latency as possible. I am reading the pots with the onboard 10bit ADC on the ATmega 32u4 but may be ...
6
votes
1
answer
1k
views
Programmatically Upload Arduino Sketch From Android App
I am attempting to build an Android app from which I can can upload a .hex file to my Arduino(Leonardo). I am aware of a few apps in the Google Play store that are capable of this functionality but I ...
5
votes
4
answers
241
views
Where in datasheet is the warning about unreliability of reading PINxn?
I use atmega32u4 (but believe it applies to all models). Here is the datasheet.
Consider the following C program (I use AVR-GCC 5.4.0):
#include <avr/io.h>
int main(void)
{
PORTB |= 1 <&...
5
votes
4
answers
4k
views
Library to set internal analog gain of the Arduino?
My original question was if there is a library that covers the internal comparator and differential and gain modes for the Arduino Uno, Mega 2560, Leonardo, Due, Zero, M0.
The answer is obvious: "No". ...
5
votes
2
answers
202
views
Practicality of recording speech
Is it practical to record speech with the Leonardo?
I want to record speech via a MEMS microphone and stream it over a serial connection to a Raspberry Pi for speech-to-text processing.
This article ...
5
votes
1
answer
1k
views
Remove Bootloader on Arduinos
I am trying to move from arduinos to AVR C. Would somebody know how to remove the arduino bootloader from the microcontroller? Is there a different process for the different atmega microcontrollers ...
5
votes
1
answer
124
views
IR frequency difference
I want to create a device that interfaces with the Light Strike Lasertag system using an Arduino Leonardo.
The Light Strike system uses not laser but regular infrared signals. According to a site ...
5
votes
2
answers
487
views
Arduino Leonardo timing Inconsistency
I've got a question regarding the use of Millis() on a Leonardo Arduino. I'm currently using it to time 4 seconds elapsed while sending a serial message every second. These messages play a sound. On ...