Questions tagged [atmega2560]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
28 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 ...
0
votes
0answers
39 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
22 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
0answers
95 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
31 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
63 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
29 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
49 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
94 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
75 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
56 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
51 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
89 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
96 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
263 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
35 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
57 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
80 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
75 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
63 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
20 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....
0
votes
0answers
46 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
53 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
47 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
40 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
82 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
46 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
84 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
96 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
78 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
88 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
102 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
195 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
116 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
69 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
125 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
227 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 ...
2
votes
1answer
143 views

I2C communication between arduino and raspberry pi breaks under stress for unclear reasons. Why?

I am having a behavior I cannot explain while using arduino mega as a I2C slave for a raspberry pi master. I am showing here an idealised program that shows the issue. I experience pretty much the ...
0
votes
1answer
44 views

Concern myself with current draw from digital pins used as INPUT with internal pullups?

My project is using a genuine Arduino Mega 2560, probably 3-4 yrs old since purchased (I don't see any revision numbers on the PCB). It's being used to read a lot of switches, buttons and drive some ...
1
vote
2answers
264 views

How to count the number of rising edges on DS3231 rtc?

I am using a DS3231 rtc and I would like to get millisecond accuracy from it so I decided to use the 32kHz generated clock from it. I wrote a code that would count the rising edges or falling edges ...
3
votes
1answer
211 views

How to wake up Arduino with an rtc?

I am doing a data logger with an Arduino Mega2560 and I want to use a code to make it sleep when no measure is needed and wake it up with an RTC when time comes. The reason I want this is because I ...
0
votes
1answer
79 views

Why is Serial Print causing different behaviour based on where its located

Im trying to test out these two motors I have where I need to call a function from the loop. I only want to call this function once so I made a quick little if statement to have the program only run ...
1
vote
1answer
203 views

Set PWM by period? And have it variable?

In this other stack QA I'm asking about generating a pulse signal with a period ranging from 63 ms to 6.5 ms. There is a popular PWM library however it doesn't compile and also since 63 ...
0
votes
0answers
813 views

OneWire with DS18B20 digital sensor only works on the I2C (20 and 21) pins of my Mega?

I am using an Arduino Mega to read a DS18B20 temperature sensor using the OneWire library in the code below which I got here: #include <OneWire.h> #define DS18S20_Pin 20 //DS18S20 Signal pin ...
0
votes
1answer
203 views

Maximum sampling rate of Arduino Mega2560

I'd like to know what is the maximum sampling rate achievable while using ADC on Arduino Mega2560. Thanks
1
vote
1answer
39 views

Serial Port fails with speeds greater than 19200

In Arduino Mega 2560 R3, properly selecting the Serial Monitor bauds, this code works with #define R 38400, but for some reason, not with #define R 19200 (?), #define R 38400 int rate=R; ...
0
votes
1answer
55 views

Velleman KA02 not working on Mega 2560 r3

I have a Velleman KA02 audio shield. When I use this shield on an Arduino UNO R3 with this sample code, it works. And by "work" I mean when I interact with the Serial Monitor (by pressing Y, for ...
-1
votes
0answers
71 views

Programming AFE4404 using Arduino mega2560

I'm facing difficulties programming an AFE4404 using the arduino mega2560. I'm using AFE4404 I2C to program it. I tried most of the code I found online with minor changes to get all the LED and ...
-1
votes
1answer
70 views

Controller freezes

I am using atmega 2560 as main(master) controller and other 5 salve 2 atmega 8 and 3 atmega 328p, there is two device with analogue output connected to main controller atmega 2560 through ads1115 ...
1
vote
0answers
68 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...