Skip to main content

Questions tagged [arduino-mega]

A microcontroller board based on the ATmega2560 or 1280 chip. Use this tag for questions specifically regarding the Mega, and not just general Arduino usage.

Filter by
Sorted by
Tagged with
71 votes
12 answers
458k views

I am sending a list of servo positions via the serial connection to the arduino in the following format 1:90&2:80&3:180 Which would be parsed as: servoId : Position & servoId : Position &...
ValrikRobot's user avatar
67 votes
2 answers
231k views

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: ...
Nick Gammon's user avatar
  • 38.9k
29 votes
8 answers
21k views

I'm relatively new at programming and many of the coding best practices I'm reading effectively state that there are very few good reasons to use a global variable (or that the best code has no ...
ATE-ENGE's user avatar
  • 941
29 votes
8 answers
40k views

Once you have uploaded a sketch to one of your Arduino boards, it is hard to know exactly what source code led to that sketch. Indeed, you may change the source code of your sketch on your PC without ...
jfpoilpret's user avatar
  • 9,162
17 votes
1 answer
160k views

I'm looking to convert an int value to a char array. currently I've found the following will return [number] int num = [number] str = String(num); str.toCharArray(cstr,16); Serial.println(cstr); ...
ATE-ENGE's user avatar
  • 941
15 votes
2 answers
37k views

I'm a beginner to microcontrollers and electronics, albeit not really to computers and programming. Starting out with the Arduino, I came to a point whereby I'm really interested in getting my ...
Phil's user avatar
  • 435
13 votes
3 answers
28k views

I have an Arduino Mega 2560 and it was working fine until about lunch time when I started getting this error: avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_getsync(): timeout ...
bladepanthera's user avatar
11 votes
2 answers
22k views

On my Arduino Uno R3 and Arduino Mega R3, there are 5V and 3.3V pins. However on this page Introduction to the Arduino Board, there is a 5V and 9V pin but no 3.3V pin. The page at Arduino: What ...
Nyxynyx's user avatar
  • 1,419
11 votes
4 answers
10k views

I am trying to find some sort of wifi adapter for Arduino, it needs to be as small as possible (not a shield) and as cheap as possible. So far I can only seem to find shields that cost about £10+ ...
connersz's user avatar
  • 266
10 votes
5 answers
7k views

I'm trying to bit bang DMX data and that requires 4us pulses. Not having much luck with the results I'm checking to see how good the Arduino is at delaying... Seems to be pretty terrible at it. Here'...
bwoogie's user avatar
  • 203
10 votes
1 answer
20k views

Have an upcoming project where user input will be based on spinning a large cog and I have several UNOs available Since rotary encoders need two pins, only a Mega would be able to handle the 7-8 ...
Andrew Lazarus's user avatar
10 votes
4 answers
33k views

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 ...
Bay's user avatar
  • 303
10 votes
4 answers
8k views

While planning the lightning infrastructure (wall-switches and lights) of my new home (it's still under-construction) I choosed to go through the "automated route" way and due to my background (I'm an ...
Damiano Verzulli's user avatar
10 votes
1 answer
4k views

I would like to set up a timer in order to call a function 800 times per second. I'm using the Arduino Mega and Timer3 with a prescaler of 1024. To choose the prescaler factor I've considered the ...
UserK's user avatar
  • 559
9 votes
2 answers
4k views

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 ...
UserK's user avatar
  • 559
9 votes
1 answer
789 views

Is there some code I can use to find out what the a chosen serial port's speed is running at ?
Hayden Thring's user avatar
9 votes
2 answers
20k views

I am building a project in which two Arduinos will be linked by three wires: TX an RX for serial communication and a common GND. What would be the maximum length of the wires here before communication ...
hobie's user avatar
  • 487
8 votes
3 answers
42k views

What can an Arduino Due do that a Mega 2560 can't? What can a Mega 2560 do that a Due can't? I've heard the Due is 3.3V so it can't work with most shields.
James Young's user avatar
8 votes
2 answers
4k views

I have been programming for quite a while now but I am new to Arduino and AVR Programming. The main question I have about programming these Micro-controllers is are there major differences in ...
Andy Braham's user avatar
8 votes
1 answer
4k views

I have ran across a couple of different event libraries that are available on the AVR and Andruino but I am not sure which one is the best option. What I would like to do is design my program in a ...
Andy Braham's user avatar
7 votes
5 answers
5k views

I will be controlling a robot with more than 10 motors which means I'll need 2 buttons each to control moving forward and backward. My controller is an Arduino mega. Is 1 pin = 1 button the best ...
Julius's user avatar
  • 91
7 votes
1 answer
2k views

I am using the Arduino Mega schematic found here and it's mostly clear, but there are a few resistors floating in the middle and I'm not quite sure what they're for or where they go: Does anyone know ...
3ddavies's user avatar
  • 193
7 votes
3 answers
5k views

I have to track a large amount of data (for an Arduino) in a program while taking care of a fair amount of other business. I started with a struct like this: struct MyStruct { // note: these ...
anthropomo's user avatar
7 votes
3 answers
31k views

If I remove the transmission code from slave this works properly but I need to transmit from slave. Here is my master code #include <Wire.h> void setup() { Wire.begin(3); Wire.onReceive(...
srinivas's user avatar
6 votes
2 answers
493 views

Could someone point me to the documentation that describes the gold dot and surrounding gold circle on the front of my arduino mega v2 board. It is right above the ICSP header and reset button, and ...
Nate's user avatar
  • 63
6 votes
1 answer
2k views

This may sound like a very dumb question and I apologise in advance. I've gone through reading about PWM and working on some example sketches to control PC fan speeds using PWM and Arduino. In all ...
Phil's user avatar
  • 435
6 votes
2 answers
17k views

I'm looking forward to getting an accurate humidity and temperature sensor. Right when I decided to go with a DHT22 module, I saw AM230x (AM2301, for example). How do I choose between DHT22 and ...
Phil's user avatar
  • 435
6 votes
4 answers
553 views

I am sending data (GPS coordinates) from Arduino once a minute with HTTP POST request to REST API (in OpenShift PaaS). Data is then stored to MySQL db. Would so called "IoT" publish/subscribe ...
Gregor Stopar's user avatar
6 votes
1 answer
8k views

I'm trying to datalog to a EyeFi SD card by writing to a file with a jpg extension. Here's that portion of my code so far: // see if the directory exists, create it if not. if( !SD.exists("/DCIM/...
user2218339's user avatar
6 votes
3 answers
13k views

Does there exist (any user developed etc.) version of the Hardware UART serial library that has support for RTS/CTS based flow control? More interested in the Tx side (Arduino sends data, while the ...
O.K.'s user avatar
  • 209
6 votes
1 answer
875 views

I am working on a simple project using an Arduino Mega 2560 that involves reading a 12-bit binary encoder signal and which is used to cycle a digital pin high and low (depending on the angular ...
Jason Abbas's user avatar
6 votes
1 answer
9k views

The ADS1256 chip is a high precision 24bit, 8 channel, analog digital converter based on SPI communication that is suitable for biomedical applications and perfect for sensing ECG and EEG signals. I ...
mrsteve's user avatar
  • 181
6 votes
1 answer
329 views

I'm trying to set up a system using an that delivers a specific number of digital pulses to a device using one of the digital pins. The number of pulses delivered is specified over a the Mega's USB ...
c-wilson's user avatar
  • 163
6 votes
1 answer
10k views

As I don't want to stack the shield over the mega 2560 board, I try to connect only the pins that used for GSM communication. Here are my connection: Pin 3 on Mega <==> Pin GSM Rx on Shield Pin ...
MW_hk's user avatar
  • 309
5 votes
1 answer
14k views

I am working on a project which requires countdown from 30sec to 0sec. I can't use delay() function because I am taking input from keyboard during countdown. millis() function wont help because my ...
Tanmay Yerunkar's user avatar
5 votes
2 answers
5k views

I have a LCD connected to a Arduino Mega 2560 using the instructions in LiquidCrystal library. It is not the first time I am using a 16x2 LCD but I never have encountered a problem like this. When I ...
KababChi's user avatar
  • 165
5 votes
1 answer
938 views

I'm currently facing an issue using delay() and millis() functions in an external cpp file. The issue is that when I used delay() in my main program (meaning .ino file) it works well but when I call ...
Cyril_Ram's user avatar
5 votes
3 answers
16k views

I want to convert a bitmap into binary array. My bitmap image is 272*208 pixel monochromatic 1bpp image. I'm confused when the width I get from my image is 16 instead of 272, the height is corrected. ...
Seawish's user avatar
  • 51
5 votes
1 answer
18k views

I bought Arduino Mega board (CH341 usb) and I am able to connect to /dev/ttyUSB0 (upload to device) only by using sudo. OS: Ubuntu 18.04 What I've tried: I have downloaded Arduino IDE and added my ...
Vladimir Djuricic's user avatar
5 votes
3 answers
4k views

I am doing some byte manipulation in Arduino, but when I enter an integer into the serial monitor, such as 1, and my program stores it as byte incomingByte, the value stored in incomingByte is 49 and ...
tpm900's user avatar
  • 395
5 votes
1 answer
12k views

This page https://store.arduino.cc/usa/mega-2560-r3 contains an image under the Documentation section which shows digital pins 10 to 13 with labels SS, MOSI, MISO, and SCK. EDIT: The documentation ...
Mark's user avatar
  • 197
5 votes
2 answers
1k views

I have built a custom installation in my home with 896 WS2812 LED driven by an ArduinoMega 2560 and powered by several rails just fine. However, the installation is arranged in a checkerboard-like ...
GhostToast's user avatar
5 votes
3 answers
21k views

my MPU6050 works very unstable , the problem is unable clear excessed FIFO buffer on MPU6050, I am using Jeff Rowberg's MPU library and according to his DMP example but without using interruptions,...
Yank's user avatar
  • 239
5 votes
1 answer
30k views

I have three devices for making a motion activated security camera system: this is the camera : LINK OV 7670 this is the SD Card module: LINK and a basic motion Sensor: PIR with 3 pin I have an ...
slhklc's user avatar
  • 53
5 votes
2 answers
1k views

I'm trying to read a -10 to +10V analog signal on my Arduino Mega (2560). I've been using a voltage divider to obtain a -5V to +5V signal (with two 10kOhm resistors), which used to work just fine. I'...
Etienne P.'s user avatar
5 votes
1 answer
13k views

I had a Prusa I3 3D Printer which use Arduino Mega 2560, Ramps 1.4 and Pololu - A4988 Stepper Motor Driver. I want to convert my 3D printer to CNC Router using my Dremel with Flexible shaft like this. ...
ANKIT JAIN's user avatar
5 votes
2 answers
230 views

After all there is more question poping up then answers i decide to upload the pdf where is everything writen, like the wire, motor type and what we can and can't use. Here is the link pdf format of ...
twistedhat's user avatar
5 votes
1 answer
5k views

I have 64 hall effect sensors (magnetic field sensors) (DRV5023AJQLPG) connected to an Arduino MEGA 2560. For that, I use 48 digital pins and 16 analog pins as digital input pins. The program in the ...
Edo Paulus's user avatar
5 votes
2 answers
11k views

I have really been suffering with my simulation! Tried connecting my arduino mega 2560 to COMPIM (used as GSM Module) in my circuit and also loaded sample code but damn! In vain! I wanted to view the ...
Joshua Kusaasira's user avatar
5 votes
1 answer
2k views

What I am trying to do is, to have arduino in low power mode and waking up only when a packet is received and is available to be read from the buffer. A scenario : Zigbee XBee module is not ...
user avatar

1
2 3 4 5
37