Stack Exchange Network

Stack Exchange network consists of 174 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
255 views

Problem when read data from Schneider PM1200 with Arduino Mega 2560

Mission Read data from registers of Schneider PM1200 by Arduino (Modbus Master) Link : http://www2.schneider-electric.com/resources/sites/SCHNEIDER_ELECTRIC/content/live/FAQS/212000/FA212509/en_US/...
-1
votes
1answer
37 views

Arduino cannot sync

I have seen many of these problems and followed all the instructions i can find, i made sure the com was the correct one, i made sure th e drivers were installed. I cannot upload my sketch...anyone ...
0
votes
1answer
150 views

4x4 matrix keypad - Multiple inputs cause extra readings

I have the following matrix keypad - I am using this as a sort of controller with my Arduino (Mega2560) but I can't get real multiple inputs to work. I am able to have say two individual keys ...
0
votes
0answers
20 views

Can we code XBee more than once?

How many times we can rewrite code in XBEE, can we write code more than one or once a code is written it cannot be overwritten
-2
votes
2answers
68 views

How to make an I2C device undetectable

Please bear with me as I am a bit new to electronics and arduino. I am trying to have multiple sensors connected to an Arduino Mega through I2C Bus. That is working but I would like to have the ...
1
vote
1answer
62 views

How to speed application up (if possible)

I have an ARD 2560, which I communicate with through a special written Delphi 7 program (USB handling is done in the D-7 program). I use the command syntax: <REG> <COMMAND) <:> <...
0
votes
0answers
62 views

GSM Shield 2 Arduino Mega 2560

I have Arduino Mega 2560 and GSM Shield 2 M10. The shield has green + yellow + yellow slow flash, so I think that it has connection to the GSM net. There is an extra ground to the Mega They have dot ...
0
votes
1answer
837 views

Elegant solution for refreshing TFT display content?

I'm currently drawing black boxes over old content before displaying constantly refreshing content on my display, so for instance to display temperature: if (sensorTemp != nowTemp){ nowTemp = ...
0
votes
1answer
115 views

What is better approach for non blocking pid algorithm?

I'm developing software side for 3 axes robot where are 360° continuous rotating servos used Documentation here these servos have its own feedback system so it's possible to control it's position ...
0
votes
0answers
565 views

Trying to get a ILI9341 TFT to work with UTFT library

I'm currently trying to fill out the constructor but I'm not sure what's what... The constructor of the UTFT library goes as follows: UTFT(Model, SDA, SCL, CS, RST[, RS]); Where the last bit is ...
1
vote
1answer
63 views

How to count the voltage pulses of a digital temperature sensor using Arduino Mega Atmega2560? [closed]

I have a digital temperature sensor which gives digital output in the form of current pulses. The number of pulses corresponds to a particular temperature. I have converted the current pulses to ...
-2
votes
1answer
46 views

How to perform timer operation for Traffic light control using Arduino Mega? [closed]

Anyone here help to me to complete my project. My project is based on traffic light control along with the operation of vehicle barrier. Also i need to control/reroute the signal incase any emergency ...
0
votes
3answers
44 views

WS2812 HELP. Need name of Unkown component [closed]

https://i.imgur.com/u5SIvLo.png I need to know what the little "thing" that i marked in blue is and how it works. Thanks. picture taken here: https://www.sparkfun.com/products/13282
0
votes
0answers
254 views

SoftwareSerial with ESP8266 not responding

Sorry im really new using arduino, im trying to learn how to connect an arduino to wifi using the ESP8266. Im following a tutorial that provided this code: #include <SoftwareSerial.h> ...
0
votes
1answer
99 views

Arduino: using digital pins to emulate USB device

Is there any "easy" way to emulate USB keyboard or gamepad using digital pins on Arduino Mega? I looked at Uno-Joy/Mega-Joy, but I dont find firmware changes appealing.
1
vote
1answer
75 views

How to know the external interrupt origin from the ISR

I'd like to know if there is any way to know what is the origin of an external interrupt by programming inside the ISR. I know I can use a different ISR for each external interrupt and that works but ...
0
votes
0answers
48 views

Arduino Mega 2560 does not work on Debian / Ubuntu [duplicate]

I was using Ubuntu to program my arduinos. The Arduino uno works perfectly but the Arduino Mega 2560 does not upload the .hex files, serial communication works perfectly. I already changed the ...
0
votes
2answers
303 views

Keypad password check issue

I am working on a school project, basically I have to create a lock system that opens a fictive gate when the correct code is entered. We have been asked to simulate our system before actually ...
0
votes
2answers
50 views

Changing Arduino Outputs into Binary

I am new to Arduino so please give me some advice on this really simple problem. I am currently using an Arduino Mega in a school project to make 4 capacitive sensors which are supposed to receive an ...
0
votes
0answers
600 views

avrdude: Expected signature for ATmega2560 is 1E 98 01

I can not figure out what's wrong, maybe I'm missing the correct driver but I do not know how to check. When I try to send any script with the blink for example I get the following message avrdude: ...
1
vote
1answer
481 views

cannot resolve overloaded function… error

I started to learn Arduino and I want to get an input from user to blink LEDs. I wrote under the void loop() section input codes. After i compiled it and Arduino IDE gave me this: "Arduino:1.8.5 (...
0
votes
0answers
308 views

Why I don't get the SETUP Command from the MDB Protocol

I hope this is the right place to post this and that I would get some help. I am trying to make the Arduino Mega a peripheral to the MDB protocol. I am trying to use it to emulate a Bill Validator. ...
0
votes
1answer
86 views

card.init(SPI_FULL_SPEED,SD_CS_PIN) returns false for Arduino Mega

I am working with a music shield, I have got my code from this site https://www.waveshare.com/Music-Shield.htm it works fine with arduino UNO but when I try to use it on MEGA it give me errors, Well I ...
0
votes
1answer
67 views

UART communication, is it possible to use only the TX line?

I am trying to connect an ESP-01 with an ArduinoMega through the serial port of both, as they use different voltage levels I would need a voltage divider between the TX pin of the Mega (pin 1) and the ...
5
votes
2answers
1k views

Can I force Arduino Not to be powered by USB?

I'm building a 3D printer and I'm using a Atmega2560 + RAMPS board. The whole thing is powered by an ATX PSU (12v for motors and stuff, 5v for the Arduino), but when I plug in my USB cable, I can't ...
-2
votes
2answers
78 views

Passing the result of the variable to another variable

Hello everyone i'm figuring if this variable can be passed to another variable. I'm using RFID RC522 Here is the code: #include <SPI.h> #include <MFRC522.h> #define RST_PIN ...
-1
votes
1answer
225 views

Determine an earthquake intensity/magnitude level using ADXL345 and Arduino

I want to create a project using Arduino that monitor the Earthquake. I used an ADXL345 Accelerometer to detect if there is an earthquake. I used the Adafruit ADXL345 example to determine a ...
0
votes
2answers
45 views

Arduino tone frequency isn't always precise

I'd like to play an asynch 'beep' sound (2.5kHz, pin 8) on an Arduino Mega with several other modules connected. I write them here, just for the record: SDCard reader and RFID reader through SPI bus, ...
-1
votes
1answer
3k views

ESP8266 Connection to Arduino Mega 2560

Im trying to connect my esp8266-01 to my arduino mega 2560 to get the code working from the following video tutorial found on youtube: https://www.youtube.com/watch?v=zGgUfAB4m24 This is the code ...
-1
votes
1answer
40 views

How do I get multiple readings(binary) based on my arduino output?

I am new to arduino and therefore not much experience in handling codes, please be forgiving and help me! For my school project, make use of arduino to make 4 capacitive sensors (which has already ...
0
votes
1answer
903 views

Can not initialize ESP module in Arduino SoftwareSerial

Can not initialize ESP module in Arduino SoftwareSerial's example sketch in configuring WiFi module. In the sketch it tells: #include "WiFiEsp.h" // Emulate Serial1 on pins 6/7 if not present #...
3
votes
3answers
620 views

Using While Loop For Accurate Delays

I was trying to get the timing in between events right, (Event time is around 150ms and i need it to be accurate within +-1ms) and came upon this implementation. The actual application will not be ...
-1
votes
1answer
170 views

NodeMCU doesn’t send the sensor read while powering with Vin

I have connected a NodeMCU ESP 12 with the Vin (6 volts) shared with 2 other NodeMCU. The sensors are getting power from the NodeMCU but the NodeMCU isn’t sending to the ThingSpeak cloud unless I ...
0
votes
0answers
5k views

Arduino mega to Arduino mega commuction with RS485

I trying to communicate two Arduino mega's using RS485. Am able transmit thought the serial channel but another end is not receiving.I have used the below diagram as reference to circuit The Code ...
1
vote
1answer
425 views

Arduino MEGA 2560 - PWM in case statements not working

So I am using Arduino to control RGB Strip light, the analogueWrite(Pin,Value); Works with the prebuilt AnalogueWriteMega example - on pins 8, 9, and 10. When I move this into my program, Pin 8 still ...
0
votes
1answer
192 views

How to create custom bootloader with accompanying program loader for ATMega2560

Just for some context, I have created a custom board based on the ATMega2560. I currently have the original Arduino Bootloader for the ATMega2560 and have no problems uploading code via the USB Port ...
0
votes
2answers
234 views

Communication between Arduino Uno and Mega

I am working on a project which uses a set of sensors (HC-SR04). These sensors use pins 2 to 13 of the Arduino Uno. Here you can find the board: . I also want to add an MP3 shield (VS1053B) to it ...
0
votes
0answers
58 views

Can't power off stepper motor when not being driven

I've tried using various classes from the AccelStepper library to get my stepper driver to switch off its enable pin when the motor isn't being driven to a position. I've got a sketch which allows me ...
1
vote
2answers
411 views

Controlling multiple solenoids with arduino

I was wondering how I could connect multiple 12v solenoids (more than the 53 allowed on mega because of the pins) on the Arduino Mega 2560 to get it to control the keys on a piano/keyboard/organ. ...
2
votes
2answers
1k views

Can you use digital pins as PWM output?

I am currently working on a robotics project that requires 16 PWM outputs to control 16 servos. Is it possible to use Arduino Uno's digital pins as PWM output pins through code? If it is not possible,...
0
votes
0answers
422 views

Arduino Mega not detecting in device manager for laptop

The Arduino mega 2560 works fine on my PC and friends laptop (when I say fine I mean it is being detected). However if connected to my laptop am working on it does not get detected in the device ...
3
votes
1answer
110 views

Can't display any number using 74HC595

I just started using elegoo UNO R3 and I have the problem displaying different numbers on the segment display using the 74Hc595. I have no problem with the uploads and the circuits are working fine. ...
0
votes
0answers
29 views

Servo not working over SDA transmission

I've used such code before, which worked successfully where one board was connected to Blynk app and transmitted data, but when I got into simpler stuff, servo just stopped working. Note: I'm using ...
1
vote
1answer
42 views

Do Arduino Megas Burn Out? [duplicate]

Im building a bedside alarm clock/home assistant. I have a few buttons that input, an LCD display and some RGB LEDs. The LCD and RGBs are only on when commanded to be on. I was wondering if I could ...
1
vote
2answers
63 views

When i press a button to subtract 1 from 5 it skips to 3

When i press a button to subtract 1 from 5 it skips to 3, it's the same when I add 1 to -5 it skips displaying - 4 and goes straight to -3. This is the code that i am using: //Testing the use of ...
-2
votes
1answer
650 views

How do I connect my Ublox neo 6M GPS Module with arduino mega 2560? [closed]

I tried connecting RX of GPS to Pin 18 and TX of GPS to Pin 19 but I get an error that No GPS is detected,check wiring.VCC of GPS to 5V. I have set baudrate to 115200.I am trying DeviceExample code ...
-1
votes
3answers
61 views

How do I create boundaries for the possible values of an integer? [closed]

I want to create an integer whose total value cannot go beyond a range of numbers when added to and subtracted from. For example, if the "total_value" started at 0 (of a total possible range between -...
-2
votes
1answer
53 views

What does drawmenu() mean [closed]

Can anybody tell me what drawmenu() means, I got an answer on here that has the term on and I don’t quite understand it, I’m very new to this. Any help you can give will be greatly appreciated. ...
1
vote
5answers
148 views

Detect current in car handbrake circuit

Using Arduino, how can I detect that the switch is on? I have access to the wire within the red rectangle only. That's because the switch is closely connected to the car body (ground). When the ...
-1
votes
1answer
980 views

Creating a simple menu for Arduino LCD button shield [closed]

I am trying to create a very simple menu to use with my lcd keypad shield, I have tried looking into how tutorials say to do this but I don’t really understand them. Would it be possible to do it by ...