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
0answers
28 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
47 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
21 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
11 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
42 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
1answer
21 views

How to connect arduino mega as slave and nodemcu esp8266 as master?

How to connect arduino mega as slave and nodemcu esp8266 as master? I need to make a portable traffic light that could be control by nodemcuesp8266. One virtual button for one lane and so on. I have ...
0
votes
0answers
21 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
49 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 ...
-1
votes
0answers
36 views

SMS text, after lower case 'w', is missing in an arduino-SIM900A system [closed]

I am trying to send a text sms using Arduino libraries for GSM module (using SIM900A), every SMS is coming perfectly but when 'w' comes in text. it does not send rest of the text. did anybody faced ...
0
votes
2answers
58 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 ...
-3
votes
2answers
35 views

Return constant string

Look at this code : char * function1() { return « hello » } Where is stored hello string ? Is there a copy ? What i want to avoid is to have a memory leak or accessing to another string instead ...
0
votes
1answer
22 views

Arduino Strings concatenation

I am working on an arduino mega 2560 sketch. I have to parse http query strings. My program is concatenating strings for each http request. And i have an http request every second during all day. I ...
0
votes
0answers
23 views

Exchange data between Arduino and a remote server

I want to read name and user code stored in a magnetic card by using my arduino and then send this information to a remote server. The server runs an application which is able to control if the user ...
0
votes
1answer
57 views

I want my arduino mega to read from all 4 serial ports at the same time, running sequentially through each one

I currently have the code running through Serial1, which works exactly as I want it to: int RFIDResetPin = 13; void setup() { Serial.begin(9600); Serial1.begin(9600); Serial2.begin(9600); ...
0
votes
0answers
25 views

How to change phase correct PWM mode frequency

I've tried many method to change the phase correct pwm frequency, but failed. I need to change the phase correct pwm frequency to 20khz. The code below, provide phase correct pwm at 31272Hz frequency. ...
0
votes
0answers
25 views

problem with char array iteration and strcmp

New to Arduino and programming so forgive me if this is trivial but I've searched and can't find an answer... Goal: I want to convert decimal values to their equivalent fraction... eg: 0.125=1/8. I ...
0
votes
0answers
32 views

Can't use MEGA as Transmitter and UNO as Receiver nRF24L01

I have a project with 7 May Deadline, i really need help on this. Here is the problem, I need to use my Arduino MEGA 2560 as transmitter and Ardino UNO(CH340G) as receiver. I can use uno as ...
0
votes
1answer
28 views

Generating variable frequency of 3 phase SPWM

I got a sample of program to generate 3 phase SPWM from this Controlling output frequency of 3 Phase SPWM Inverter. As far as I understood, the frequency generated is constant. My question is how can ...
0
votes
0answers
11 views

VMA101 Mega 2560 upload error

I have a Velleman VMA101 Arduino Mega 2560. https://www.velleman.eu/products/view/?id=435498 When I connect it to my computer, I can see it on Port COM18 with a yellow triangle, which means ...
0
votes
1answer
41 views

Mega code not compiling on Wemos Mega board

Hi I have some code that I'm trying to port from a Mega 2560 R3 to a Wemos Mega. #include "SoftPWM.h" #include ESP8266WiFi.h // Outputs to PWM & H bridge direction // PWMs: // DC_pwm, left_pwm, ...
0
votes
0answers
38 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 ...
0
votes
0answers
19 views

Scanned RFID data is not appearing in the serial monitor

I am attempting to use this code to receive data from 2 ports, alternating between them: /* Software serial multple serial test Receives from the two software serial ports, sends to the ...
0
votes
0answers
23 views

Problem in interfacing EM18 reader with Arduino Mega

When we interfaced em18 reader with Arduino Uno it was properly working but with Arduino Mega it is not working but all other components are properly with Arduino Mega. Receiver and transmitter LEDs ...
0
votes
1answer
30 views

Port 0x6F problem

When I disassemble an Arduino IDE created pjoject I see in the created code ("disassembled code actually"), the it uses IN / OUT instruction on port 0X6F. Like this (part of disassembled list): ...
0
votes
1answer
27 views

Arduino Mega - Enabling CTC mode disables timer

I'm trying to use timer3 on an Arduino Mega 2560 in CTC mode. However, enabling CTC disables the code entirely. Here is the function I call in setup() to setup the times. void SetupInterrerupt() { ...
0
votes
1answer
35 views

Built-In Digital Map for Robot Driving

So, I'm creating this project for school. It's a simple robot with Arduino MEGA 2560 and basically, I create a digital map, feed it into the Arduino program and then the robot can drive. However, I've ...
-2
votes
1answer
25 views

error: invalid use of non-static member function attachInterrupt(0,count,RISING);

XRPM_COUNTERS.h:15:5: error: expected unqualified-id before string constant ISR(PCINT0_vect) { ^ In file included from C:\Documents and Settings\SAM\Desktop\automation_1_A_NEW_AAA\...
0
votes
3answers
38 views

Arduino keeps looping

I made a program where I give a number(4 bit) as input and four led on the breadboard lights up according to its binary. The problem is the program works all well only for (2-15) but if I give 0 or 1 ...
0
votes
0answers
27 views

expected unqualified-id before string constant

XRPM_COUNTERS.h:15:5: error: expected unqualified-id before string constant ISR(PCINT0_vect) { ^ In file included from C:\Documents and Settings\SAM\Desktop\automation_1_A_NEW_AAA\...
-1
votes
0answers
10 views

Telit GE910-QUAD with arduino not responding

I'm using the Arduino Mega board with GE910-QUAD(GSM Module-TELIT). I want to send AT commands through the serial monitor of the arduino to the GSM module. I load the following code and send AT ...
0
votes
2answers
33 views

Cannot make LCD & Gyro work together

I'm new to this so there are some poor methods in my code when I try to introduce the LCD into the loop. My issue is that the LCD delay and the servo delay are interfering with each other. How can I ...
0
votes
1answer
24 views

How to get more than the 16 Analog INs on a Arduino Mega for using like 24 piezo sensors

i bought an Arduino Mega2560 and flashed it with usbmidi. So now it comes up as a midi device. I need more than those 16 analog ins to be able to put all my 24 piezo sensors into it to receive midi ...
0
votes
0answers
37 views

SOLVED Accelerometer/gyro MPU6050 is freezing after random time

SOLVED: I "solved" the problem by cycling my Arduino's power and I haven't had an issue since. I would still like to figure out what was going on. I still think it's something in that MPU6050 library ...
0
votes
1answer
18 views

Using an Android bluetooth terminal to change preset states on 8x8 LED matrixes

I'm trying to create eyes for a project, and while I have been able to properly program the different expressions, and have them triggered by commands from the COM3 terminal, I have not been able to ...
0
votes
0answers
23 views

invalid use of non-static member function [duplicate]

I'm learning ardino programming. I have make a multi tab program for printing machine. But I have an error in the RPM counter: RPM_COUNTER.h:11:33: error: invalid use of non-static member function ...
0
votes
0answers
19 views

RPM_COUNTER.h:11:33: error: invalid use of non-static member function attachInterrupt(0,count,RISING); [duplicate]

class RPM_COUNTER { private: volatile int counter = 0; public: void RPMSetup() { lcd.begin(16,2); attachInterrupt(0,count,RISING); } void RPMLoop() { delay(999); // ...
0
votes
1answer
30 views

How to connect the following ESP8266MOD to Arduino Mega?

I am trying to connect the following ESP8266 to Arduino mega. However, I am unable to find the specific connection sheet for the same. Can anybody suggest the same?
-1
votes
1answer
34 views

Software and Hardware serial same time [closed]

Im using Arduino MEGA and using Hardware serial 1 and one software serial interface for communicate two different devices Nextion HMI(hardware serial 1) and Modbus temperature controller(software ...
1
vote
1answer
21 views

How to get 3v3 pins on Arduino Mega Sensor shield v2.0?

I am using Arduino mega and a sensor shield (picture attached below). I need to connect three different wires to 3.3 V input. Can anybody suggest how can I achieve the same? What voltage do the VCC ...
0
votes
0answers
24 views

Control motor DC with buttons

i'm new user with Arduino, i want to know if there is a tutorial to control the rotation of a motor like : with 4 buttons, the first to rotate +pi/2 the second to rotate -pi/2 the third to rotate +-pi ...
-1
votes
2answers
55 views

Problem of repetition

I have encountered a problem concerning the repetition of the program that means it executes once (since the sensor passes to 1 it calculates 5 seconds (the sensor is still at 1) after the lamp is lit)...
0
votes
4answers
51 views

How can I hook up multiple MMA8451 accelerometers, (I2C protocol) using one Arduino Mega?

How can I hook up four (adafruit) MMA8451 accelerometers (using I2C protocol) using one Arduino Mega? What I'm confused about is I only have one SDA and SCL on the Arduino Mega obviously. So how can I ...
0
votes
1answer
28 views

Problem with String& argument of a function

I am trying to send SMSs using a GSM module with Arduino Mega. I have followed a tutorial and downloaded the SIM908IDE100 library. I am using the function SendSMS(String&, const char [27]);. It ...
0
votes
0answers
19 views

Connect three android to one arduino mega

Android Arduino Mega SerialPort1 SerialPort2 SerialPort3 Is it possible to connect three Android tablets to the Arduino mega through three SerialPort? Rx1 Tx1; Rx2 Tx2; Rx3 Tx3 I managed to connect ...
0
votes
1answer
35 views

How can I compare two serial port readings on Arduino Mega?

I'm writing some code that compares information from two Arduino Unos by an Arduino Mega 2560. The problem that I'm having is that when I read the information coming in through Serial1 and Serial2 on ...
0
votes
0answers
37 views

How I can connect module GSM SIM800L?

I bought a GSM module, and I want to connect it with Arduino but I have a problem. I linked GSM SIM800L with regular LM2596 12 V 2 VA I changed tension to 5 V, So far the GSM is ...
0
votes
0answers
47 views

Arduino Mega with SIM800L running Modbus TCP/IP

I'm trying to set up an Arduino Mega with a SIM800L module and trying to get Modbus TCP running on said Mega. I've set Modbus TCP over wifi and serial before but I used libraries for those. The ...
0
votes
1answer
21 views

Is my Realtime Clock Locking Up My Arduino? If so, how would I solve it?

I am having a very strange issue with the realtime clock in Arduino that I cannot seem to solve. Basically, I have a program that logs data from a terrarium kit and saves each session to an SD card ...
0
votes
1answer
23 views

How can I scan for a HIGH signal on digitalRead during the main loop, while running other things?

I'm working on a program which listens for certain bytes on serial through an if/then/elseif ladder. I want to also check if a pin (say, A15) has been given a HIGH state, by another Arduino with ...
0
votes
0answers
14 views

how can i solve my problem i have correct port[COM] and its name board [duplicate]

this is error happen when i upload the sketch on my arduino mega2560 : avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): ...