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
-4
votes
0answers
41 views

Problem to Take a Photo

Im trying to take a photo, using mega2560 and cam ov7670 and when I take a photo, it no look so good example, take it of mine each photo look like blurred, I dont know what i'm doing wrong, the code ...
0
votes
0answers
28 views

I'm not getting the readings of sensors connected to an Arduino MEGA correctly using PLX-DAQ

I'm trying to send data from four sensors that are connected to my Arduino MEGA to an excel file using PLX-DAQ. So I want to keep taking readings at an interval of 1 second until I wish to stop. So I ...
-3
votes
0answers
9 views

RX blinks at random time while uploading the sketch, tx light not blinking at all, I'm unable to upload any sketch [duplicate]

i was working on a 2d cnc, i uploaded the sketch successfully atleast 10 times, but suddenly ive started getting the time out error, I'm getting timeout and getsync error
0
votes
1answer
21 views

Is low memory warning based on a fixed number of on the actual sketch?

I have the following output of my sketch for the Arduino Mega so far: Sketch uses 25020 bytes (9%) of program storage space. Maximum is 253952 bytes. Global variables use 6919 bytes (84%) of dynamic ...
-1
votes
1answer
53 views

Can you start/stop a code from the serial monitor? [on hold]

pressing and number in the serial monitor to start code and stop code.
0
votes
1answer
10 views

Using an L298N driver together with servo motors on the same arduino

I'm using an L298N driver (powered by a 12V, 1.5A adapter) on a MEGA Sensor Shield (powered by a USB cable). Everything works fine and I can control the direction and the speed of the DC motor, ...
0
votes
1answer
37 views

Code that worked in Uno is not working in Mega 2560

I send data with Android and read it from the Arduino serial screen. When I use UNO, I can read the data smoothly. When I use MEGA, it uploads the code without error, but does not transfer data on the ...
-2
votes
2answers
44 views

Arduino Mega reading same information that it's sending out via serial

So I have an Arduino Mega and I'm attempting serial communication with another device, and I ran into this weird issue. Let's say I use Serial1.write to send out hex A-F. If I read on that same port (...
0
votes
0answers
24 views

I need help in designing a circuit to connect an Arduino MEGA and a CD-Pickup Reader/Writer

I'm trying to use the IR source and detector of the CD Pickup reader/writer (KSS-213C) along with the lens focussing/tracking system. I want to control them using an Arduino MEGA. So since I will be ...
-1
votes
1answer
45 views

How to control 220V RGB Led Strip with Arduino/ESP32 [on hold]

I need to control 220V RGB Led strip with Arduino/ESP32-wroom over internet. Single color led is easy (just with a relay), 12V RGB can be done with PWM and maybe external power source. But how can I ...
0
votes
1answer
31 views

My stepper motor connected to a driver and an Arduino is not working

I'm using a 28BYJ-48 stepper motor with a ULN2003 driver board. I'm trying to control the motor using an Arduino MEGA. I initially connected the pins on the driver: IN1,2,3,4 to pins of the Arduino: 8,...
0
votes
1answer
35 views

Sampling rate of multiple analog pins on Arduino

as I checked on Arduino website, they mentioned all boards: UNO, Nano, Mini, Mega have maximum sample rate 10kHz for each analog pin. So my concern is: 1) is there any difference between sampling ...
0
votes
2answers
73 views

I want to code a depth sensor for arduino

I want to code a depth sensor for a little sub that i am working on. I want it to submerge to a any certain depth for example 2ft. The speed of the motor is to increase by 5 until it reaches the set ...
4
votes
2answers
60 views

Writing to sd card with a sampling rate 50ms or less? I have a sketch that writes to sd every 1s but jams at faster sampling rates. Please help?

My code below reads data from an ADC and 3 digital pins via a Mega and prints to an SD Shield (Deek Robot). I want to be able to read the data every 50ms (20ms ideally). I can't get below 250ms. I've ...
0
votes
1answer
44 views

How to Run Stepper motor through Serial Communication

I am trying to run a Stepper motor from my c++ application, from which I sent commands but its not running not sure why would it not run, outside serial check it run but inside serial check it not run....
0
votes
4answers
44 views

Connect 20 12v led to an arduino mega

I want to control about 20 leds with an arduino mega. This leds works with 12v voltage. I tried to put 20 relays but this solution is not good for me because leds will often blink I have also tried ...
0
votes
0answers
28 views

Slow serial communication with arduino and response on the application?

Currently, I'm doing a project as I want to use my Arduino Mega 2560 as an interface to my computer with a photo interrupter and stepper motor. So I need to send some commands and data to the Arduino ...
0
votes
0answers
27 views

SN74HC595 Shift Register Issue

I'm trying to use the popular SN74HC595 Shift Register, but I think something isn't right because when the bits are submitted to the register it comes out with something similar but not the same. #...
0
votes
1answer
20 views

I cannot open/write to dataFile SD shield in mySketch but have no problem with Datalogger example sketch from the SD library…?

Hello Arduino Community I am collecting data and attempting to log it on to a Deek Robot SD shield via a Mega. I have the data in a dataString which I can Serial.print to the monitor but would ...
0
votes
0answers
14 views

Suitable long-term sensors for PM, Ozone and NO2

I am totally new to Arduino. I have a Arduino Mega 2560 and I would like to perform long-term observations of PM, Ozone and NO2 (for around a year, outdoors). Do you have any ideas which sensors ...
0
votes
2answers
33 views

lcd.clear doesn't work with Serial.begin(9600) on Arduino Mega 2560

So I have a standard 16x2 LCD display with 16 pins. The LCD display works fine with every other aspect, however, the "lcd.clear" function doesn't work with "Serial.begin(ANY BAUD)". I have tried ...
0
votes
1answer
18 views

MPU6050/DMP Intermittent bad data output?

I have a DFRobots MPU6050 module wired to SCL/SDA/Pin 2 on a Mega 2560 board, using Jeff Rowberg's I2CDev/MPU6050_6Axis_MotionApps libraries. I have 2.2K pullups on the MPU6050 module, tied to +5V, ...
0
votes
2answers
45 views

How to run 3 mode of operation for each operation has individual push button to select the mode in Arduino?

I need to run 3 modes of operation if 3 push buttons are pushed in arduino. I have made the initiate code logic for one push button and one operation but I got an error message of "redefinition of int ...
-1
votes
1answer
23 views

Arduino didn't receive message from NRF - Communication PC -> Arduino -> NRF

I'm trying to send some data via NRF from one arduino to another. The sender receives the message via serial communication from PC and should send it via NRF. The transmitter is on Mega and the ...
0
votes
1answer
37 views

Phase and frequency correct PWM mode Arduino Mega 2560

I wrote a code to generate 1kHz Phase and frequency correct PWM signal from Arduino mega 2560 using timer 4. When I try the code with fast PWM mode it works perfectly. But phase correct mode didn't ...
0
votes
1answer
28 views

How can I adapt this code for the ATTiny85?

So I set up an Arduino circuit that while a button was pressed, a sound effect would play and an LED would activate until I stopped pressing the button. Since I didn't use a micro sd card module, I ...
0
votes
0answers
12 views

Problems with infrared call and response using IRremote library

I am assisting a local artist with animation and sequencing for a kinetic sculptures display. Basically, one sculpture will send a IR signal to the other and then that sculpture will perform some ...
0
votes
1answer
36 views

Serial communication between PC and Arduino using C

I'm trying to send some data to my arduino mega 2560 using serial communication. I'm using the exemple that I found here without success. Every site I read say that I can send data to the arduino ...
0
votes
0answers
23 views

How do I have this audio and LED activate ONLY when a button is held using an Arduino?

I have this code that I am using to play a sound effect where I used a program called wav2c to convert a .wav file to number values that I put into a header file that I use in the code to generate the ...
2
votes
1answer
50 views

Why won't this code play a converted wav2c header file through an Arduino to my speaker?

I used this converter wav2c to convert a .wav file to a C that I can put in a header file. I was able to put converted audio into the h file but the program where I reference it does not seem to be ...
0
votes
1answer
22 views

Will Funduino Joystick Shield work on a Mega?

I am trying to get a Funduino Joystick Shield working with an Arduino Mega and I need to use the WiFi capability. The specs I have found for the Funduino (see https://protosupplies.com/product/...
1
vote
0answers
41 views

Serial Communication between arduino and nodeMCU

I am trying to connect a nodeMCU to arduino mega using serial communication so that i can read data from firebase. I have put the following code on the NODEMCU. #include<SoftwareSerial.h> //...
0
votes
1answer
93 views

Interrupts arduino interrupting serial comunication

I have problem with communicating VB.Net-Arduino. It seems the interrupt pause my serial communication line in void loop() { ... }. I don't know what to do, and I can't erase interrupts line since I ...
0
votes
1answer
41 views

Arduino OSX Mojave - Serial port only shows sometimes

I've found lots of issues about serial ports not showing up at all, but none about what I'm experiencing. Sometimes I can see my Arduino Mega 2560 in the ports list, and sometimes I can't. I've tried ...
0
votes
0answers
13 views

Arduino menu coding problem by Keypad and 128*64 graphic LCD

I am trying to modify on the menu code to be able to use a keypad shield and arduino for scrolling between lines. after uploading and trying the code the following has happened: 1- I can not scroll ...
0
votes
0answers
20 views

Arduino Stepper motor control programming problem

I want to control the speed and position of stepper motor by a 4*4 keypad and monochrome graphic lcd interfaced with arduino. some open sources gave me good hint points to start controlling the ...
-1
votes
1answer
28 views

'myservo' does not name a type

I keep getting 'myservo' does not name a type as an error message, I have already looked other solved questions like this one but I can´t find the mistake. I would be very glad for your help. /*******...
0
votes
1answer
21 views

Arduino Mega not recognized on Raspberry Pi 3b+

I'm developing an interactive LED table for an university assignment that is being controlled by an Arduino Mega2560 which gets the information about which LEDs should be lit in which colour from a ...
0
votes
0answers
22 views

Problem Writing/Reading EEPROM on MEGA

I want to make a program that writes on the EEPROM some structs, the final device will take structs of RGB LED data: typedef struct{ unsigned char r; unsigned char g; unsigned char b; } ...
0
votes
1answer
40 views

Communicating with Arduino Mega 2560 Serial ports through x2 RS232

I am trying to driver a stepper motor using an Arduino Mega 2560. There will ideally be two RS232 signals being read into / written from the Arduino, each using male USB 3.0 connectors; one of these ...
0
votes
0answers
28 views

Arduino 3.5" TFT Display going blank after sending data through I2C

I'm trying to use I2C to send and receive commands between an Arduino UNO R3 and an Arduino Mega R3, with a 3.5" TFT display connected to the Mega. I have verified that my display is fully functional ...
0
votes
0answers
35 views

I2C between two arduinos

I have 4 gyro sensors that communicate to arduino uno using I2C and then arduino uno sends the data to arduino mega. I was wondering if I could use i2c for this purpose or if I should look for other ...
0
votes
0answers
34 views

Stop getting values from arduino after some time

I have a strange problem, I have Arduino UNO/MEGA and I need to get Gyro sensors's data and I want to see the data in the serial monitor. Seems like a simple task, I wrote a simple C program which ...
1
vote
1answer
67 views

Mega <> esp8266 comms sending baffling data

I have Wemos Mega-ESP8266 board. I have uploaded a simple WebSocket server on the ESP... #include <ESP8266WiFi.h> #include <WebSocketsServer.h> const char* ssid = "SKYNET"; const ...
1
vote
0answers
26 views

MKR1010 serial communication

Is communication using tx/rx from an arduino to mkr1010 the same as any other serial communication? I ask because I can't find any tutorials or info on connecting an arduino to mkr1010, but there are ...
0
votes
0answers
12 views

Arduino NRF24L01 transceiver reading trouble shooting

I bought a NRF24L01 from Amazon a few days ago but am having trouble getting readings. When ever I open my serial motor instead of a message I get a stream of "?"s I know that I did something right ...
-3
votes
2answers
53 views

Coding multiplexer for 64 IR-sensors [closed]

I'm new to arduino and I was hoping if anybody can show me how to code a multiplexer (CD4051BE) for 64 IR-sensors? Really need it! Okay, To be more direct the problem is a software and not a hardware ...
0
votes
0answers
46 views

High speed rotary encoder with Arduino MEGA

I'm trying to develop length measuring system and I'm using a industrial rotary encoder as the sensor. A have decided to use an Arduino external interrupt for connect the encoder. But, Encoder will ...
0
votes
1answer
73 views

LM393 Speed sensor - Counting pulses

I'm trying to calculate de rotation speed of a dc motor. I'm using the sensor shown in the picture and a slotted disk attached to the motor. The results I was getting made no sense and after several ...
0
votes
2answers
79 views

How to find out the maximum used stack space?

I am creating an Arduino sketch which involves quite some classes, and I want to check if it will run on an Arduino Uno or Mega (2 KB vs 8 KB SRAM). So far my global variables take up around 1,200 ...