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

Please help this is a code for a security system please edit it for me as i am a beginner it is bt based security system [closed]

#include <HC05.h> #include <LiquidCrystal_I2C.h> #include <Keypad.h> #include<Servo.h> #define buzz A0 #define pir1 3 #define pir2 4 Servo servo; int data; int posi = 0; char ...
0
votes
1answer
36 views

How i convert to Arduino Mega?

i need using OV7670 camera on my arduino mega, and i found this site have tutorial using ov7670 camera, but in this tutorial they use arduino Uno. if i'm using arduino Mega2560, what i need to do? do ...
0
votes
1answer
34 views

Is it possible to put priorities between external interrupts?

My question is quite simple. I am using one external interrupt on the Mega2560 to wake it up with an alarm from the rtc DS3231 and record data from sensors for about 30 seconds and I would like also ...
0
votes
0answers
52 views

How to manage interrupt from accelerometer BMA220?

I would like to use the interrupt register from the BMA220 accelerometer in order to detect high-g shock. I am using a Mega2560 and the sensor is powered by 3.3 V. I use a voltage divider to convert ...
0
votes
1answer
27 views

Using Arduino fix_fft or arduinoFFT library to filter some specific sound?

I would like to know if there is a way to filter some specific sound using FFT on arduino. For instance, there is wind sound frequency in my analysis and I want to take it off. I searched for that a ...
0
votes
0answers
25 views

Reading OV2640 camera module without ESP8255 - No XLCK System Clock [closed]

If there is anybody who has the code to read an image for the OV2640 camera module, can you share it to me, please? I couldn't find any tutorial for this module (not the mini ov2640 which the ArduCam ...
0
votes
1answer
27 views

How to set PC (Program Counter) register to another function (for scheduler)

I am trying to implement a scheduler for Arduino Mega 2560. I think I lack understanding of how to set the PC register to another instruction. Here is my simple approach so far: void dummy(){ ...
0
votes
0answers
46 views

Serial Communication with a Serial device

I have a blood glucose meter which supports downloading data to computer using a serial cable and its own software. I made a serial cable for this with a usb to ttl pl2303 and its working. I can ...
-1
votes
1answer
27 views

arduino mega multi integer values reading on other arduino mega

I need two Arduino communications. The master arduino from the slave arduino needs to read 16 signals. The sample serial port output from the slave is as follows. @ 125 @ 13 @ 874 @ 1023 & 950 @...
0
votes
1answer
31 views

Which Arduino-compatible microcontroller for 2 continuous analog audio recording and 2 digital pin snapshots every second?

Apologies if the title is not very well worded. I'm new to electronics and trying to learn more about embedded systems too. I have a small project that requires recording an analog audio input at 8-...
0
votes
1answer
44 views

Write an array to SD

I'm new to the Arduino and I asked some questions around here and they were really helpful so I'm hoping I will get help once more #define maxLen 800 volatile unsigned int irBuffer[maxLen]; //...
0
votes
0answers
32 views

Arduino Mega failing to connect to XAMPP database/php server to send HTTP requests

I have developed an application with a SunFounder Mega2560 with a W5100 Ethernet shield that acts as a server and successfully parses TCP message packets from a client sending in updates. I am now ...
0
votes
0answers
20 views

Reading from SD and save it in an array

I have a text file with an IR raw code that I need to read from the SD in order to send it and I don't know how to do it. I tried to use the read file function from the specific SD library but it didn'...
0
votes
3answers
33 views

Arduino Mega's auxiliary serial ports

If I am correct, the first two pins (RX/TX) are connected to the USB, and I cannot use the serial monitor and the first RX/TX serial ports at the same time. But, what about the other 3 auxiliary ...
0
votes
0answers
34 views

SD delay in writing to file

I am using MPU6050 on an Arduino Mega 2560 with Data logging shield v1.0 and an 8Gb Kingston Micro-SD HC card.I am facing a problem in logging and successfully writing to a file 100 values/sec. Now in ...
0
votes
0answers
44 views

Voice receiver arduino

I have the following situation. I would like to develop a bracelet prototype that identifies when a person is on the go and also issue a question to the person for that bracelet and get an ...
0
votes
0answers
24 views

can I use Arduino cuurent-shield-sensor to measure very small voltage?

I want to measure very small voltage in small Range -100/+100 mv from a circuit, can Arduino-shield ACS712 (max471) do that direkt ?
0
votes
0answers
23 views

measure very small ( negative and positve ) Voltage with Arduino

How can I measure Voltage in Range -100mv to +100mv with Arduino , Is that an Arduino-shield can do that ?
0
votes
1answer
68 views

Charge lipo battery while using

I have a system that uses Arduino and some modules. The system needs 5v dc power with 3A current at maximum(The system needs 3A current for some seconds every 5 minutes and after that the current will ...
-2
votes
1answer
38 views

LCD shield submenu

I need to make an app that does various functions regarding IR signals (remote-like) I need to create a sub menu in order for me to access multiple functionalities. Arduino-Uno-Menu-Template I used ...
0
votes
1answer
27 views

Slave to Send Data after Receiving Command using I2C

I want to have my Slave Arduino to send signal to Master after the command was made. But the Slave Arduino does not proceeds to sending the signal after doing the command. What is wrong with my code? ...
0
votes
1answer
20 views

SD Card store struct: force big-endian / little-endian?

Following MAJENKO's tutorial on sd card file optimization and data integrity, can I force the SDCard to read and write in either big-endian or little-endian? I need this in order to maintain backup ...
0
votes
1answer
33 views

Mega2560 has 2 Crystal Oscillator?

Who knows this Mega2560 with two Crystal Oscillators: 12 000 MHz and 16 000 MHz? What is the use of them?
0
votes
1answer
41 views

Why does a function inside void set up is repeating after some minutes

I am trying to time sync my arduino hardware to NTP server. I have a `setSyncProvider(getNtpTime)´ function to do it and called inside the void setup. I have another function (mainFunction) inside the ...
0
votes
0answers
26 views

Starting DC Pump with Arduinowhen it is powered by 9v Battery

I'm using Arduino Mega, and would like to start a DC Motor Pump. In my circuit, there are several sensors that are going to take up the voltage offered by Mega. Hence, I would like to know whether ...
-2
votes
0answers
24 views

Sugar Concentration in Beverages [duplicate]

I need to measure the amount of sugar in the wine must and send to an application, is there anything that can perform such a procedure? Note: Today the device used for this manual process is the ...
0
votes
1answer
27 views

Two arduino boards with sensors i2c

I am new and lost I have been searching the internet about how to transfer data of multiple sensors from one Arduino to another using i2c but no luck. all the codes and tutorials online focus on ...
0
votes
0answers
17 views

How to eliminate drift with the magnetometer in the MPU9250

I have a sketch running that uses a complementary filter for my X and Y values. However, the Z value has no complementary filter (as you can tell by the slight drift when stationary) because I was ...
0
votes
2answers
73 views

SparkFun BasicAHRS_I2C giving unstable readings

SparkFun BasicAHRS_I2C giving unstable readings. I am using the SparkFun Arduino Sketch from here. It is giving me these results: X-acceleration: 91.43 mg Y-acceleration: 249.51 mg Z-acceleration: ...
0
votes
1answer
36 views

MPU6050 Gyroscope does not give reliable readings

It gives reliable readings for a couple of seconds and then it becomes unreliable. My arduino code is this: #include<Wire.h> const int MPU6050_addr=0x68; int16_t AccX,AccY,AccZ,Temp,GyroX,...
1
vote
1answer
42 views

How do I send multiple variables via stream to Unity?

So I currently have this for arduino.ino: Serial.println(Variable1); that does this in Unity: string variable1 = stream.ReadLine(); float x = float.Parse(variable1); transform.Rotate (0, -x/1000, 0)...
1
vote
1answer
16 views

Powering Motor shield and Arduino Mega Separately

I'm trying to build a fire fighting robot, that uses 2 BO DC motors, 2 Servos - MG996R and SG90. For them I'm using Motor Shield v1 of Adafruit's make that uses 2 L293D IC's and a 74HC595 shift ...
0
votes
1answer
33 views

Aduino mego TIMER1 one second interval

Can someone tell me is this timer is set correct for arduino mega. It should count exactly one second? And why when i print in serial monitor (seconds_passed++) is incremented by 2 not by 1? Full code ...
0
votes
1answer
56 views

Control two stepper motors simulatenously?

I'm using Arduino Mega 2560, A4988 motor driver for 5 stepper motors. There are X1, X2, Y, Z, A axis, and if I control Y and Z at once, it works. But when I just change axis from Y&Z to X1&X2, ...
0
votes
0answers
47 views

Arduino with ESP8266 via serial pass through [duplicate]

I bought an Arduino Mega 2650 alongside a couple of ESP8266 chips hoping to make a wireless project take off. Using the basic serial passthrough code void setup() { Serial.begin(9600); ...
1
vote
0answers
33 views

Multiple arduino connections problem

I have 2 Arduino Mega 2560 connected via USB to my Ubuntu 18.04 machine. When I boot, one connects to /dev/ttyACM0 and the other connects to /dev/ttyACM1. Communication works perfectly. However, ...
0
votes
0answers
44 views

OneWire with DS18B20 digital sensor only works on the I2C (20 and 21) pins of my Mega?

I am using an Arduino Mega to read a DS18B20 temperature sensor using the OneWire library in the code below which I got here: #include <OneWire.h> #define DS18S20_Pin 20 //DS18S20 Signal pin ...
0
votes
1answer
39 views

Class member variable would not update

Code would not update variable inside drive method. The variable is updated inside the drive method, but it doesn't change in the rest of the class. I wrote a simple similar method in normal C++ and ...
0
votes
1answer
61 views

Output 3.3V when setting pin to high

I would like to pass 3.3V and Ground to an component. How can I achieve such a thing? I for example would like to let a wire get 3.3V when I for example do digitalWrite(pin, HIGH). It is hard for me ...
0
votes
1answer
74 views

Trying to light an LED with one Button and have no idea what is wrong

New to Arduino. I am trying to use a single button to light and turn off a single LED. I followed an online tutorial (youtube video) and changed the code just a bit. I know it is for two LEDs but I ...
0
votes
2answers
23 views

Fade In/Fade Out with multiple LED strips

I want to make a strip led application(Fade In/Fade Out).Each strip has 48 pixels.One of the strips should be red and the other should be blue.Using the for loop, I managed to fade in-fade out a small ...
0
votes
2answers
46 views

Arduino powered from motor shield and USB issue

I am using an Arduino (Elegoo) Mega with Motor shield to drive a digital train set. The Motor shield is powered from a 12v 1.1 amp dc power supply and I have the Arduino plugged into my laptop via USB....
1
vote
1answer
763 views

Faster Arduino Mega

I am using Arduino Mega 2560 for interfacing devices such as the Maxim MAX22500E and TI ADS1241. Now I am requiring more speed for hopefully the same coding, and I am thinking in the Arduino Due (84 ...
-2
votes
1answer
86 views

What to do if the #include function does not work inside the code of my Arduino Board Mega 2560

What to do if the #include function does not work inside the code of my Arduino Board Mega 2560 Here is the code: #include <"CurieIMU.h">; CurieIMU.readMotionSensor(ax, ay, az, gx, gy, gz); ...
1
vote
1answer
38 views

Convert Arduino MEGA Code to Arduino DUE Code?

I've been working with MEGA before. This code works completely with MEGA. I'm still at beginner level in Arduino. Q: How do I adapt this code to DUE? Note: I'm asking this question because I think ...
0
votes
0answers
35 views

I2C freeze on master

On my first big Arduino-project I made a game using the following Arduino's and the I2C-protocol: 1x Mega as master 4x Mega as slave 2x Uno as slave The Arduino's controll a physical game where the ...
0
votes
0answers
62 views

Connecting multiple led strips in parallel with arduino

I am making a led panel using led strips. Each of the two led strips are 5M long containing 300 LED SMD Striplights. I have cut each of the 2 strips into many small strips of lengths of about 38 cm ...
0
votes
1answer
44 views

Join two rgb ledPanel 32x64 in order to get one 64x64 (How to)

Im making a project to make a pixelArt of 64x64 using two 64x32 RGB ledMatrix and Arduino MEGA This is the RGB Panel: https://es.aliexpress.com/item/32904852724.html?spm=a2g0s.9042311.0.0....
1
vote
2answers
84 views

Arduino Bluetooth communication is slowing down because of the 'for' loop!

I'm sending data to Arduino through the mobile app. So far, all the code has been running consistently. #include <SoftwareSerial.h> #define FASTLED_INTERNAL #include <FastLED.h> #define ...
0
votes
0answers
38 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 ...