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.

Filter by
Sorted by
Tagged with
4
votes
1answer
48 views

Arduino Array Scope with SPI

when I try the following code the SPI works correctly (see oscilloscope plot) #include <SPI.h> void setup() { SPI.begin(); } void loop() { SPI.beginTransaction(SPISettings(100000, MSBFIRST,...
1
vote
1answer
39 views

Arduino u8glib Problem

I am Trying to make tetris on a 128x64 oled 1.3", and I am using the u8glib library. Here Is My Code: #include "U8glib.h" U8GLIB_SH1106_128X64 u8g(13, 11, 10, 9); int val = -53; int ...
1
vote
0answers
31 views

Can't get 433 RF to work

I am trying to have two Arduino's to communicate to each other via 433Mhz units. My project is a bit more complex, but I since it was notworking I reduced it to most basic form in order to exclude the ...
-1
votes
0answers
30 views

Arduino load cell symbols in serial monitor

I am putting together strength testing system using and arduino mega, load cell amplifier and meltrons load cell. I've tried upload my code into the serial monitor, but instead of reading numbers I'm ...
0
votes
1answer
26 views

Library the pulls ID3v2 info from MP3s

I'm using an Adafruit Music Maker with a TFT screen on my Mega 2560. I can pull ID3v1 data from the end of an MP3, but I'd like to get the ID3v2 data as I can then push the album cover art to the TFT ...
0
votes
1answer
22 views

Mega 2560 with Adafruit Music Maker and TFT - Pin reroute

I'm building a custom headunit for my motorcycle using the Arduino platform. I wanted to try it as the modular nature of the board and shields looked very versatile. While there does seem to be plenty ...
-1
votes
1answer
62 views

i am tying to make a automated parking lot with a gate, sensor, button, keypad, how can i time how long has each car spent inside?

the project requires a automated parking lot, I have been able to connect and function the sensor and button for exit and enter, and the led(red lights when parking is full, green when there is spots)....
0
votes
0answers
20 views

Can I use more than 4 cases in switch? [migrated]

I am writing application for test jig using Arduino mega 2560, It is menu based program, I'm using Switch-case and I have 6 cases so far, until 4 cases code is working properly, once I'm entering 5th ...
0
votes
0answers
59 views

Bluetooth HID keyboard for ESP-32 or Arduino Mega

I want to use bluetooth Keyboard in my project. I made a cool rgb and sound controller using Arduino Mega. My pins are: 4 push buttons (4 pins) 4 Toggle Switches (4 pins) 1 key switch (1 pin) 1 Rotary ...
0
votes
1answer
44 views

How many ADS1115 ADCs can I connect to a single Arduino Mega 2560

I know we can connect 4 ADS1115s to an Arduino Mega 2560. Is there any limit on the number of ADS1115s we can connect to the Mega giving each a different address? I have to connect at least 36 ...
2
votes
1answer
113 views

get data from arduino using python

I am trying to read potential meter data from Arduino using python, with the program on Arduino as follows : #include <cvzone.h> SerialData serialData; int sendVals[2]; void setup() { ...
1
vote
0answers
27 views

PID cooler temperature control

Hello Hello I am making a controller of a small cooler (dry ice) PID but Im not sure if I am using the indicated mosfet Im trying with a NPN 222a and my second option is IRFZ44 Which would be the best ...
1
vote
1answer
51 views

Issue with input from weighing scale controlling a stepper motor based valve

Hello and thanks for any help in advanced. What changes do I need to make to my code to get rid of the issue of the valve opening up again at end of cycle in "Auto" function. Hardware: ...
1
vote
1answer
38 views

fingerprint scanner and GSM module- how do i put a timer condition using if statements?

I am using a fingerprint sensor and GSM module on Arduino MEGA 2560. I want a fingerprint to be scanned every minute, if a minute elapses with no finger scanned, then the next code for the GSM to send ...
-1
votes
1answer
39 views

UART connected device communication only works one way

As the title implies, I have two Arduino devices (Uno and Mega) connected to each other over UART (the Mega is hardware UART, the Uno is software UART); I need the Mega to send a command to the Uno, ...
-1
votes
1answer
50 views

Can't get 1 second on a ATMega168 timer

TCCR1A = 0; TCCR1B = 0; OCR1B = 0xFF00; TCCR1A = (1<<WGM10) ; TCCR1B = (1<<CS12) | (1<<CS10);; //set the pre-scalar as 1024 TIMSK1 = (1 << OCIE1A); This doesn't ...
1
vote
1answer
19 views

Unable to use rising edge interrupt for external clock Arduino 2650

I'm messing about with an Arduino Mega2560r3 and failing to get timer 4 to trigger on the rising edge of an external clock. It only ever triggers on the falling edge. I've tried TCCR4B = (1 <&...
1
vote
0answers
37 views

Encrypting and decryption RSA (Or other asymetric encryption) on Arduino Mega

I want to encrypt and decrypt like 200 char strings on arduino mega, but I failed to find any library/code that can do that. Do you have any experience with doing that? Thanks. I'd like to use any ...
1
vote
0answers
34 views

Controlling DC motor with joystick using Arduino

I am working on modifying code to control two DC motors with a joystick using Arduino. The code I have works, but the motor accelerates very rapidly and is difficult to control. I would appreciate any ...
0
votes
1answer
49 views

LoRa recieves only 2-4 packets, then stops working

I'm working on LoRa project using [Ai-Thinker RA-01 SX1278 433MHz LoRa][1] with [sandeepmistry/arduino-LoRa][2] library. I modified LoRaReciever example so it looks like this #include <SPI.h> #...
2
votes
4answers
476 views

My program is using too much memory

I work in a warehouse and I was tasked to make a device which will show the location of any product when Product ID is given. All of our product has 3 things. Product ID, Rack Number and Gap number. ...
0
votes
1answer
69 views

Hello, Please can someone assist me with in checking my code?..I try to generate a high freq signal (at least 150KHz) with Arduino Mega, CTC Mode

void setup() { pinMode(9, OUTPUT); pinMode(10, OUTPUT); TCCR2A = TCCR2A & B01010000 | B00000010 ; // CTC mode activated, Toggle OC2A TCCR2B = TCCR2B & B11110000 | B00000001;//...
2
votes
0answers
44 views

Simulink resets arduino

I am working on servo motors control through serial communication protocol, I am sending data from Simulink to arduino and vice versa, The problem I am getting is that once I open Simulink Servo ...
1
vote
0answers
51 views

Servos "jump to fixed position" at startup when powered by external power supply only, but not by board

My question is about something that is happening ONLY when I use external power supply. When I use the power from the Arduino Mega directly, there is no problem. However, I need to use an external ...
1
vote
2answers
47 views

LCD TFT 2.4"" changes the values of analog read of Arduino Mega

I have a Arduino Mega with LCD TFT 2.4"" with reading 5v signal on A8 pin (Arduino mega pin) from a raspberry pi (just to test). They are grounded together. When the Arduino is without the ...
5
votes
1answer
411 views

Delay() and millis() functions don't work in cpp external files

I'm currently facing an issue using delay() and millis() functions in an external cpp file. The issue is that when I used delay() in my main program (meaning .ino file) it works well but when I call ...
1
vote
0answers
49 views

Arduino mega ethernet Udp client randomly failing

I have a keyestudio board identical to the arduino mega 2560. I use the matching keyestudio ks0156 W5100 ethernet shield. My code uses the following library for ethernet paulstoffregen/Ethernet@0.0.0-...
1
vote
0answers
50 views

Where to save time and other values so I can read them after arduino powered down?

I need to save some values (and be able to update them frequently) that will stay there even after powering down the Arduino. (I didn't specifically choose any board yet, but UNO or Mega will be ...
3
votes
2answers
329 views

MPU6050 Arduino Jeff Rowberg library interrupt Issue

I was trying to get the data from MPU6050 using the Arduino library mentioned here. The following code is an edited version of the sample code given in the library folder which seems to be working ...
2
votes
0answers
89 views

External Interrupt and Input Capture pin | Arduino MEGA

I have a code for finding the rpm of one system calling here as engine , the engine have a hall sensor output and I have tried the following Code #define SERVO_MIN 2000 #define SERVO_MAX 4000 struct ...
6
votes
5answers
2k views

What is the best technique to design a 20 push button circuit

I will be controlling a robot with more than 10 motors which means I'll need 2 buttons each to control moving forward and backward. My controller is an Arduino mega. Is 1 pin = 1 button the best ...
3
votes
1answer
73 views

False interrupt triggering Arduino Mega

I am using Arduino mega with 4 interrupts to find the rotation speed of 4 motors . For this I have used INT2, INT3, INT4, INT5 and the code for the same is given below struct Pulse { uint32_t ...
2
votes
1answer
101 views

Programming ATMega4809 via Atmel-ICE with Hex File from Arduino IDE - why doesn't the code loop / work?

Background I am programming a 40-pin ATMega4809 (datasheet) using ATMEL-ICE programmer. I'm simply using the Atmel Studio to upload a HEX file to the chip. I generate the HEX file using the Arduino ...
1
vote
0answers
21 views

Using Arduino Click shield with NDIR Click CO2

I am trying to use (NDIR CO2 sensor Mikroelectronika) with Arduino Mega 2560 utilizing the Click shield. Mikroelectronika provides libraries for their platform (likely proprietary), hence i have no ...
2
votes
2answers
112 views

Update the ESP to espduino via NodeMCU Flasher

I am using Cactus Micro Rev2 and I'm trying to communicate with ESP via Mega32U4. I guess I have to update to espduino to be able to program the ESP side. And I don't know current ESP firmware version....
1
vote
0answers
80 views

Not getting any signal from myoware EMG muscle sensor. The signal LED (Red LED) on the sensor is always ON

This is my first time using EMG Sensor. I'm trying to read EMG signals from Myoware Muscle Sensor. When I use analogRead to read analog value, the value is almost same. There is not much change in the ...
2
votes
1answer
78 views

How do I recreate the Pong game with two pots and the map function?

I am working on a project for my brothers and anyone else who is interested in playing some LED Pong. I was just stuck on the software part. I don't really know what to do. But, I have an idea: I want ...
2
votes
0answers
52 views

HC-05 bluetooth module stops working when blinking

I'm using this HC-05 Bluetooth module to communicate between my Arduino mega 2560 and my laptop. I am using processing to send the data from my computer to the Arduino. The module connects nicely and ...
1
vote
0answers
32 views

How can I get a holding torque on dc motor if I am using an H-bridge?

I am trying to build a robotic arm and also using a lot of metal in it, now the real challenge for me have arrised at first I was using tower pro mg995 but that servo is worse than scrap. So I ditched ...
0
votes
2answers
49 views

Dropping a 75V power supply to power an Arduino Mega

I'm looking to power an Arduino Mega using this IPC-5 power supply from Teknic since I will have a free port (the other powers a servo). I would like to use this extra port to power my Arduino rather ...
0
votes
1answer
87 views

Listening Serial Ports

guys. I need your help. I have 6 Serial Channels and I need to listen this channel and be sure which channel is working? How can I do that? Can I listen this channel by using digital inputs? Or Do I ...
1
vote
1answer
83 views

how to display text to 8x8 matrix with 64-bit long integers?

I have an array of 64-bit integers to display on an 8x8 led matrix const int LEN1 = sizeof(Hours); const uint64_t Hours[] = { 0x00043c3c3c3c3c00, 0x000c3c3c3c3c3c00, 0x001c3c3c3c3c3c00, ...
2
votes
1answer
309 views

ATMega4809 via Nano Every marked as 20Mhz, but does this confirm it is actually at 16Mhz?

If you go to the official Arduino Nano Every page and click the Tech Specs tab, you'll see that it lists it as running at 20Mhz. Turn On Verbose Compile However, if you go into the Arduino IDE and go ...
1
vote
0answers
46 views

Can I support all these sensors? Will I have enough pins?

So i'm new to arduino and i'm working on a project that will require 3 modules/sensors. I wanted to know, can all of the following modules work with the arduino mega 2560 that comes with this touch ...
1
vote
0answers
193 views

Arduino Mega as a EEPROM Programmer for Winbond W29EE011 memories

I'm trying to use my Arduino Mega as an EEPROM memory writer. For this project, besides my Arduino Mega, I use an SD Card module, an LCD display and two push buttons to handle the events. Inside the ...
1
vote
0answers
63 views

How can I handle six SoftwareSerial ports for six Nova SDS011 Air Quality Sensors on Arduino MEGA?

First of all, thank you in advance. I'm trying to connect six Nova SDS011 Air Quality Sensor (sensor specifications here) to an Arduino MEGA. I'm using the Nova Fitness Sds dust sensors library which ...
-2
votes
1answer
113 views

Do I use an LED or a pullup resistor for stopping "floating" or "ghosting" for a matrix keypad?

I know this sounds simple, but I have an Arduino Mega 2560 and I am making a matrix keypad for a claw machine. It's a 3*4 matrix keypad. Let's just say, I am making this keypad for the claw machine to ...
2
votes
1answer
241 views

Is it possible to read multiple buttons with the CD74HC4067?

I am working on a project with a claw machine. I am working on this chip (CD4067BE which is equivalent to the CD74HC4067) and I was wondering: can I read more than one button with the CD4067? I tried ...
2
votes
0answers
47 views

receives 0 0 instead of "hello"

I receive the following: 09:27:10.618 -> 0 0 09:27:12.589 -> 0 0 09:27:14.616 -> 0 0 09:27:16.622 -> 0 0 09:27:18.576 -> 0 0 09:27:20.577 -> 0 0 09:27:22.583 -> 0 0 09:27:...
1
vote
0answers
99 views

NEMA 17 Stepper motor + Arduino Mega + driver doesn't move using GRBL and UGS

3x NEMA 17 Stepper Motors: https://www.amazon.com/gp/product/B00PNEQKC0/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1 3x DM542T Stepper Driver: https://www.omc-stepperonline.com/download/DM542T....

1
2 3 4 5
36