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
1
vote
1answer
27 views

Using same GPIO pins to control multiple stepper drives

I have an Arduino Mega 2560 and I want to control four 23-frame steppers same speed/direction for a conveyor application. I want these to be synchronized exactly as possible for smooth operation. Can ...
1
vote
0answers
37 views

Checking if Arduino board works or is damaged

I have an Arduino Uno and Mega, but when I connect them to a computer with the USB they came with, there is no green light near the reset button that illuminates. On the Uno board the pin 13 ...
0
votes
0answers
50 views

Infared: some controllers send code into infinite loop

I have a piece of code that captures input from infrared and spits it out to the serial port. When I use it with a simple controller that comes with a typical kit, it receives the infrared code just ...
0
votes
0answers
24 views

Arduino Mega 2560 + BLE HM-10 - I cannot execute AT commands

I have an Arduino Mega 2560 and a HM10 Bluetooth module (this one) I have connected the Bluetooth according to the manufacturer's specifications: VCC -> 5v GND -> GND TXD and RXD of the ...
1
vote
0answers
49 views

Software baud rate where can I find it? [closed]

Is possible to see what kind of baud rate a customer software is using? I have been trying so many in my Serial.begin(), from 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600 to 115200 and I ...
0
votes
1answer
23 views

Valid options for output port on Mega 2560

I would like to adopt this library on an Arduino Mega2560: https://github.com/gueei/DShot-Arduino However, the macro DSHOT_PORT needs defined for the Mega2560 here: https://github.com/gueei/DShot-...
2
votes
2answers
55 views

If condition for switch not working as expected

I am trying to write a simple program to control one LED with two switches. If any of the switches is pressed, I want to turn the LED on. My LED however is always ON even when none of the switches are ...
1
vote
0answers
40 views

My code gets stuck when ever I use Rtc library [closed]

I have developed code about smart home that means I can control relay with smartphone. I am trying to develop new function to turn on lights on specific time, for that I am using RTC 1307 module with ...
1
vote
1answer
26 views

BLDC geared motor with encoder - How to wire the encoder? (6 wires)

I am quite a newbie to arduino and currently stuck with an encoder. I have a BLDC geared motor with encoder, all I want to do is to get values from the encoder. There are 6 wires, out A, out B, out Z, ...
0
votes
1answer
42 views

Routing Arduino Mega output to either one of two serial ports

I have an Arduino Mega controller that normally communicates via Bluetooth (HC08 Bluetooth module) to an Android device. In case there is a problem on the Android side I wish to have a fallback ...
0
votes
2answers
33 views

Which Arduino-Board do I need?

I want to use a single Arduino board and link it to both the ANALOG CO2 GAS SENSOR (MG-811 SENSOR) and ANALOG PH SENSOR - METER KIT. I was wondering if the Uno Rev 3 had enough pins or do I have to go ...
1
vote
0answers
27 views

Trying to use a gyro sensor and having issues

My setup is Arduino Mega. I have a gyro sensor that I'm trying to use to measure the acceleration or G force in X axis (forward movement). So far I'm trying to figure a way to use the value of Acc or ...
1
vote
0answers
33 views

Will this be possible to do before I even get started. I want to automate my house window [closed]

I will have 2 buttons. Using Adafruit DC Motor Driver https://www.adafruit.com/product/3190 Top button is a function, bottom button is mode. The top button functions. Window 1: Single press will turn ...
1
vote
0answers
14 views

SIM7000E WAVESHARE can't do anything

can someone help me im using sim7000e from waveshare one week ago its work normally at now its totally not work even can't read to RX-TX communication #include <SoftwareSerial.h> //koneksi ke ...
1
vote
0answers
16 views

RCSwitch for Alarm System

Folks, I use the RCSwitch sketch to notify my WiFi alarm controller when a motion is detected. Using the Receiver Code, I have got the following information related to the motion detection signal from ...
0
votes
0answers
108 views

python spidev receive data from Arduino

I am trying to communicate between Arduino and raspberry pi over SPI. I am using spidev in python and sending data to Arduino using xfer2. But I do not have an idea of how to receive bytes from ...
2
votes
2answers
53 views

Rasberry Pi Controlling Arduino - Reads “Ghost” Input - Doesn't Complete Logic Loop

I am using an Arduino Atmega2560 clone, I have used it many times before with satisfactory results - although I haven't used it with my Rpi before. My Raspberry Pi is model 4 (B I think?). #define ...
0
votes
1answer
28 views

Sending variable length sequence via serial from PC to Mega

I am trying to send a sequence of commands from a PC to a Mega. The Mega in turn controls 2 signal generators (AD9833's). The sequences can vary in length but always have the same format: A start ...
1
vote
0answers
41 views

Looking to interface height and weight sensor based on I2C Protocol

I have interfaced a height sensor and a weight sensor. The I2C address of the height and weight sensors are 0x29 and 0x2A respectively. I have merged the example of both the sensors. This is the first ...
3
votes
2answers
37 views

Nextion Display not getting updated data

I am using an Arduino Mega to display the readings of 4 pots on a Nextion Display as well as store it in an SD Card with the time stamp. I keep getting: recvRetCommandFinished err on the serial ...
0
votes
1answer
61 views

how to stop the relay after it is getting on and let the sensor get the result

I want to provide a delay in the following iteration reading so that the sensor can read the condition after the pump starts. void loop() { //-------------Fungsi Read sensor----------- // ...
4
votes
0answers
55 views

How do I transform data for a column to data for a row, for a led matrix

I have a 8x8 led matrix. I'm using LedControl.h library to control the matrix, which has 3 ways to light up the leds: setLed, setRow and setColumn. I've found that setColumn it's really slow, it's ...
1
vote
1answer
58 views

Error while burning bootloader

I am trying to burn bootloader on Arduino UNO using MEGA2560 as the programmer, I followed the steps stated here but still get the error below: avrdude: Version 6.3-20190619 Copyright (c) ...
0
votes
1answer
111 views

Why am I getting a “SendCommand was not declared” Error

#include <Adafruit_Fingerprint.h> #include <SoftwareSerial.h> #include <LiquidCrystal.h> uint8_t id; int getFingerprintIDez(); //pin #16 is IN from sensor (GREEN wire) //pin #15 is ...
0
votes
0answers
103 views

Arduino two sketch add to single sketch based on timers [duplicate]

How to add two sketch in single sketch and run same time because one sketch timer1 used and another sketch used timer0 and timer2 both sketch have setup()and loop () so how to add please help us with ...
2
votes
0answers
110 views

What is the advantage of higher priced arduinos to cheaper ones? [closed]

I just got an Arduino Mega ADK (which seems to be functional, based on my limited testing and knowledge) at a yard sale for under $5. I don't have any Arduino experience, but I'm into DIYing, so who ...
1
vote
1answer
35 views

FastLED-driven strip acts weird when using PN532

A LED-strip (WS2812B, 46 pieces, PIN 8) and an Adafruit PN532 RFID shield (IRQ 2) are attached to my Arduino Mega 2560. The GRB based strip seems to be working fine with FastLED in the beginning, I ...
1
vote
0answers
38 views

Reading Serial Data sent from PC to Arduino with help of another Arduino

I am trying to sniff the Serial Communication between the PC and Arduino MEGA 2560. For trying to check what my PC is sending to my Arduino. I am using another Arduino MEGA 2560 to read this data ...
2
votes
1answer
39 views

rfid reading function returning null

I have a function that reads rfid card and return rfid string. Function reads string well but. I am using ArduinoJson libray to generate json . this is the function that i am using to read rfid cards. ...
0
votes
1answer
25 views

Multiple peripherals using SPI with a Mega

I am using a Mega 2560 and 2 x AD9833 programmable waveform generators. The AD9833's use a SPI protocol and I have used vwlowen's code as a jumping off point (I'm not usng the display just the ...
1
vote
0answers
25 views

how to control 2 sensor and 3 relay with fuzzy

i'm using fuzzy to decide how long the relay on pump on and i got some trouble for it he just looping on relay how should i do thats my code //---------Fuzzy 2.1 prelauch---------- //-----iNPUT ...
1
vote
2answers
103 views

controlling 2 sensor and 3 pump using millis

i make a 3 pump for output and im using millis for it, i want to stop if rach the intervalm now in my code its still looping not realy stop for it thx int pump1 = 5;//pin D5 int pump2 = 6;//pin D6 int ...
1
vote
0answers
39 views

Arduino LCD only display image for few second and turn screen to white

I have a problem with my Arduino and LCD touch screen. I create a few functional button in my Arduino. One of the button is START button. Right now, I want the image is display when I touch START ...
1
vote
0answers
28 views

Arduino serial issue

My arduino mega should be communicating with another card (ANET8) and also with a DC resistance meter (with python code) using 2 serial ports, one using the USB(resistance meter) and the other one ...
2
votes
1answer
32 views

Sketch skipping the OPEN Arduino inputs

Folks, I am a beginner to Arduino. I have a sketch that tests a set of INPUTS for HIGH or LOW by using a 'for' loop. When the for loop reaches an INPUT which is kept OPEN (no wires connected to it), ...
-1
votes
1answer
132 views

Standard deviation and variance of an array of numbers

Looking for a simple way to get the variance of an array of numbers, that will compile with the Arduino compiler. Something like this c#: static float variance(double []a, int n) { // Compute mean ...
0
votes
0answers
48 views

Two CD4021: Two pins, same value

I have connected two CD4021 with an Arduino, and pull up resistors. The code which runs is in this example until the point of serial printing. https://www.arduino.cc/en/Tutorial/ShftIn22 Although, the ...
2
votes
1answer
53 views

MegaCore ATmega2560 PB7 activation randomly at boot

I uploaded in my custom board (ATmega2560 with an external oscillator 16MHz) the MegaCore bootloader using the AVR pinout. I found that when I switch on the board the pin PB7 is activated 2 short ...
3
votes
1answer
50 views

Problemm with the MPU6050 library

I have a curiosity. What is the difference between adding a header file directly on the arduino IDE and the header file inside another h-file. For example: #include "MPU6050_6Axis_MotionApps20.h&...
4
votes
1answer
56 views

How can I send and receive data from an Arduino MEGA 2560 and Python?

Hello community I am relatively new to the Arduino world and I am facing some issues trying to establish serial communication between the MEGA 2560 and Python using my PC, the desired result is to ...
2
votes
2answers
76 views

Digital pin output voltage fall down when driving a relay

I'm trying to trigger 8 different 5V relays using arduino atmega 2560. the relays (70Ohm coil) are powered by an external 5V source, and im trying to trigger them through a driving stage which ...
2
votes
2answers
167 views

How many connections can Arduino I2C method create?

I was just learning about I2C between 2 Arduinos, one as sender and another as a receiver So I have got curiosity to know how many Arduinos can be connected to I2C connection in serial? I mean, ...
1
vote
1answer
44 views

Connecting multiple ultrasonic sensors(hc-sr04) to a single arduino board.(mega)

I am currently working on an alarm system using multiple sensors and one arduino board and I am getting readings from 2 of the sensors but one gives a constant zero and a constant buzzer sound even ...
2
votes
1answer
39 views

Why won't my motor run?

I am trying to run a small 3v motor with a Keyestudio MEGA 2560(which is the same as the Arduino MEGA 2560). I am getting a consistent 5 volts everywhere I check with a multimeter. The voltage drops ...
0
votes
1answer
41 views

Error for compiling for board Arduino Uno

I am new to Arduino and just got this error after writing this code:The error message is pasted after the code. I am kindly requesting for assistance so that someone can help me understand why it isn'...
1
vote
3answers
105 views

How do i make my DC motors run simultaneously?

Im coding an adafruit motor shield for 3 DC motors to go forward & backwards, and so my concern is why only my motor3 is running the whole time and motors 1 & 2 are switching off meaning 1 ...
0
votes
2answers
50 views

Arduino TFMini Lidar sensors and speaker

I have this code for the TFMini Lidar sensors and Speaker. I Need help figuring why I'm using this calculation in my code and why if I removed it the lidar will not give me any measurement? (see below ...
2
votes
1answer
94 views

Arduino “Maximum Power point tracker” (MPPT) Problem

I need an IV curve for a solar panel. As far I know, solar-panel and Diode IV curve pretty much the same. Here, I am using diodes(6A10-1) as a solar-panel. Where each Diode voltage drops 0.6volt. I ...
0
votes
1answer
19 views

Use Android on Arduino TFT

I don't know whether this is possible or not but is there any way that I can run something similar to Android on a normal TFT. I want to make complex graphics but can't program those complex programs ...
1
vote
1answer
35 views

Multiple external power sources and one Arduino

really noob question.. I am thinking of using a 12v power source and a 5v power source as an external power supply for my 5v relay (and some other stuff that I might add up to my project that will ...

1
2 3 4 5
35