Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [arduino-leonardo]

An Arduino board based on the ATmega32u4 chip with built in USB HID functionality

4
votes
1answer
372 views

Can the Leonardo Arduino be used as a USB HOST for CDC Com devices?

I am trying to connect a CDC communication device to the Leonardo USB port and have communication with it via the TTL com port. Basically I want to echo to the TTL port whatever is transmitted over ...
0
votes
1answer
32 views

Arduino IDE lost board connection

Board: Arduino Leonardo IDE version: 1.6.5(also tried with 1.8.3) Try Arduino Web Editor as well The problem: after connecting Arduino to PC via USB in 5-7 seconds IDE says that connection is ...
1
vote
0answers
65 views

ADC pin shutting off on its own under certain condition

A0 pin not working when full PV system in use I am using the DFRobot Leonardo with Xbee R3. I am using the A0 pin to read a 0-5V voltage from my voltage sensor, which samples and steps down 130VDC ...
0
votes
1answer
272 views

Leonardo clone being recognized by Windows as a broken Linino One - wtf?

I'm running a Velleman VMA103, which is advertised as a clone of the Leonardo. Both use the 32u4 chip, and the pinout is exactly the same. However, when I plug it in, the drivers do something weird. ...
0
votes
2answers
759 views

Storing byte array from serial and converting to a floating point number

I have tried getting my Arduino to communicate with another device, to no avail. The command A, when sent via serial to the device, triggers it to respond with 8 binary bytes with the first 4 ...
0
votes
2answers
34 views

Could someone explain this code that sets up the software serial port data rate?

I understand most of it. The part I don't understand is the is the code in for void loop. How does that set the data rate for the software serial port? I thought mySerial.begin(9600) did that? Please ...
0
votes
1answer
102 views

Arduino Leonardo keyboard

I use Arduino Leonardo board for virtual keyboard. Everything work fine, but when my local keyboard layout is russian it's not work how I want. This is my code Keyboard.print("cmd"); typeKey(...
0
votes
0answers
103 views

Leonardo like Arduino with most RAM

I am currently using the default Leonardo to simulate mouse and keyboard events on a computer and i was wondering what the best alternative with the most RAM and fastest clock speed was? The Arduino ...
1
vote
3answers
123 views

How to “break” a function we made?

This is code about a keypad lock. The user can unlock the device by entering the secret code. To lock it again they press "#" or "*". I want to let the green LED turn on for about 0.5 seconds then ...
1
vote
1answer
289 views

Programming Leonardo with TTL to USB cable

I have wired my Arduino as seen in the picture, with the RX of the cable plugged into the TX (D1) of the Leonardo and the TX of the cable plugged into the RX(D0) of the Leonardo. I then have the ...
1
vote
4answers
1k views

Send serial command and wait for reply

I am new to Arduino and have tried all kinds of code for attempting to achieve this. None with any luck, however. I feel that it should be a relatively easy task and therefore, figured that someone ...
6
votes
3answers
416 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 ...
0
votes
2answers
1k views

Problem with uploading my sketch to my Arduino

I chose the correct COM port but it won't upload. Arduino: 1.8.3 (Windows 10), Board: "Arduino Leonardo" Sketch uses 5252 bytes (18%) of program storage space. Maximum is 28672 bytes. Global ...
1
vote
3answers
75 views

LEDs Randomly smooth transitioning, accounting for black or how-to switch using HSV

I am stuck trying to get it not to account for black in RGB. My first instinct was to use the HSV color spectrum over the RGB rainbow but, the same code will behaves differently in HSV. If i could ...
1
vote
2answers
68 views

How to add this old BASIC code snippet to work in Arduino C++ for FastLED?

I've been trying to implement this old code that randomly transitions to RGB color into my Arduino board that uses FastLED. Static Col1, Col2, Col3 As Integer Static C1, C2, C3 As Integer If (Col1 = ...
3
votes
1answer
4k views

Simple Multiple RX/TX SoftwareSerial?

In this project I will be using multiple ESP8266 WiFi modules (4) connected by software serial to an Arduino Leonardo Micro (1 UART). I plan to rotate between all 4 (starting with 2): Open port, write,...
1
vote
1answer
414 views

How do I prevent Arduino from running on startup?

I just uploaded a sketch to my Arduino Leonardo, which presses a key on the keyboard. The code was unfortunately bugged and now as soon as the Arduino is powered on, the key is being pressed. When I ...
2
votes
1answer
539 views

Arduino Leonardo(Atmega32u4) - Detecting if USB is connected to a computer?

The closest thing I can find is if(Serial) but that only returns true if there's a serial port open. The function I want, ideally, should: Return true if plugged into a computer Return false if ...
1
vote
0answers
284 views

PS2 Keyboard and sending keystrokes between a Leonardo and several pro micros

I am working on a project where I am taking the the key presses from a PS/2 keyboard and passing them to several pro micro boards so I can type the same commands on multiple computers at the same time....
0
votes
1answer
706 views

Pressing reset button restarts program only seconds latter

I am wondering why after pressing the reset button on my Arduino, the latest program loaded runs but only after about 5seconds. The same thing happen when I run my arduino from the computer using the ...
0
votes
1answer
60 views

Trigger countdown with 433MHz transmission

I would like to use an arduino to read 433 MHz transmission from multiple Soil Moisture Sensors. Since I can never be sure all transmissions reach the receiver I'd like to set a countdown from the ...
-1
votes
1answer
245 views

Which Arduinos have a true serial port?

After driving myself insane with an unreliable Leonardo, I narrowed down the problem to its serial port. Namely, it's not a true serial port, but some sort of simulated monstrosity that can't be ...
1
vote
1answer
737 views

Unable to upload code to Leonardo

I was using Arduino-Makefile to upload code to a Leonardo via its standard make upload. However, it became "stuck" and unresponsive, as Leonardo's sometimes do. I tried power cycling it, and ...
-1
votes
1answer
59 views

Taking pictures with a small Arduino

I'm trying to make a time lapse video of a crystal patch in a small space. I need some way of taking a picture every hour or so within an area no greater than 35mm, the smaller the better. Something ...
0
votes
2answers
487 views

Arduino Leonardo as USB Keyboard with WiFi module

I have two PCs: the first is connected to the Arduino via WiFi, this will instruct the Arduino what keys to send, and the second PC is connected to the Arduino via USB that will act as a USB Keyboard ...
5
votes
4answers
1k 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". ...
-3
votes
2answers
257 views

Conversion of Arrays into Matrix? [closed]

I'm going through problem in Arduino code. I have three Arrays and want to convert them into a matrix. I have tried hard but couldn't solve issue. float lb1[24]={1580,480,1580,1580,580,1950,3125,...
0
votes
1answer
120 views

Yun UBoot Prompt Not Showing

I have a Geeetech Iduino Yun Shield. I accidentally flashed the wrong firmware image (not the sysupgrade) to the board. I then tried using the Yun UBoot Reflash method. However, when I open the ...
2
votes
3answers
318 views

Moving wiring.c functions from timer0 to timer1

I am using an Arduino Leonardo (ATmega32U4) and need to use timer0 for PWM. Since by default in the wiring.c file the functions micros() and millis() use timer0, I decided that, since timer1 isn't ...
1
vote
1answer
3k views

Can Arduino Leonardo use USB port and RX TX serial pins at the same time?

Can I use the TX/RX on pins 0, 1 (to a serial slave device) while also having the USB port dedicated PC communication?
1
vote
1answer
328 views

Directly read analog voltage using PWM duty cycle timer registers

I'm outputting an analog voltage by setting an 8-bit duty cycle using analogWrite. Once set, I'd like a way to read back this duty cycle. I've managed to read the duty cycle back from the OCR4D ...
1
vote
0answers
286 views

NEO 6M doenst provide coordinates

first of all my english is not that good I am sorry. I do a school project (CanSat) it's an international project. But my problem is my GPS. I tried 2 different codes. Both they say the gps is ...
0
votes
0answers
217 views

Arduino Uno with mbot in arduino ide [closed]

I have an error uploading a code from the arduino Ide to my mbot robot I choose the arduino Uno but still have "An error occurred while uploading the sketch"
1
vote
1answer
116 views

Ways to turn a knob with a stepper motor and an ATMEGA32u4

Hey all I am wondering what would be the best items to purchase for me to be able to turn this know (continuous) below: As I mentioned above, I would need the stepper motor to have a continuous ...
0
votes
1answer
114 views

POE with Arduino Leonardo Eth

I recently purchased a Leonardo Eth and a 5v POE module in an attempt to have a POE micro-controller. I installed the module in the holes closest to the Ethernet jack side of the board, but when I ...
2
votes
6answers
6k views

Better cycling through the RGB colors

I have been trying to achieve a way to tap into the 16 million colors RGB provides for this LED strip. I thought of using LEDS.setBrightness(); but I have not been successful in my attempts. I have ...
0
votes
1answer
59 views

Reading multiple cases on Serial

I am using a Leonardo board and am testing the APIs in the Serial type. The board is talking to a screen using serial. The pseudo code is as follows (I show code relevant to Serial): void setup(void)...
0
votes
2answers
347 views

Encoders for precise robot turns

So I recently purchased: DFRobot Wheel Encoders DFRobot 3PA and 4WD Rovers (2pk) Romeo V2 Arduino Controller I was doing a bit of research online and I'm trying to figure out how to use the ...
0
votes
1answer
445 views

WS2812B strip stopped responding to control

I have a WS2812B LED strip (A clone of the Adafruit one I assume, it's from China via eBay) of 60 LEDs. When I got it, it was all fine - I could load the FastLED examples and they would work perfectly....
5
votes
3answers
1k views

Getting a fixed sampling rate

Ultimately I will move to a generic smart phone for this project. I'm trying to read 4 analog inputs from my arduino with a fixed 1kHz sampling frequency. I managed to set it to read at 1kHz as you ...
1
vote
3answers
607 views

Arduino analog input protection

I've been trying to find a way to protect my analog input pins (for my Leonardo and Pro micro). I'm basically using them to read an amplified piezo sensor output. The output is amplified because I'm ...
0
votes
4answers
463 views

Delay between multiple analogReads

I'm trying to read 4 analog inputs (1kHz speed). I changed the prescaler to 16 for my Arduino Leonardo according to this link. I then tried to read the analog pins and I used the following code to ...
1
vote
1answer
548 views

Arduino and GPS module Neo 6m

I have an Arduino Leonardo and a GPS module "NEO 6M" Pinout: PPS->free rxd->11 txd->10 gnd->gnd vcc->5v I'm running this code: #include "SoftwareSerial.h" ...
1
vote
1answer
39 views

Arduino Leonardo clone voltage question

I'm planning my first Arduino project which involves a MPU-6050 accelerometer(3.3V) and a RGB led(5V). I've found this Arduino Clone but i'm not sure if it has 3.3V and 5V outputs that I can use. The ...
0
votes
1answer
159 views

why leonardo bootloader is bigger than UNO?

Apparently leonardo and UNO are very similar boards. However, despite that both have the same flash memory size, Leonardo bootloader is considerably bigger than UNO bootloader (4KB vs 0.5KB). what ...
0
votes
0answers
36 views

Keyboard for Leonardo

I will try and make a computer powered by the arduino, and I don't know how to get a keyboard working with it. I'll use the arduino leonardo for the computer, but what do I do?
0
votes
1answer
3k views

How to convert Arduino example sketch to a complete c++ project?

I'm experimenting something new with my Arduino Leonardo. I removed its original bootloader and flashed it with LUFA mass storage example with added functionalities(now its a firmware). I'm trying to ...
0
votes
1answer
37 views

Arduino Leonardo model differences

I was thinking of buying another Arduino, and the Leonardo looks appropriate. However I am confused! The Comparative Tables seems to show 2 different Leonardos. (This table is very difficult to read ...
0
votes
2answers
114 views

Using Arduino libraries for adding more functionalities to a bootloader

I have a short question to ask before putting time for research. I have an Arduino Leonardo with the LUFA mass storage bootloader flashed. Now what I need to do is to add more functionalities to the ...
0
votes
1answer
116 views

Problem with uploading LUFA MassStorage .hex file to Leonardo

I have been trying to make my Leonardo board to work as a USB device. So I started with compiling the open source LUFA USB library demo "MassStorage" for the Leonardo board settings. Since I'm using ...