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.

356 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
7k views

DC Motor Speed Measurement using Rotary Encoder

I have written the following code to measure the speed of a unidirectional DC Motor.I have attempted to measure the time between successive interrupts in order to calculate speed. boolean check; ...
3
votes
0answers
433 views

Problem in using COZIR W-100 with arduino

I was using the COZIR W-100 carbon dioxide sensor with an Arduino Mega 2560 with the example code from this site. But the measured value of carbon dioxide by sensor was 90 ppm in fresh air and that ...
3
votes
0answers
6k views

Arduino GSM receiving text and then storing value as a variable in code

I am using an Arduino Mega board with a SIM900 GSM. My goal is to be able to text the GSM with a value of two digits (ex: 79) and then store that value as a variable in the code. I know how to set ...
3
votes
0answers
2k views

How to control relay using SIM800 and Arduino Mega through SMS?

For my project I need to control relays through SMS and now I can send SMS from my SIM800 module which is connected to Arduino Mega R3. But I tried several shapes for AT commands to receive SMS and ...
3
votes
0answers
3k views

MEGA2560 + SIM900A - constantly blinking, not responding

Recently I got new Arduino Mega 2560 and GSM/GPRS module - SIM900A v3.8.2. I live in Europe, so I flashed European firmware for SIM900 and it was working OK (sending SMS, receive calls, sending http ...
3
votes
0answers
215 views

Why doesn't PWM work on arduino in this code?

I am trying to control a dc motor speed with PWM. When I test it with simple program like spin in one direction with set PWM value it works. If PWM>70 the motor will start spinning and max is 255. ...
3
votes
0answers
807 views

Serial Communication with two bluetooth modules on Arduino Mega

I'm trying to communicate with two bluetooth module (RN-42) on the Arduino Mega. I studied about Serial communication in Arduino, and I used Serial1, Serial2 to get information at the same time from ...
3
votes
0answers
288 views

Help to understand multiple PWM working together

I'm very new to arduino related stuff so this question might be really easy to answer. I don't understand how multiple PWM outputs are supposed to work. Look at the pic. In the first(1) case we are ...
3
votes
0answers
369 views

How to rotate a servo continuously?

I'm new in robotics. I bought a mini robot ( Link ), which i rebuilt a little. Now it has legs and arms. This little robot has 4 little servos (Link). There are two wheels attached to two of these ...
3
votes
1answer
1k views

3.5 inch TFT LCD connection diagram with mega r3

Forum post I would like to ask if someone has this shield fully working. My biggest problem is the touch screen that i couldn't manage to make it work. Here is the code i am using: // ic: ili9327 ...
3
votes
0answers
1k views

Sending binary data to Matlab via serial

I would like to exchange data via Xbee. I've set up a communication based on strings between the Arduino and a Matlab software. Unfortunately this kind of communication isn't enough robust and ...
3
votes
0answers
838 views

Hiduino as a Serial-USB midi coverter

I have an Arduino Mega2560 configured to Hiduino, which makes the Arduino a driverless class-compliant MIDI interface. I am currently converting RS232 serial I/O data to midi data using the 'hairless ...
3
votes
0answers
780 views

Negative value conversion for modbus slave

I have an analog sensor which reads values 0-5v, -75 degrees to 75 degrees. Now I have converted to +75 degrees and -75 degrees format depend on the voltage. From 2.5v to 5v data is read properly (i....
3
votes
1answer
2k views

Reading three signals sent serially on Simulink from Arduino

I am sending three signals from one Arduino mega to another using xbees. On the receiving end I am using these signals in a Simulink code to control servo motors. Currently it is set up to read from ...
3
votes
1answer
4k views

Running two stepper motors with two rotary encoders

I'm really bad with this coding part of using two rotary encoders to control two stepper motors [using 28BYJ-48 stepper motor with the ULN2003 board]. This code works fine using one rotary encoder for ...
3
votes
1answer
1k views

Read/write data from 2 Arduinos simultaneously with Python

So for my project I have one Arduino Mega hooked up with a quadrature rotary encoder which is connected to the computer. An Arduino Uno is connected to a circuit I built, which in turn is connected to ...
3
votes
1answer
379 views

Multiple servos noise

I'm building an application that uses 20 servo motors, and i control then with an Arduino Mega. The servos are having some instability, to the point where they make small random swings. Im powering ...
2
votes
0answers
61 views

External Interrupt and Input Capture pin | Arduino MEGA

I have a code for finding the rpm of one system calling here as engine , the engine have a hall sensor output and I have tried the following Code #define SERVO_MIN 2000 #define SERVO_MAX 4000 struct ...
2
votes
0answers
25 views

HC-05 bluetooth module stops working when blinking

I'm using this HC-05 Bluetooth module to communicate between my Arduino mega 2560 and my laptop. I am using processing to send the data from my computer to the Arduino. The module connects nicely and ...
2
votes
0answers
43 views

Can I support all these sensors? Will I have enough pins?

So i'm new to arduino and i'm working on a project that will require 3 modules/sensors. I wanted to know, can all of the following modules work with the arduino mega 2560 that comes with this touch ...
2
votes
0answers
104 views

Arduino Mega as a EEPROM Programmer for Winbond W29EE011 memories

I'm trying to use my Arduino Mega as an EEPROM memory writer. For this project, besides my Arduino Mega, I use an SD Card module, an LCD display and two push buttons to handle the events. Inside the ...
2
votes
0answers
46 views

receives 0 0 instead of "hello"

I receive the following: 09:27:10.618 -> 0 0 09:27:12.589 -> 0 0 09:27:14.616 -> 0 0 09:27:16.622 -> 0 0 09:27:18.576 -> 0 0 09:27:20.577 -> 0 0 09:27:22.583 -> 0 0 09:27:...
2
votes
0answers
87 views

Rosserial. Arduino Publishing custom msg (6 float64 values and header) and subscribe Vector3Stamped msg from Arduino mega2560 is not working!

Rosserial Arduino custom msg publisher. I am publishing custom msg (6 float64 values and header) and subscribe Vector3Stamped msg from Arduino mega2560. But is not working! The error I get is the ...
2
votes
0answers
25 views

Problem displaying data sent from Arduino Mega to Arduino Mrk1000 using serial communications

I've been doing a personal project. The idea of the bigger project is to feed my fish using a robot. My specific problem is that I would like to see some data from the various sensors that I will be ...
2
votes
0answers
65 views

SPI Arduino slave not recieving data correctly

Using an STM32L476RG Nucleo microcontroller board as the SPI master and an Arduino mega as a slave with pin 52 for SCLK, pin 53 for SS and pin 51 for MOSI on the Arduino. There is no issue with the ...
2
votes
0answers
47 views

Side by side two TFT LCDs 1.8'' with ST7735 driver but one acts differently

Hardware setup: Custom PCB with ATMega 2560 Working Batch: TFT LCDs 1.8'' with ST7735 driver (Chinese version) Bad Batch: TFT LCDs 1.8'' with ST7735 driver (Chinese version) Library: From Adafruit, ...
2
votes
0answers
31 views

Arduino Mega with Sensors and tftlcd 2.4 inch

I am working with tftlcd 2.4 inch with Arduino mega 2560 board. In this code I just want to show clock as my default or home screen. By clicking on clock at any point on screen user should get a new ...
2
votes
0answers
87 views

Checking if Arduino board works or is damaged

I have an Arduino Uno and Mega, but when I connect them to a computer with the USB they came with, there is no green light near the reset button that illuminates. On the Uno board the pin 13 ...
2
votes
0answers
38 views

Does anyone know code for a filter that bypasses small vibrational movements in my accelerometer input data

So basically I have a DC motor that is self stabilizing a platform using an accelerometer as its input. When i hit the table, everything freaks out and the platform moves rapidly back and forth for a ...
2
votes
0answers
41 views

How to make 16 coin vibration motors and 5 servos work at the same time on a Arduino Mega?

I saw in Arduino Mega's datasheet that the sum of currents out of all input/output pins combined should be maximum 200mA. But I want to make 16 vibration motors and 5 servos work together on the same ...
2
votes
0answers
152 views

Problem connecting Arduino and ADC AD7606

Question is about using ADC AD7606 paired with Arduino (Arduino Mega). I can’t reach the stated speed of this bundle, the question is also whether it is possible or not. ADC output mode is 16-bit ...
2
votes
0answers
40 views

serialEvent only read 63Bytes and this is not the complete data incoming

hi everybody im working in a software for a pcb based in the chip ATmega2560 im use this with Xbee in API MODE, so im driving short string data and long string data. with the short data i dont have ...
2
votes
1answer
82 views

Missing buffers with serial communication

I am currently facing a problem with Serial communication with my arduino MEGA 2560. My project is to collect data from an encoder. There are 2 signals : ACP and ARP. For 1 rotation, there are 16 384 ...
2
votes
0answers
213 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> //...
2
votes
1answer
538 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 ...
2
votes
0answers
321 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 ...
2
votes
0answers
281 views

Compare barcode scanner string with existed string

I have a project which is reading barcode scanner result then compare with an existed string. I have used the library USB host shield in order to read data from barcode scanner then I would like to ...
2
votes
0answers
444 views

Can't push data to ThingSpeak - Status 400 Bad Request

I'm trying to push some data to ThingSpeak using the EtherCard library with the ENC28J60 ethernet module. At the moment I'm using the exemple code that comes with the library just for tests. But no ...
2
votes
0answers
879 views

Interfacing MAX6675 with Arduino Mega 2560

I'm trying to use a thermocouple k type and a MAX6675 IC. I bought the MAX6675 chip and made the circuit (just a 1 nf capacitor on +5 V and GND near the IC) with the help of the datasheet I used the ...
2
votes
0answers
484 views

Making '*' key on keypad a backspace key

Using a 4x3 membrane keypad and I want to make the '*' key a backspace if the wrong number is entered. I am a newbie and having a hard time trying to figure out how to code that, any help would be ...
2
votes
0answers
57 views

Can I track 70 pressure sensors from Arduino Mega?

I am a beginner at Arduino which I just received in the mail. My understanding is my Arduino Mega has 54 digital inputs and 16 analog inputs making for 70 inputs all together. I would like to track ...
2
votes
0answers
67 views

Unicast image transmission using Xbee

I've been working on image transmission using XBee S2B Pro modules and Arduino Mega. Main task is to transmit a jpg image taken by a jpeg serial camera at the transmitter and send it to a microSD ...
2
votes
0answers
627 views

Error while creating file on sd card

I want to create a file and read it form sd card by arduino. I have used sd card module. I have used this following code. In serial monitor it says "SD card is ready to use." But it can't read or ...
2
votes
0answers
232 views

Motor on transistor causes arduino to reset

I have a motor hooked up to the emitter of a NTE24 transistor and ground, the collector is hooked up to 3.7V, and the base is connected through a 10ohm resistor to a PWM pin on an arduino mega, which ...
2
votes
0answers
559 views

Reading HC05 Output

I am using an Arduino Mega connected with a motion sensor and HC05 bluetooth chip to transmit distance data to a larger computer, process it, and send a data back. Currently, I am having trouble ...
2
votes
0answers
40 views

Programmatically activate a specific Arduino

If I have multiple Arduinos plugged into the same computer, is there a way that I can control them both with the same script while also being able to select which one I want to control ...
2
votes
1answer
1k views

nRF24l01+ Outputting Garbage Values

I just purchased a set of 10 nRF24l01+ modules with a breakout board that looks like this: Note: This is the nRF24l01+ chip, not a clone Si24Ri. Also, I'm using an Arduino Mega. I'm following the ...
2
votes
0answers
503 views

Send .wav file from SD card to NodeMCU via serial port

I was able to send a text file in the SD card to NodeMCU using the serial port of an Arduino Mega using this code: if (readSerial1 == "Okay I'm ready") { myFile = sdf.open("uid.txt", FILE_READ); ...
2
votes
0answers
229 views

How to pass input from a Midi controller to a function?

I am trying to pass the input[], data1(pitch) from a Midi controller to the waitForButton function. When a key is pressed it sends data1(pitch) into the array input[], and when the key is up the array ...
2
votes
0answers
2k views

Arduino Mega 2560 SoftwareSerial Not Working

We have an xBee Pro S2C that is using this library (https://github.com/andrewrapp/xbee-arduino) very well on a Software Serial connection to ports 2 and 3 on an Arduino Uno. However, when we take the ...

1
2 3 4 5
8