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
38 views

Change values of timer using I2C

I'd like to alter the "LED_T_ON" values using an I2C enabled device (i.e. RPi) Code for Arduino Mega slave: //slave #include <Wire.h> #define SLAVE_ADDRESS 0x08 const int PWR_LED = 43; int ...
1
vote
1answer
94 views

Fast PWM working with int main(void) but not with void setup()

board: Arduino Mega (ATMEGA2560) I want to generate pulses using timer1 configured as Fast PWM, this is my code which works fine: #include <avr/io.h> int main(void) //void setup() { DDRB ...
0
votes
2answers
62 views

Powering USB cable that powers Arduino with regulated 5V

I am having an issue with external loads causing the computer I have my Arduino connected to to momentarily drop out, which causes the Arduino to lose USB power momentarily and the port drops out and ...
0
votes
1answer
63 views

nodemcu pins + sensors reading values

what are the SDA & SCL pins in NodeMCU? (Pins 20 & 21 in Arduino MEGA2560) I already implemented a simple project to read 2 accelerometers values from Arduino and send them through wifi to ...
-2
votes
1answer
52 views

how to establish a connection between an arduino and a web server? [closed]

I want to establish a connection between my arduino mega ( which is connected to an ethernet shield so internet access is available) to a web server. Any idea how the code should be? I searched for ...
0
votes
2answers
135 views

if two arduinos are connected by I2C and one of them is using an ethernet shield, does that grant both of them access to the internet?

i have two arduino mega and they send data to each other by an I2C connection. But one of those arduinos is connected to an ethernet shield which allows it to send data to a web server. Being both ...
1
vote
0answers
36 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 ...
0
votes
1answer
169 views

Need lot GPIO pins on arduino mega - what are restrictions?

I would like to use as much as possible GPIO pins on Arduino Mega especially with (mis)using pinMode(x,INPUT); and pinMode(x,INPUT_PULLUP); to achieve two things at the same time - drive something ...
1
vote
3answers
448 views

how to set the pin 13 only HIGH for 1 minute if sensor at pin 8 give HIGH?

int PUMP = 13; int sensor = 8; int val; void setup() { pinMode(13,OUTPUT); pinMode(8,INPUT); } void loop() { val = digitalRead(8); if(val == HIGH) { digitalWrite(13,HIGH); } ...
-1
votes
1answer
42 views

Making a distance sensor for human interaction [closed]

I want to make a sensor that senses a person between 1.5 m and 0.2 m, connected to an LED that is on 100% at 0.2 m and 1% at 1.5 m and gradually scales. Is an ultrasonic sensor the best sensor to use ...
4
votes
2answers
423 views

How to deal with unusual neopixel grid

I have built a custom installation in my home with 896 WS2812 LED driven by an ArduinoMega 2560 and powered by several rails just fine. However, the installation is arranged in a checkerboard-like ...
2
votes
1answer
575 views

SIM900 and Mega 2560 not sending SMS

I just bought a SIM900 Arduino shield from AZDelivery. I only have a Mega 2560 board, thus I am trying to use this although most examples (like the tutorial from AZDelivery) are with the Uno board. I ...
0
votes
0answers
57 views

Neogps Average weird output

I'm trying to program an Arduino to display the current, average, and barrier GPS locations. I keep getting weird output. I started out with the neogps average example and modified it until I got the ...
0
votes
1answer
51 views

Communication between 2 Bluetooth modules

I successfully connected two Bluetooth modules, HC-05 and HC-06 like on this website: http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/ I ...
0
votes
1answer
337 views

How can I send and receive data from an arduino uno to arduino mega using I2C?

hello guys I am trying to send data as a string from an arduino uno to another arduino mega and I am a beginner. But I have read about the I2C connection where we connect the RX to TX oppositely. I ...
0
votes
1answer
1k views

Looking for Power Bank with “Always-On-Feature” [closed]

I want to build a mobile weather station with an Arduino and some sensors. I want to use a power bank as power source. The Powerbank should support "Always-On", because weather data should not be ...
1
vote
1answer
108 views

GPS showing incorrect speed

I am using Arduino ATmega 2560. When i am using "AT+CGNSINF" command to get GPS value, sometimes it showing incorrect speed. The correct speed should be (50-60)km/h but sometimes it showing (200-300)...
0
votes
1answer
230 views

Arduino Mega not recognized by device manager

My lab partner and I are working on a project for school and we are using an Arduino Mega 2560 for prototyping. The board was working just fine until, out of nowhere, the board was not being ...
1
vote
1answer
144 views

PROGMEM Corrupted Array

I am trying to store a large number of values into a couple of arrays using PROGMEM, but I am finding that a few of the values are read back corrupted. I am storing just 1s and 0s, but when I read ...
3
votes
2answers
556 views

What are these components in Arduino Mega Schematic?

I was looking at Arduino Mega's reference schematic here and trying to understand how the circuit functions. However, I am unable to understand what these schematic symbols (marked in black rectangles)...
0
votes
1answer
70 views

Linking Mulitiple Arduino's

I have a project in which several Arduinos will be running independent programs. I would like to use an Arduino Mega as the main controller. It will receive input from a variety of switches, as well ...
0
votes
1answer
76 views

NodeMCU not responding AT after blink app

I've just bought NodeMCU LoLin ESP8266, I tried to send AT commands (after spending days on ESP8266-01) and everything was okay. Than I've uploaded the Blink example to the board, after that moment it'...
0
votes
1answer
4k views

MEGA I2C and interrupts on 0,1

Looking at the pinout for the Arduino MEGA: I see that Pins 20 and 21 can be both SDA and SCL or Interrupts 0 and 1. If I'm using an Adafruit I2C 16x2 RGB LCD Shield connected to the SDA and SCL ...
1
vote
1answer
52 views

My Arduino keeps telling me the button is being pushed

My code is simple simple for the button. There is no reason why this shouldn't work... I think. I honestly have no clue what's wrong. Output: Code: #include <SPI.h> #include <MFRC522.h>...
0
votes
0answers
36 views

MFRC522 read anomalies

I'm wondering if there's anyone that may be able to shed some light on a issue I'm having with an Arduino Mega and MFRC522 NFC reader. Before I describe the particular issue I'll point out that the ...
0
votes
1answer
39 views

Arduino with stepper motor

I'm trying to control a stepper motor for my FYP with an Arduino Mega. I tried code form examples, stepper one revolution. It worked when I uploaded it but if i turn the power off during the half ...
0
votes
0answers
156 views

How to burn the bootloader of an Arduino Mega using the AVR MKII ISCP?

I somehow fubared my Arduino Mega 2560, and it stopped responding to normal uploads. I tried using the IDE to burn the bootloader, but it gave me the same connection errors as the normal upload ...
0
votes
1answer
111 views

SH1106 - Transferring long buffer via SPI

I am using an SH1106 and am creating my own driver for it. Nearly everything is doing great with about 2/3ms send time using transfer16. I did notice however that I can use transfer with a buffer and ...
0
votes
1answer
299 views

servo.read() starts at negative value, no matter where servo actually is

I don't like how my servo quickly jumps to the default middle position, so I commented out the line where DEFAULT_PULSE_WIDTH is set in Servo.cpp: //servos[this->servoIndex].ticks = usToTicks(...
0
votes
1answer
819 views

Unable to connect and configure ESP8266 wifi module with Ardunio Mega

I try to connect Ardunio Mega with ESP8266 wifi module. Wiring diagram mentioned below: I am using Ardunio IDE - For AT command test I was open COM monitor and selected 115200 baud rate and set to ...
-1
votes
1answer
778 views

Arduino GSM Shield NET and STATUS led turn off after a few seconds

#include <GSM.h> // PIN Number #define PINNUMBER "" // initialize the library instance GSM gsmAccess; // include a 'true' parameter to enable debugging GSMScanner scannerNetworks; GSMModem ...
0
votes
2answers
101 views

What is wrong with this code?

So I am writing code to control a servo with an RC radio. I am using an Arduino Mega. I get this error whenever I compile. I am not that experienced with Arduino so I am probably not doing something ...
-2
votes
1answer
268 views

Arduino IDE : 'tansig' was not declared in this scope

I am working on a simple NN sketch, everything looks fine and also i have added #include math.h .but when i try to compile it gives an error i-e 'tansig' is not defined in this scope I am trying to ...
0
votes
1answer
31 views

On a motor after a continuous input of a certain amount of time

I would like to produce an output after a constant input is detected for a certain amount of time. Below is a simple code of what I am trying to do minus the time factor. Can someone help me on how to ...
-2
votes
1answer
88 views

Need assistance with serial data between PC and Arduino Mega 2560

With help from a friend I have written a sketch for my Mega2560 that talks to a PC application via serial at 9600 baud. The PC application send an S which instructs the mega to send variable values ...
0
votes
1answer
88 views

Arduino Mega Sensor shield

I'm using an Arduino Mega Sensor Shield on a Mega 2560 board and so far I have 12 servos attached to it from PWM pins 2 to 13. I want to add 5 more servos but there are no more PWM pins. So which ...
0
votes
0answers
52 views

Cons of using timer0 with external input?

I'm working on a project of differential drive control in which I use speed encoders for the odometry. I count the number of rising edges using counter0 and counter5 (on Arduino Mega 2560), which ...
-1
votes
1answer
40 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
218 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
24 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
75 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
66 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
2answers
1k 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
144 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
728 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
74 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
55 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
1answer
129 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
85 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 ...