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
0 votes
0 answers
20 views

Receives data from Light sensor with ISR

I use a laser module (HW483) to transmit a series of 0 or 1 data and Light Sensor Photosensitive(LM393) utilizes ISR to receive data and its digital pin as output. On the transmitter, I use the ...
Ianflank's user avatar
1 vote
1 answer
103 views

How to handle class initialization when using brace-enclosed initializer lists

I'm working with a custom C++ library, CPSTL, for Arduino, which includes a cpstd::vector class that is designed to work with cpstd::initializer_list, cpstd::initializer_list is supposed to mimic std::...
Cheche Romo's user avatar
0 votes
1 answer
64 views

Give zero volt to specific servo motors in a certain time

I have a robot that uses 4 mechanical arms. Each mechanical arm has 4 "READYTOSKY 30kg" servo motors on them. At some point, I need to use the absolute maximum force of only two mechanical ...
Noy's user avatar
  • 11
0 votes
2 answers
50 views

Pressure transducer returns 2.4v at 0 psi when working with a 0.5v to 4.5v pressure transducer

I have this pressure transducer: https://www.amazon.co.uk/dp/B07YZL6TYD?psc=1&ref=ppx_yo2ov_dt_b_product_details The transducer has a range of 0.5v to 4.5v which translates to 0 psi to 100 psi. ...
masafood's user avatar
  • 109
0 votes
1 answer
74 views

Python script cannot connect to serial port

I want to control the LEDs with my hand, for this I used the repository https://github.com/paveldat/finger_counter/tree/main. I want to control the LEDs with my hand, for this I used the repository. ...
Дмитрий Насонов's user avatar
0 votes
1 answer
109 views

Turn on by long press of a button?

In my project on Arduino, I want to implement turning on the whole circuit by long press of a button. But at the same time, I want the Arduino to be turned off in standby or sleep mode, but I don't ...
EndyVelvet's user avatar
1 vote
0 answers
117 views

Arduino (Mega 2560) Ethernet Shield 2 (W5500) - Can't connect

I'm having issues connecting to my arduino mega via ethernet. Its a very basic start to the code just to get the network side up and running, them im going to add in what I actually want it to do. For ...
Isaac M's user avatar
  • 11
0 votes
1 answer
63 views

DS18B20 Error in Proteus 8.13

I am using the below code to check temperatures from 36 DS18B20 sensors using Arduino Mega 2560. If any one of them go above 50 deg. celsius, then it sets the output pin to HIGH. I am trying to run ...
Siddharth Chakravarty's user avatar
1 vote
1 answer
71 views

ArduinoJson library: how much space to allocate for serialized buffer?

I am using the fantastic ArduinoJson library for working with JSON data on my ESP8266. I have been facing issues with random software wdt resets and have been investigating memory leaks wherever I can....
First User's user avatar
1 vote
3 answers
42 views

Separate from Serial for digitalWrite()

This is my current code (Arduino Mega 2560): #define p1 2 #define p2 3 void setup() { pinMode(p1, OUTPUT); pinMode(p2, OUTPUT); Serial.println("ARDUINO : CONNECTED"); } void loop() { ...
Ganang Wahyu W's user avatar
3 votes
2 answers
61 views

Stack Mega Shield

I need to support 18 push buttons and 66 IR sensors on my Arduino Mega (model railway). I have a Mega Sensor Shield, but won't have enough pins for all the sensors. Can I get a second sensor shield ...
PaulN's user avatar
  • 33
1 vote
1 answer
129 views

Can't install to arduino mega 2560 using arduino-cli, but can using IDE

I have a MKS GEN L v1.0 3dprinter board that works fine uploading using the IDE. But I need to install to it using the arduino-cli. For some reason, the command arduino-cli board list says that the ...
steve antwan's user avatar
2 votes
1 answer
71 views

ATMEGA2560 died inside a arcade game circuit

I am building arcade game with 10 player buttons (5 for each player) and one start button. All buttons have build in LED inside. Player buttons has LED for 12V and start button has led for 5V. I am ...
andz's user avatar
  • 123
1 vote
3 answers
680 views

Best way to send a boolean (1/0) to a windows application in real time?

I have an arduino mega connected to a light sensor that reads the status of a machine's indicator light. I have a C++ application that controls the machine, and I would like the arduino to send the ...
Max Bluhm's user avatar
4 votes
1 answer
533 views

Are intel hex files converted into a binary format before they are written to Atmega's flash?

I have been going through some resources on bootloaders, programmers, etc (I'm very new to this specific subject) and how they work with the Atmega chips and Arduino board programming. My research may ...
First User's user avatar
0 votes
2 answers
44 views

Why does analogRead(A0) deliver different Values when called in a library file vs calling it in the sketch directly

I wanted to write a library representing a sensor to later on have an array of sensors. I generated a file MoistureSensor.h: #ifndef MoistureSensor_h #define MoistureSensor_h #include <Arduino.h&...
Nico Sz's user avatar
3 votes
0 answers
60 views

Turn ESP8266 into an Arduino IDE-like "sketch uploader" (over hardware serial)

I have an ESP8266 module which has downloaded a hex file for an Arduino Mega2560. This hex file (call it mega2560.hex) is sitting in the ESP's SPIFFS file system. What I want to do is basically ...
First User's user avatar
3 votes
1 answer
107 views

Serial plotting a pwm

I'm trying to plot the value of the pwm that increases (every 2 sec) then decreases to compare it to the value of an encoder. I was expecting a continued value (like a step ) during 2 seconds but ...
Lavender Juliette's user avatar
2 votes
0 answers
80 views

Connecting Arduino Mega 2560 to Python with PyFirmata

I am currently controlling two servos using the Arduino IDE, but now need to integrate my Arduino code into a Python script. I read about how to use PyFirmata and went through the process of uploading ...
Eeshan Mishra's user avatar
1 vote
0 answers
41 views

slave arduino receiving commands from two serials

I have a slave arduino connected to a master arduino mega (through UART) and to a RPi (through USB). The slave arduino is set to monitor various SHT85 (through I2C) and NTC sensors. What I would like ...
higgsboson2012's user avatar
0 votes
2 answers
348 views

RMS Voltage Value

it has been a week that I'm struggling with the arduino to measure the RMS Voltage value. By OSC I can see that the RMS voltage value changes around 3V. But I can't see it by serial port. I think my ...
Farzaneh's user avatar
0 votes
2 answers
66 views

Pin outping 1V instead of expected 5V, not hardware related

Heyo everyone ! I'm in a project where I need to send a signal if I detect vaccuum. I'm sending the signal on PIN 9 but I soon realized that I was only getting 1V. Tought I was alternating between ...
O'Schell's user avatar
1 vote
0 answers
39 views

How to create 2 individual daisy chains using the MAX7219 Module and Mega2560

I am using MAX7219 8 digit 7 segment displays with Arduino Mega2560. Now, I have to physically space out the displays far from each other. Hence, after a certain distance the displays on the far end ...
Soumarya's user avatar
1 vote
0 answers
37 views

Arduino MEGA crashes with Ethernet shield to connect to two TCP servers

I have Arduino MEGA with Ethernet Shield and a SD card connected to a RUT950 GSM router. Then, I also have two sensors connected to the router and they run a TCP server that sends measurements ...
Marcus Barnet's user avatar
2 votes
2 answers
51 views

change sketch from controlling 8 stepper motors to 8 solenoids

I am looking to see if I can change the attached sketch which controls 8 stepper motors to just switching 8 relays for a weaving loom which we have, unfortunately making this change is well above my ...
Vaughan Ratahi's user avatar
1 vote
1 answer
145 views

Arduino Mega Loopback Test with Several TX/RX Ports

I am trying to do a loopback test using an Arduino Mega. What I am looking to do is send a byte over TX and receive said byte back at RX and verify that the byte is unchanged. More or less I just have ...
mnlipps's user avatar
  • 11
2 votes
1 answer
106 views

Why is sensitivity (threshold) parameter ignored

Analog pontentiometer connected to an Arduino. simplest possible setup. The goal is to send a message over Serial whenever the value changes. I do not want to spam the Serial connection to much, so ...
David's user avatar
  • 125
1 vote
0 answers
132 views

Error with Mega2560 via SPI

I tried the following code to communicate via SPI with MPU9250 and Mega2560 But I got the following error: Error initializing communication with IMU Why I got this error? /* * Brian R Taylor * brian....
m-m's user avatar
  • 11
1 vote
1 answer
156 views

How to prevent an Arduino connected to the Internet from being hacked?

I have an Arduino (with environmental sensors doing measurements) connected to the Internet via ethernet. Can it be hacked? Can someone access it via Internet and upload his own C/C++ code? If, yes ...
just_learning's user avatar
1 vote
0 answers
87 views

Stepper motor not working with A4988 driver

I have been trying to run stepper motor via Arduino Uno and A4988 motor driver via this tutorial: https://howtomechatronics.com/tutorials/arduino/how-to-control-stepper-motor-with-a4988-driver-and-...
user89175's user avatar
1 vote
1 answer
520 views

DS1302 RTC module running too fast

I am using a DS1302 RTC module with an Arduino Mega 2560 Rev 3. I follow steps on this website since I have no experience with RTC module before. Here are the outputs I am getting. 17:15:21.835 -> ...
Leo Liang's user avatar
1 vote
0 answers
48 views

Cannot connect Arduino Mega 2560

I was able to work with the same Arduino on the same laptop yesterday. However, the Arduino IDE is unable to connect the Arduino Mega 2560 today. I tried with a different Arduino Mega 2560 but the ...
Leo Liang's user avatar
2 votes
1 answer
129 views

Using MFRC522 along with other inputs(Bluetooth, keypad)

I'm making a little parking lot, which includes mostly opening a servo motor using either keypad, bluetooth(hc-05) and freshly added, Rfid(RC522) I cant get inputs from other sources if i want to get ...
Barzy's user avatar
  • 21
1 vote
0 answers
112 views

Communication between two hc 05 Bluetooth modules not working

I Have a problem with the connection between two hc 05 modules. The bluetooth modules are paired using AT commands. But when I run the code I cant get any data from the reciever. The bluetooth modules ...
Lisitha Ranukkanda's user avatar
1 vote
0 answers
87 views

Converting more strings from serial monitor to int arrays

I want to transfer 8 lists from a python script, via Serial Monitor to the Arduino. I can get the strings to Arduino and Arduino saves them as String array, but I can't change it to integer (it shows ...
PNarduinouser's user avatar
1 vote
0 answers
30 views

Megaboard Problems about pySerial Communication from Python to Arduino

I asked same question on another forum, but i need more opinions and advices. I wrote a simple Python code and Arduino code. In my code, the Excel matrix data is loaded into Python, then converted ...
wk K's user avatar
  • 11
0 votes
1 answer
199 views

DS3231 with Arduino Nano for Timing precision

I am in need to synchronize two separate circuit boards working with Arduino nano. The need is to activate one relay using Arduino-1 after 45 min and another relay using Arduino-2 after 45.36 seconds. ...
Lawliet's user avatar
  • 183
0 votes
1 answer
363 views

Arduino nano timing precision

How precisely can an Arduino nano be timed? The project I am working on needs two Arduino nano to work synchronously. Arduino one have to activate a relay after 2700 sec and Arduino two have to ...
Lawliet's user avatar
  • 183
1 vote
0 answers
52 views

Adding RTC Library for Arduino Project in Visual Studio

I am working in an Arduino project in visual studio. I need to get and set time to a RTC clock. That's why I am adding a ds3231 header file in my project from GitHub. When I want to build "it's ...
Iqbal Hossain's user avatar
1 vote
2 answers
485 views

Arduino does not connect to MQTT local broker

I have an Arduino Mega with Ethernet connected to a router by cable. Also I have a PC connected to the router (by Wifi) where also the local MQTT broker is installed (mosquitto). Althought the Arduino ...
bardulia's user avatar
  • 141
0 votes
1 answer
207 views

control 12v motor with NPN transistor via arduino

i want to control this 12v motor via arduino: Power source is 12v 5A motor will work 5 seconds in every 5 minutes and will be activated throught arduino mega i will try to use bd679a darlington ...
wuqn yqow's user avatar
1 vote
1 answer
209 views

Run encoder code simultaneously with other code in Arduino

volatile unsigned int temp, counter = 0; int county=0; void setup() { Serial.begin(9600); pinMode(2, INPUT_PULLUP); pinMode(3, INPUT_PULLUP); attachInterrupt(0, ai0, RISING); ...
Maximus Su's user avatar
0 votes
1 answer
200 views

Use Arduino MEGA generate 40kHz multiple square wave signal with 10 phase

I want to use Arduino-mega generate multiple square wave signal,the siganl is 40kHz and it can be used to drive ultrasonic transducer. So,I use the trategy in article "Ultraino: An Open Phased-...
Shiny100's user avatar
-1 votes
1 answer
208 views

How many stepper motors can you run on one Arduino Uno? Ideas on how to run 9?

I am in middle school and new to Arduino. I just learned to set up and code a stepper motor on my Arduino Uno from watching YouTube videos. I want to set up 9 stepper motors to all run at the same ...
JDRNeedsHelp's user avatar
-1 votes
3 answers
123 views

Is there any way to efficiently code reading of four sensors and sending a serial output once it does detect a reading?

I am actually wondering if there's a way to efficiently do this block of code. There are two things in my specifications and these are: Four IR Sensors that detects blockage. Basically just to ...
fireblazer10's user avatar
0 votes
1 answer
87 views

How to architect streaming data from multiple plant monitors to single Arduino?

Premise: I'm trying to determine a good way to architect getting data from 4 plant monitors to a single Arduino. For context, that Arduino will have a Wifi connection that will transmit the data from ...
Avogadro's user avatar
  • 103
0 votes
1 answer
127 views

Balancing pendulum using PID

Dear all, referring to the video at here on how to make a PID balancing pendulum as shown in the picture and the author also provided the arduino code in the video description. May I ask whether this ...
jessica smith's user avatar
-2 votes
1 answer
454 views

How to find the correct navigation course by gps navigation with Arduino?

I have a problem for about days ago and here it is : I have an RC plane and wanna make it autonomous via GPS navigation by Arduino I have an Arduino Mage 2560 onboard connected to a GPS Ublox-Neo-M8N (...
Curious guy's user avatar
0 votes
1 answer
91 views

Arduino Mega, 6 push buttons for each analog input (A0-A9) - closing one results in reading by other

On day to day basis I'm more of a high level programmer, with little electronics knowledge, apologies in advance if I lack some nomenclature or basics. I communicate with my Arduino Mega via firmata, ...
wopolow's user avatar
  • 103
-1 votes
1 answer
128 views

Arduino outputting 4.7V instead of 3.3V when using I2C communication/sensor?

TOF050C-VL6180X Sensor was not responding, so I checked it with a multi-meter, and the VIN, GND solder pins on it read 4.7V. Double-checked Mega voltage, without anything connected, and it shows ...
Maksiss's user avatar
  • 11

1
2 3 4 5
37