Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
46 views

Arduino hangs after some time

I am using Atmega328p with 5V power supply, My Arduino getting hangs [or auto restarts] after some times. I am using libraries: Wire.h CRC32.h EEPROM.h Arduino.h TimerOne.h RtcDS3231.h ...
0
votes
0answers
21 views

Is there software to make an interactive GUI for my TFT touch screen shield?

I was wondering this, because realized it takes quite time consuming due to all the lines of code I have to write.
0
votes
1answer
41 views

C: No communication to a connected serial port?

I'm trying to connect to an arduino Mega At2560 unit connected via usb serial port in my linux based PC. Using C code, I'm trying to send and receive simple text strings, just I'm able to send and ...
0
votes
0answers
8 views

ros_serial loses sync with Arduino only when motors are running

We have an Intel NUC communicating with an Arduino Mega using ros_serial. There are several motors attached to our bot. The motors are controlled using a BlueRobotics Basic ESC Rev 3 which takes a PWM ...
0
votes
1answer
374 views

Did not find fingerprint sensor :( Arduino Mega 2560 Adafruit Fingerprint Sensor

I'm getting the following error when I try to enroll fingerprints using the Arduino Mega 2560 microcontroller along with a Fingerprint Scanner: Did not find fingerprint sensor :( The exact devices ...
0
votes
0answers
24 views

SD card module not responding [duplicate]

I am trying to read an SD card info by Arduino and an SD card module. But the SD card is not responding. I connected the wires carefully several times but it is not working. I am using this module : ...
0
votes
0answers
45 views

Encoder code using interrupts design question

I have an Arduino Mega 2560, an Omron Optical encoder with an Index (360 steps), a 60 led NeoPixel ring (no Clk wire) and another Arduino Uno. Here is my question, I have some code written that works ...
0
votes
0answers
47 views

How to use ESP8266 with Google API for GPS as well as controlling Arduino pins

I am working on IoT based project and I want to control the device using mobile App. Everything works fine, I can switch the load and get the status back on mobile app, but I want to use my ESP8266 as ...
0
votes
1answer
42 views

Mega attachInterrupt on pins 18 or 19 require EIFR bit set first (to clear it)?

Experimenting with external interrupts on a Mega. Pins 2 and 3 work with standard attachInterrupt(digitalPinToInterrupt(iPin),ISR,FALLING); coding and call my ISR. With pins 18 and 19 I had to add ...
0
votes
1answer
60 views

Does UNO and Nano have the same pins?

Do Arduino Nano Atmega328p have the same pins as Arduino/Gizduino Uno Atmega328p?
0
votes
1answer
78 views

Arduino Uno: avrdude: stk500_recv(): programmer is not responding

I have an original Arduino Uno board purchased directly from the official arduino website. I have used it successfully with IDE v1.8.5 on my Windows 10 laptop for various projects in the last 6 months....
0
votes
1answer
29 views

How to check whether my arduino-mega ADC is sampling correctly?

I have a code which samples the given input signals with sampling rate 256hz. I plotted the graph of FFT and was able to see the peaks at the expected frequencies.But I would like to know whether my ...
0
votes
1answer
61 views

esp8266 esp-01 printing garbage values on serial monitor

I am trying to up an esp8266 esp-01. While monitoring the serial monitor it's printing garbage values. I am using arduino-mega to write the code to the esp8266. The sample code i'm trying to write is ...
0
votes
1answer
26 views

servo starts rotating whenever it is plugged

I am making a fish feeder using an Arduino Mega 2560, servo motor SG90 and RTC DS3231. I want to make it rotate twice a day, i.e. morning and 9 o'clock evening. Whenever I plug my Arduino board to ...
0
votes
0answers
126 views

problem data I2C to sensor GY955/BNO055 (China)

I want to ask, I have a problem when running the Arduino sensor, I can't output data, but it's detecting that the sensor address has been paired. Like I2C has a problem or locks it. Last night it ...
0
votes
1answer
31 views

What is the sizeof() Arduino's built in HIGH and LOW?

This might be a stupid question to ask but I'm curious. I decided to test this myself and I got a value of 2 for both HIGH and LOW, why would it output 2?
0
votes
1answer
27 views

Do the libraries of the Arduino Uno work with the Arduino Mega?

I did a project with the Arduino Due and the libraries for the VS1053 MP3 Shield were not compatable with the Due. Are the libraries that work with the Uno compatable with the Arduino Mega?
0
votes
3answers
38 views

Code getting stuck waiting for GPS Output

I'm basically trying to make a device that pulls the GPS information from a SIM808 and pushes it to a server online via GPRS. I am sorry as I am not good at programming so ive spent days trying to ...
0
votes
2answers
42 views

Which LCD Pins, if any, require PWM?

In the Arduino Tutorial Page named "Hello World" aimed to help people connect a 16x2 LCD Display compatible with Hitachi HD44780 driver to an Arduino Uno. The pins used to connect the Arduino Uno and ...
0
votes
0answers
56 views

Arduino TFT LCD buttons reappear after fillScreen(BLACK);

I am very new to TFT screens and I am developing some code to display on a little information board, however I have come across an issue. Once I call tft.fillScreen(BLACK);, it writes testing but ...
0
votes
0answers
32 views

Problem with potentiometer

I would like to make an RC controller with NRF24L01 and two dx6i clone joysticks. Problem Joystick potentiometer return shitty value. When I move it, the "middle point value change" as well "...
1
vote
1answer
111 views

Problem sending SMS from a GSM SIM900

I have a laser security system project with a GSM SIM900 and a few sensors. I'm using an Arduino Mega 2560, and everything is working normally, except the GSM is not sending an SMS to the phone and I ...
0
votes
1answer
62 views

Can't replace SoftwareSerial by Serial1 on Mega board

This sketch runs well with SoftwareSerial define and the monitor displays device modbus values. But now, i want to replace SoftwareSerial by Serial1 and i have no data. This is the sketch with ...
0
votes
1answer
251 views

Controlling output frequency of 3 Phase SPWM Inverter

I am now on a 3 Phase SPWM inverter project, and i got this code from this article. It works perfectly on simulation. But the problem is, i can't make the output frequency variable. I intend to vary ...
0
votes
1answer
37 views

Can a push button be used for TFT LCD screens?

I am trying to link my TFT LCD touch screen to a few push buttons. May I enquire why my code is not working? I'm trying to link the screen and the button so I'm trying to make the image display a ...
0
votes
1answer
43 views

What should I use Arduino-Mega or Rasbeery pi? [closed]

I am doing a project on Vehicle tracking and security. In my project Micro controller will sense input from sensors and at the same time it has to sense signal from user for tracking purpose and ...
3
votes
2answers
168 views

Testing Conditions on Port Bytes - ignoring certain bits?

Being new to testing byte and bit conditions, I feel like there has to be a better way to test for conditions/values on a byte (read from a port). For example, I'm reading 8 bits from PORTK. I need ...
-3
votes
1answer
86 views

My Arduino Code but it will not compile, I cannot find what is wrong with it [closed]

I tried convining and LCD display, ultrasonic sensons, LEDs and an IR reciever code into one main code. Seperately they work fine, but when I put them toguether it gives me the following error: "Error ...
0
votes
1answer
41 views

Arduino MEGA with RTOS

I've been coding for FreeRTOS on the MEGA 2560, and was using some LEDs to determine activity per task by toggling each individual LED each time through the task, and monitoring the time using a scope ...
0
votes
1answer
37 views

How to add if condition with RFID Example

Using a Arduino Mega 2560 and PN532 NFC/RFID module, I want to be able to scan a card and see if it's value is (0xF0, 0x21, 0x5D, 0xA7). It should print "accepted" in the serial monitor. However ...
1
vote
2answers
86 views

Remotely uploading code to an Arduino board over the internet [closed]

I recently used Particle Photon that allows me to upload firmware (.bin file) remotely over the internet. I would like to use something like this for my Arduino but I cannot find anything like that. ...
0
votes
1answer
77 views

Arduino MEGA Timer Help

Nick Gammon posted some code to setup a counter on an Arduino UNO using timer2 to generate a 38KHZ signal, and I've used it on several IR projects. On my current project, I'm using FreeRTOS for the ...
0
votes
1answer
91 views

SD card initialization failed

i use the example sketch of SD card presented in Arduino IDE. It runs well, but when i reboot my Adruino Mega by the reset button, the SD card initialization fails. To fix it, i need to remove the SD ...
0
votes
1answer
72 views

FreeRTOS Timer Use

I use Timer1 on an UNO to generate a 38KHZ signal for IR communications. It all works as expected. BUT, I need to convert the code to run as a task under FreeRTOS, and can't seem to find any details ...
0
votes
2answers
55 views

ESP8266 library: 2 requests received instead of 1

I have a strange issue with my sketch using WiFiEsp.h library from https://github.com/bportaluri/WiFiEsp When i send 1 request to my ESP8266 from my browser as http://192.168.0.25 , it seems that my ...
0
votes
1answer
28 views

problem related to arduino

first of all, I am not very good at English. if I have done a mistake during describe the problem apologize me. I want to combine both ultrasonic sensor code and mpu6050 sensor. can anyone tell me how ...
0
votes
1answer
57 views

Look for Master and Slave code with error for a Arduino Mege

I am building a a-10c Sim. So I need lots of input and outputs. Each Arduino has 54 digital i/o and 16 analog inputs in each. As I need more I just add another arduino mega 2560. I want to thank in ...
0
votes
2answers
41 views

expected unqualified id before token

here is the code. PROBLEM:- if I use for the loop the error comes "expected unqualified-id before for .......but if I use the void loop instead of for loop...the code is run without any error. ...
2
votes
1answer
59 views

Newbie question - Biltong Box Project [closed]

I am a newbie to electronics, but I do have experience working with electrical wiring in the UK, so I am comfortable working with 240V reasonably safely. I have also built a camper including all the ...
3
votes
1answer
196 views

What's the function of this transistor on Arduino Mega?

I am trying to get information about the transistor on the Arduino Mega board below: It says "340P" on the transistor. I want be able to know which model transition is this so that I can check its ...
0
votes
1answer
33 views

Sketch talks to Android via BLE on Serial2 but times out after 5 seconds when Serial cable disconnected or not present

From an Android phone I am using the "Serial Bluetooth Terminal" app to communicate to an Arduino Mega 2560 with a Bluetooth Low Energy HM10 (Jaycar XC-4382) module connected via Serial2. If the ...
0
votes
1answer
44 views

Maximum signal frequency obtained at the gpios of arduino mega 2560

Is it possible to obtain the rectangular pulse signals of freuency 10 MHz simultaneously at the GPIOs of arduino mega 2560?
1
vote
0answers
125 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 ...
1
vote
2answers
108 views

Expand Arduino storage without an SD card [closed]

I'd like to have my Arduino write some files and store them somewhere. They won't be big files, but the 1Mb available on the device won't be enough. I know an SD card is the popular solution, but the ...
0
votes
1answer
67 views

Capturing interrupt on both edges when it's set on RISING or FALLING

I've been trying to capture rising edge of an IR sensor output. This sensor's Vcc connected to Arduino 5V and it has a digital output pin. I've observed the digital output pin on an Oscilloscope. It's ...
0
votes
2answers
150 views

Problem with modbus communication between two arduinos when writing more than 27 registers

I have the following problem: I want send 200 registers from a modbus master to a slave. Both are arduinos. I can't send more than 27 registers. When I send more i get the Errorcode 255 which means ...
0
votes
3answers
128 views

I can send on software serial, but not read?

I've been cracking my head over this for a long while. Like many before me, I'm trying to send and receive data from a HM-10 bluetooth module, arduino mega adk and the app called BLE Scanner. I've ...
0
votes
1answer
23 views

What are the negative PINs for on the IndustrialShield M-Duino 58 Analog

I am working as an internship on an Arduino based PLC. It is the M-Duino 58 Analog from IndustrialShields. I try to figure out how it works; Reverse Engineering. But i dont know why it has negative ...
0
votes
1answer
40 views

3V Arduino options

I have an Arduino Mega board to test 3V devices. Which is the simplest way to connect those 3V devices to the Arduino Mega (it works at 5V) without burning them? I saw the Adafruit Trinket works at 3V,...
2
votes
3answers
107 views

Having some issues with an array

I am having an issue that I can't seem to get my head wrapped around. What I am trying to accomplish is to have a minutes worth of sensor data in an array (reading every 5 seconds) so I'll have 12 ...