All Questions
1,572
questions
0
votes
2
answers
5k
views
Avrdude verification error after months of successful use
I have a 2560 that I've been working with for a while (over a year for sure), programming it with an avrisp mk2. No issue this whole time, then suddenly, a couple of days ago it starts failing with
...
0
votes
2
answers
474
views
Assigning an element of a multidimensional array to a second array
I have two arrays. The first array is a multidimensional array holding color values.
The 2nd array stores an active color from the 1st array.
How can I assign an element from the multidimensional ...
0
votes
1
answer
472
views
Arduino Uno with ESP8266-01 with AT [closed]
Here is the schematic I followed:
Here also the link: https://www.circuito.io/app?components=10167,11021,12083,13678,13959
#include "DHT.h"
#include "NewPing.h"
#include <SoftwareSerial.h>
#...
0
votes
1
answer
10k
views
Store TinyGPS++ latitude value into a variable of type string or float
I want to get the GPS ordinates in degrees with 6 decimal accuracy. I can obtain this by creating a gps object with TinyGPS library. but In the TinyGPS example codes, its written
Serial.println(gps....
0
votes
2
answers
5k
views
I'm looking for a way to serially communicate with a multi mesh Arduino slave network
I have one PC running Visual Studio and a program that will be sending commands to Arduinos via serial COM Ports. So, in 11 Nano MCUs, I will have motor drivers L293D/L298N ICs, while in other Nanos I ...
0
votes
1
answer
300
views
How to interpret analog values sent to Arduino from line scanner?
So I have a line scan camera attached to my Arduino Mega and I'm trying to send it a digital clock impulse and get an analog output back. The line scan camera is supposed to return 128 pixels.
So far ...
-1
votes
1
answer
3k
views
Avrdude verification error
I use an Arduino UNO with IDE 1.8.5 and for the last few days it doesn't let me upload any code. When I try, it pops up with the following error:
avrdude: verification error, first mismatch at byte ...
48
votes
21
answers
141k
views
Serial data plotting programs
I need to plot serial data from Arduino.
I require support for:
Various data formats (e.g. signed, unsigned, 8 bits, 16 bits);
Plots several data on the same axes;
Exports / Imports file data.
As ...
45
votes
5
answers
157k
views
What is the difference between Serial.write and Serial.print? And when are they used?
What is the difference between Serial.write and Serial.print? And when are they used?
Both have been used to print on serial monitor, what are their actual differences?
42
votes
5
answers
47k
views
Difference between Arduino.cc and Arduino.org
Recently I have noticed that there are two arduino sites, arduino.cc and arduino.org. They both have the Arduino logo and both sell what seems to be official Arduino boards. Also, arduino.org came ...
25
votes
1
answer
43k
views
ATtiny85: Power consumption vs clock speed
Short and simple: What is the power consumption for an ATtiny85 running at 1 MHz and 8 MHz using the internal clock? Not using any sleep modes.
I have googled a lot and can't find any info on this. I ...
23
votes
4
answers
24k
views
Communication Protocol Best Practices and Patterns
Every time I design a serial protocol to be used between two arduinos, I feel a bit like I'm reinventing a wheel. I wonder if there are any best practices or patterns people follow. This question is ...
22
votes
2
answers
10k
views
Why can't I upload a sketch while other components/devices are connected to my Uno?
I wanted to make a fairly simple circuit which would flash a series of LEDs in sequence, using my Arduino Uno (more specifically, a SainSmart clone). I wrote my sketch and it compiled fine. After that,...
22
votes
1
answer
28k
views
How to access multiple SPI interfaces on Arduino
I have worked on SPI devices connected with an Arduino one at a time. How do I work with two different SPI devices at the same time?
21
votes
7
answers
26k
views
Loading local libraries
I'm new to Arduino/C development (coming from a JavaScript/Ruby environment), but I was wondering if it was possible to include a library from a custom folder within a sketch?
So this is my situation;...
21
votes
8
answers
13k
views
In Linux, how to identify multiple Arduinos connected over USB?
If I have multiple Arduinos connected over USB to a Linux computer, and they show up as
/tty/ACM0
/tty/ACM1
/tty/ACM2
How can I identify which Arduino is which without connecting to them via ...
19
votes
5
answers
78k
views
deprecated conversion from string constant to 'char*'
What does this error means?
I can't solve it in any way.
warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
16
votes
3
answers
16k
views
Arduino powering from 9V battery
Yesterday afternoon I have left my Arduino running on a fresh Alkaline 9V battery (+ connected to Vin, - connected to GND). Today morning (16 hours later) the LCD display was no longer visible, and ...
16
votes
6
answers
18k
views
Arduino: How to get the board type in code
I want to write a sketch that can be compiled on different Arduino boards.
I want to display on the PC which board is currently connected.
This means that the user connects the PC via USB cable to ...
15
votes
2
answers
10k
views
Powering Arduino with Solar Panels
Clearly, an Arduino can be powered with solar panels.
What is the most optimal configuration?
Can you recharge and discharge at the same time?
Is LiPO the best battery cache technology, or is there ...
15
votes
2
answers
8k
views
Why does an `.ino` file have to be in a folder of the same name?
I'm trying to organise a very complicated project and I want to put all the actual code in a folder named src (source), but I want to keep the main .ino file as main.ino (it will also be in src). Then ...
13
votes
4
answers
7k
views
Is setup and loop provided for convenience?
Arduino sketches usually feature a setup and loop function. Are these functions only provided for convenience or do they actually have special purposes? (e.g.: are some operations disallowed or ...
13
votes
6
answers
30k
views
Why do you need a second resistor when using a photoresistor/LDR?
A photoresistor is already a resistor and will limit the voltage in the circuit. Why can't this be connected to a pin and measured? Why is a second resistor needed to connect the photoresistor to ...
12
votes
2
answers
11k
views
Will a .ino Arduino Sketch compile directly on GCC-AVR?
Okay, we all have seen those questions all over the web such as Arduino v.s. C++, or other similar questions. And a vast majority of the answers do not even touch compilation differences other than ...
12
votes
1
answer
9k
views
Does the ESP8266 somehow remember wifi access data?
Today I did some tinkering with an ESP8266, trying out OTA and writing a webserver. To find an error, I reduced the sketch to just the following lines:
#include <ESP8266WebServer.h>
...
11
votes
4
answers
147k
views
avrdude ser_open() can't set com-state
When trying to upload the blink sketch to my (unofficial) Arduino Uno, I get the following error:
avrdude ser_open() can't set com-state for "\\.\COM3"
I have programmed this Arduino before using ...
11
votes
4
answers
6k
views
Choosing wireless tech for lowest possible lag
I am drafting a pub quiz project, where the Referee gives a signal and multiple players push their buttons. The first to push wins the right to give an answer.
I want all buttons (referee's + X ...
11
votes
4
answers
20k
views
SAM3X8E (Arduino Due) Pin IO registers
How do the IO registers of Arduino Due work?
On Arduino Uno just set DDRx, then PINx to read, PORTx to write, I'd like to do the same thing with an Arduino Due, but it has many more registers, such as ...
11
votes
2
answers
2k
views
Understanding the compilation/linking/upload process (so I don't have to use the IDE)
I have started to play with and arduino UNO quite recently (without any prior experience with micro-controllers). I would like to use emacs instead of the IDE, and I'd also like to know what the IDE ...
10
votes
4
answers
6k
views
How to move from arduino to physical prototype
I've been reading a bit about moving from Arduino to PCB and it seems a bit daunting. For now, all I really want to do is take something I've built, and make a few changes so that I can actually ...
10
votes
3
answers
64k
views
Convert to and from Unix Timestamp
What is the best way to convert between date, hours, min, seconds to Unix timestamp in milliseconds in Arduino? I need to have this conversion, since I'm using RTC (date, hours, min, secs etc) and ...
10
votes
4
answers
60k
views
Arduino compatible's serial port not showing Mac OSX
I bought an Arduino-compatible Freaduino board atmega8 (I selected the board type as Arduino ng or older atmega8). I installed the Arduino IDE on Mac OS X and the FTDI drivers. But my serial port ...
10
votes
4
answers
32k
views
2.4" TFT LCD Shield isn't working on Arduino Mega
Even on ebay's website it is mentioned that I can't use 2.4" TFT LCD Shield display on attach to Arduino Mega. The problem is that I bought this shield by mistake. I want to put this shield onto ...
10
votes
1
answer
3k
views
How to design and debug a custom I2C master-slave system?
How to proceed, when in need of a custom I2C master-slave system?
What are the design criteria to apply?
What are the debugging tools one can use to troubleshoot problems?
10
votes
3
answers
10k
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
...
9
votes
9
answers
7k
views
Best way to determine if a 5 gallon water jug is getting empty
I have an espresso machine that gets its water from one of those 5 gallon blue water bottles (I would plumb it, but our water here is WAAAAY too hard).
If I ever accidentally let the bottle run out ...
9
votes
3
answers
14k
views
ESP8266 Analog read interferes with wifi?
Short version:
I have a program that connects my ESP8266 to WIFI so I can control a relay connected to it over the internet or a button. I also have a sensor for my door. This software works ...
9
votes
1
answer
2k
views
How can the Arduino Uno support up to 12 servos if it only has 6 digital PWM pins?
According to this:
The Servo library supports up to 12 motors on most Arduino boards and
48 on the Arduino Mega. On boards other than the Mega, use of the
library disables analogWrite() (PWM) ...
9
votes
3
answers
3k
views
How to measure total energy usage of an arduino board
I have a project that I'm currently working on. We have built a green wall, wich consists of plants on a wall
Now, we have a pump situated at the bottom that waters all the plants. There is an ...
9
votes
2
answers
35k
views
How to send numbers to Arduino UNO via Python 3 and the module serial
I am new to Arduino (and computer programming in general), so I apologize if this question looks silly.
Once I set up a basic arduino-LED connection, I have problems sending INTEGERS to arduino ...
9
votes
2
answers
4k
views
How to update a variable in an ISR using Timers
I'm trying to check the frequency of Timer3 using a counter. The value of the counter, declared as volatile, is incremented in the ISR and every second the sum is shown in the main loop and the value ...
8
votes
2
answers
6k
views
I fried the AMS1117 voltage regulator on my Arduino Clone, is this the cause?
I had the 12V DC power jack plugged-in all the time, and "to make things more exciting" I also plugged-in the "data" USB whenever I had a new sketch to upload. Is this combination a big no-no, or is ...
8
votes
2
answers
7k
views
Male header pins on Arduino Uno
On my board, there are 12 (2 groups of 6, each group consistent of 3 rows of 2 pins) weird male header pins. What are these, and how would you use them?
8
votes
3
answers
8k
views
How to stop Arduino from drawing power through USB
I'm working on an embedded project, where I use arduinos as a "sensor shield" for RaspberryPi (I have model B).
The problem is, that the RaspberryPi's USB port is not powerfull enough to drive WiFi ...
8
votes
1
answer
1k
views
Arduino and ESP8266 Web server
First things first, if there was an ESP8266 StackExchange, I would post this there.
I am setting up a web server that will programmaticly be controlled from an external Python script, and I am ...
8
votes
5
answers
41k
views
Arduino Pro Micro, get data out of Tx pin?
I have a Sparkfun Arduino Pro Micro with an ATmega32u4 on it and a Roving Networks RN32 Bluetooth Module
Theoretically, I should be able to solder the Rx of the Bluetooth to the Tx on the arduino and ...
8
votes
7
answers
134k
views
What is commonly done to stop a servo after reaching desired position?
When I started Arduino, I did not expect that everything must be contained in an infinite loop. I thought I could just write something like: motor start -> motor stop. But in actuality, what I get is ...
7
votes
4
answers
16k
views
Watchdog timer stuck in restart loop? (green led flashing)
I am trying to set up a way to reboot arduino on command. The code below should do that but it seems like my arduino just get's stuck in some sort of a loop where I cant upload or get any serial ...
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 ...
7
votes
4
answers
5k
views
Detailed analyse of memory usage
When compiling a sketch, after linking, the build outputs a kind of forecast on RAM usage, e.g.:
Minimum Memory Usage: 1456 bytes (71% of a 2048 byte maximum)
Is it possible to somehow get a ...