Questions tagged [atmega2560]

Low-power 8-bit AVR microcontroller with 256kB flash.

Filter by
Sorted by
Tagged with
1
vote
0answers
38 views

Program a mega2560 from a different Serial port

I want to be able to use my HC-05, currently on Serial3 to download code to on my 2560 from a connected android tablet. I'm currently running MegaCore, which has optiboot on it. I've looked for ...
1
vote
1answer
32 views

Mega2560 programming megacore avrdude: Device signature = 0x000000

I have two sunfounder mega2560s. I am using one as an ISP programmer and the other is my target. The programmer has the original bootloader on it. I have placed the ArduinoISP sketch on my programmer ...
2
votes
1answer
66 views

Loading code to a mega 2560

As part of my application, I need to be able to update the code on my mega 2560 in the field with a download from the internet. I have found this code in the AT Mega 2560 data sheet ;-the routine ...
1
vote
0answers
35 views

ShieldBuddy TC275 as a drop-in replacement for MEGA 2560?

I have an autonomous wall-following robot based on a Mega2560, that is just about maxed out in terms of memory usage and speed. I'm starting to have weird intermittent failures with previously ...
1
vote
1answer
79 views

How do I temporarily disable TIMER5 Interrupts?

I have a fairly complex autonomous robot program that is getting into trouble when executing controlled turns. I constructed a very small program to test just the turns, and this works fine. When I ...
0
votes
1answer
95 views

How to change i2c address of Lidar Lite v3 using LidarLite library (Solved)

I have 2 Lidars which are Lidar Lite v3 and Lidar Lite v4, both of these sensor having the same i2c address. I'm trying to change my Lidar Lite v3's i2c address on arduino mega2560 using a function ...
1
vote
0answers
72 views

Program only works with Serial.begin

My program only works when the following line is added: Serial.begin(9600); When this is disabled/removed the program no longer switches output state regular I'm using an Arduino Mega 2560. When the ...
1
vote
0answers
50 views

sim808 init error when trying to use DFRobot to get gps

I'm using "mega 2650 pro" Arduino with SIM808 BK-808 V-3.1 and I connect the vcc for the sim808 to 5volt pin in the arduino, and the arduino connected with laptop usb. and I add a sim to the ...
1
vote
1answer
38 views

where is the digitalPinToInterrupt macro defined

I am new to arduino, and it's confusing to me how you can just write code in the IDE and use functions or macros such as #define ISR() in the avr-libc library without having to include the header file ...
1
vote
0answers
47 views

ISR for timer on Arduino MEGA gets called only once

I am trying to write an Arduino code to blink LED using timer 4 on Arduino MEGA (atmega2560). I resetted the timer registers, and entered all the necessary values to bring to 16MHz to 1Hz (rescalar = ...
1
vote
0answers
58 views

it just gets too hot . any way of cooling it?

there i just got started with the arduino mega2560 . i tried 8x8 matrix tube and after ~30secs i found the atmega2560 a bit hot that i can melt a small amount wax on it ! is there any sort of heatsink ...
1
vote
0answers
36 views

Interrupt keeps firing

I have wired up a 6502 to run a program, and to check what is happening on address and databus, I have built a monitor setup with an Arduino Mega2560. The monitor should read from the buses, each time ...
1
vote
0answers
77 views

Arduino mega PinChangeInterrupt with 16 bit timer

With reference to this question ::I have written a program by using 16-bit timer, The program is as follows . volatile uint32_t ovfCount = 0; struct Pulse { uint32_t last_toggle; uint32_t width; ...
1
vote
0answers
48 views

Fail to burn bootloader into standalone atmega2560

I am making a project where I use standalone atmega2560. I used arduino mega schematic to put all necessary components so atmega2560 would be working. I tried to burn bootloader into it using arduino ...
1
vote
0answers
42 views

Upload of software working unreliably

I've got a new Keyestudio ATmega2560 (compatible with Arduino Mega 2560) board and was trying to upload a simple sketch. I noticed that both the Arduino IDE and PlatformIO were unable to do so, they ...
0
votes
0answers
32 views

Using 433 MHz transmitter and receiver pair on a single Arduino Mega 2560

Folks, Is there a method available to set the 433 MHz transmitter to keep sending a message and the receiver to receive the message on the same Arduino Mega 2560? I saw an answer elsewhere with the ...
1
vote
1answer
195 views

Programming custom Arduino Mega with Arduino Uno

I'm making a custom board with AtMega2560-16AU as MCU and CH340G as bootloader (schematic can be seen in the picture). I have printed the custom PCB and soldered everything in place now I want to ...
2
votes
1answer
34 views

Testing 433MHz Transmitter

Folks, There is a document named "Complete Guide for RF 433MHz Transmitter.pdf" available in the GitHub. There is a a connection diagram showing the Data pin of the Transmitter connected to ...
0
votes
0answers
118 views

RF 433MHz Sniffer

Folks, I am trying to compile and load the "RCSwitch : ReceiveDemo_Advanced". When compiled, it comes up with an error message Output was not declared in this scope. There is an "output....
1
vote
1answer
35 views

Problems in calculating and printing long unsigned integers

I have this code which provides an erroneous unsigned long number. CODE: char buff[100]; int unsigned long bytes; bytes = 48 * 70 * 144; sprintf(buff,"%lu bytes\n", bytes); BTPort.print(...
1
vote
0answers
70 views

Arduino mega reads ps/2 keyboard in C without arduino library [closed]

I want to read the input of an ps/2 keyboard. I connect the keyboard by a connector to arduino mega 2560. Clk to pin 2 and data to 30. Now my question how can i program in C that when I click any key ...
1
vote
1answer
126 views

How to identify pinout of ATmega 2560 derivative board?

My 3d printer, Creality Ender 4, has an ATmega 2560 chip based card, and I need to identify the number associated with a particular Pin. I read, on the official Arduino website, a simple tutorial in ...
3
votes
0answers
76 views

Adafruit_LEDBackpack library interfering with analog input reading

I'm trying to do something I think would be simple. I'd like to read the input of a electret microphone board and update the Adafruit 24-segment LED Bar Graph. I got each individual item working ...
0
votes
1answer
114 views

Can Only Upload Arduino Sketch Once to Custom Mega2560 Board

I created a custom Arduino based off the Mega2560 R3. It uses the ATMega16U2 uC as the USB interface between ATMega2560 uC and the PC. The bootloader on the 2560 is uploaded by using an Arduino Micro ...
1
vote
0answers
101 views

CC2541 Bluetooth AT Commands not work for any Commands sended from Serial

i bought the HM 10 Bluetooth controller (CC2541), i got connect on this device through Serial Bluetooth Terminal (Android App) with Serial BLE menu this method not requires any pass and "...
0
votes
1answer
218 views

Get more PCINT capable pins on Mega 2560

I'm building kinda "ball game" for a total of 6 players based on these per-player specs: 1 stepper motor with 4 pins 2 end stops (start & finish) per motor 1 finish LED 3 holes to score,...
0
votes
1answer
147 views

SPI transactions in Arduino

I have a task where I should do SPI transactions in interrupt mode. Means I have to handle data in IRQ handler (both for tx and rx bytes). How should I approach? I have a arduino board (2560) and a ...
1
vote
2answers
486 views

Using HC-08 bluetooth module with arduino

I have an arduino mega 2560 and a recently purchased HC-08 module and the connection is as the following: Arduino | HC-08 VCC - VCC GND - GND 14TX3 - TXD 15TX3 - RXD When I power up the arduino it ...
0
votes
0answers
37 views

Sending array of bytes using serial communication from Mega 2560 to ESP 8266

The array is 16 analog inputs, till now these inputs are not connected to anything so they are random, except the first three elements of the array, connected to GND, in order to see the beginning of ...
2
votes
1answer
77 views

Why is their need of response time needed in esp8266 AT commands?

I am writing an AT commands firmware for esp8266 via connecting it to atmega2560. Now the question is how will I come to know the response time for AT commands for writing its firmware to read the ...
0
votes
0answers
124 views

Atmega 2560 IR receiver returning random values with using NeoPixels

I am using atmega 2560 to control 590 LED lights with NeoPixels library. I also got an IR receiver connected so I could control the LED properties and it does work but only when the LEDs are not ...
1
vote
1answer
89 views

Strange Arduino Serial Behavior

I have a quirky question today. I have an Arduino MEGA 2560 with a very simple setup. It's connected to my pc over usb, and has one device connected on its onboard TX/RX2 port group. Whenever I open ...
1
vote
2answers
122 views

Am not able to call C++ function pointers from inline assembly

Due to some curiosity, I was trying to use some assembly with my Arduino MEGA 2560. I am not able to invoke a function from a c++ function pointer array. When I uncomment the call function, func_a ...
0
votes
2answers
24 views

DHT11 and Liquidcrystal setting cursor issue

lcd_key = read_LCD_buttons(); float temp = dht.readTemperature(); delay(1000); // lcd.setCursor(0,0); if(temp < 0) { lcd.print(temp); } if(temp >= 0.00 || temp <= 5.00) { lcd....
1
vote
0answers
74 views

I am trying to rewrite an RFID with a MEGA2560 and a RFID-RC522

I have been trying to rewrite an RFID tag so it is the same as my other one. I have code that will read both separately but I cannot find any already written for the MEGA2560 that will work for me. ...
2
votes
1answer
58 views

Servo motor troubles

The image is as clear as I can make it. Here are the basics of my problem. My program is meant to make 6 red LED lights in sequence fade in and out, toggle 5 white LED's on and off with a button, and ...
0
votes
1answer
57 views

Activating a defined macro in a class from main.cpp

Sorry if this question been asked. I'm trying to activate certain function in a class using a macro defined in the class from main.cpp. I'm using jrowberg MPU6050 library if that matters. main.cpp #...
0
votes
1answer
46 views

Passing struct from main.cpp to a class

Sorry if this question been posted but I couldn't find the one that matches my issue. I couldn't pass my struct values from the main file to a class. Any ideas? I got this: error: no matching ...
1
vote
0answers
96 views

Problem with I2C

I trying to make a project to write and i2c display from a renault megane vehicle. There is many people showing it but there is no code that i can use. So i buy a cheap analyzer and i can clearly see ...
1
vote
0answers
58 views

Using SMS to receive password, then to choose whether to turn the relay on or off

I'm trying to use SMS messages to turn a relay on/off but before doing that i need to have a password system before allowing the user to turn the relay on/off. Basically, you have to send the password ...
0
votes
1answer
97 views

How can I make a Parallax Servomotor move a water tap correctly and prevent from vibrations?

I am using Arduino Mega 2560 I have built an structure with plastic 3D pieces to move this water tap.: I am using the "Servomotor Parallax Inc 140 mA, 4 6 V" to rotate the tap: Some more images to ...
2
votes
2answers
111 views

Arduino Uno lag in simple loop

I have a simple Arduino sketch which I have been playing with on my Uno. The idea is simple, the user turns a potentiate (pin A2), when they pass a certain threshold a LED is turned on (pin 7). Here ...
0
votes
2answers
95 views

Is possible use Macro F() with Integer and Other types of variable?

i have a sketch that is using very memory RAM of my Atmega2560 (is a giant project), and i need use various "println" because i have a TFT screen and i need to show data on the screen to user see. So, ...
0
votes
2answers
108 views

Will bootloader communicate via TX0 / RX0

I'm fairly new to Arduino programming but have a good deal of experience with low-level programming early processors, having originally cut my teeth on Z80, 8088, etc. I'm looking at developing a ...
1
vote
2answers
175 views

what will be the sampling frequecy of my arduino Mega 2560 code. How would I calculate it?

void setup() { // initialize the serial communication: Serial.begin(9600); pinMode(10, INPUT); // Setup for leads off detection LO + pinMode(11, INPUT); // Setup for leads off ...
2
votes
2answers
229 views

ADC register always returning high

Regardless of whatever voltage at A0, the software is always returning high (1023) volatile unsigned char* ADmux = (unsigned char*) 0x7C; volatile unsigned char* ADCSRa = (unsigned char*) 0x7A; ...
0
votes
1answer
134 views

C++ State Machine / Wpmf-convesion

I'm quite a newbie using C ++. I am trying to implement in C ++, the state machine described in this link for C language: https://barrgroup.com/Embedded-Systems/How-To/Coding-State-Machines. I have ...
1
vote
0answers
71 views

Arduino code does not function when relays are powered

I have a mega arduino, which is supposed to to power 4 relays using 4 touch sensors TTP 223, the relays are 5V coil and 220V. the arduino is powered by a 5 V adapter "mobile phone charger" and it ...
0
votes
1answer
151 views

Floating power supply for Arduino - Is it still connected to the USB ground?

I am trying to power my Arduino Mega 2560 from a benchtop power supply. I plan to essentially feed in a 9V supply directly on the Vin pin and connect the GND pin to the floating ground pin on the ...
1
vote
0answers
298 views

Advice needed for powering Multiple HX711 with Arduino Mega

I have a project where I need to use multiple load cells (6-8), with individual HX711 for each load cell, which need to be powered simultaneously. I am not sure if I can power all the HX711 with 5V ...