Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
26 views

MOSI pin not turning low

I have the following code: void initChips(){ SPI.begin(); SPI.beginTransaction(SPISettings(20000000, MSBFIRST, SPI_MODE0)); pinMode(SS, OUTPUT); digitalWrite(SS, LOW); } void ...
0
votes
1answer
21 views

Arduino SPI Multiplexer problems

I want to use the ADG731 32 ch multiplexer to read 32 potentiometers, I have wired everything and it works but it doesn't works as fast as I would want. The problem is that If I turn a potentiometer ...
0
votes
0answers
14 views

Closed Loop Stepper Motor Control with ACE128 Absolute Rotary Encoder

I am using a 1.8 Resolution Stepper Motor controlled by a L298N driver and Arduino Mega. I have attached the ACE 128 Absolute encoder to the motor to use it as a closed loop system. The idea is for ...
0
votes
1answer
23 views

Control Air Pump Depending on Pressure Sensor

I am working with an Arduino Mega, a 12V micro air pump, and a MP3V5050 air pressure sensor. The sensor outputs an analog voltage depending on the pressure reading in an inflatable member. I'd like to ...
0
votes
0answers
22 views

Webserver on Arduino Mega with Ethernet Shield

I am working with an official Arduino Mega. I have mounted an officiel Ethernet Shield rev 2. Everything works great, i have wrote a very basic webserver. I wanted to host a bootstrap css file on my ...
-1
votes
1answer
28 views

Simple code to define pins used for Shift Register control - Error: a function-definition is not allowed here before '{' token

I'm simply trying to light up some pins on a customized circuit board via Arduino. My code below has the seemingly common error "a function-definition is not allowed here before '{' token". I've ...
-1
votes
0answers
13 views

GPS module printing data twice in serial [on hold]

I have a neo-6m printing GPS data to the serial port using tinyGPS++ but it is printing the same data twice. (See photo below) The first value is time, HH:MM:SS:SSS and its printing the same time ...
0
votes
0answers
26 views

CC1101 sniffing 868Mhz Protocol from thermostat

Hello i buyed a cc1101 because I want to sniff thermostat protocol which works with 868 Mhz. I found this repo https://github.com/veonik/arduino-cc1101. I tried to download the repo and include the ...
1
vote
1answer
36 views

Is it possible to connect many (20+) SPI sensors to an Arduino Mega?

I am making a system for measuring whether or not there is vacuum present in big steel containers. They are located up to 100 meters from the control cabinet. The question is, how many SPI sensors ...
0
votes
2answers
29 views

Will a 12 VDC 1A Power Supply Adapter supply too much power and damage an Arduino Mega 2560?

The specs shown here: show that it has 54 digital pins with each outputting a DC current of 20mA which makes it 54 * 20 = 1080 mA Plus the DC current of the 3.3V Pin of 30mA we get a total of 1110mA....
0
votes
0answers
51 views

Arduino reading screen color from device (without light/color sensor)

I am a beginner working on a project in which I have purchased a device that can display 4 colors on the display (blue, green, yellow, or red). I would like the Arduino to read what color is on the ...
0
votes
1answer
34 views

Arduino Mega not receiving data from Neo-6M

I am using the trying to get data from the Neo-6M GPS module with an Arduino mega, but, the condition 'While (gpsSerial.available() > 0' is being met. I believe this means the no bytes are being ...
0
votes
0answers
30 views

Can't push data to ThingSpeak - Status 400 Bad Request

I'm trying to push some data to ThingSpeak using the EtherCard library with the ENC28J60 ethernet module. At the moment I'm using the exemple code that comes with the library just for tests. But no ...
-2
votes
0answers
22 views

How to build a Syma X8 receiver by Arduino? [duplicate]

How to control a 4x DC motor (size 180) by one Arduino (similar to receiver Syma X8)?
0
votes
1answer
15 views

Arduino 101 MIT App Inventor extension [on hold]

Can the Arduino 101 extension by MIT App inventor be used in sending data through Bluetooth by an Arduino Uno/Mega?
1
vote
1answer
47 views

Cascaded Control loop Arduino [on hold]

I am trying to implement cascaded control system, with velocity inner loop and position outer loop. Separately and without cascaded control, I have implemented position control and velocity control ...
0
votes
1answer
27 views

Too little current to trigger a relay?

I try to use this relay with a Arduino Mega. I connected with jumper cables 5V pin to DC+, GND to DC- and Digital Pin 13 (because its a lucky number) to IN. The power LED from the relay is lighting ...
0
votes
1answer
28 views

CRC16 calculation for MODBUS RTU [closed]

I am trying to communicate an industrial type counter using Modbus. I have to calculate CRC16 value as two byte for send it. I previously googled for few Arduino libraries and I get a same function as ...
1
vote
1answer
62 views

Ultrasonic sensor underwater calibration

Does anyone knows how to calibrate AJ-SR04M using the Arduino? I am working on AUV. underwater reading from current code; it is giving continuous 20cm while moving inches. http://shop2.hanjindata1....
0
votes
1answer
20 views

Can I connect a DS3231 and an MPU6050?

Can I connect a DS3231 and an MPU6050 by an Arduino Mega 2560? I have connect it: MPU 6050 Arduino Mega 2560 SDA = SDA SCL = SCL GND = ...
1
vote
0answers
26 views

Help with app controlled Arduino sensors [closed]

(I'm a beginner in using Arduino and MIT App Inventor) We have this project (an app-controlled aquaponics system) where our group decided to use an app to control the arduino sensors and then show ...
-1
votes
2answers
32 views

Powering L298N drivers from mains power supply [closed]

I am powering 2 stepper motors with an L298N driver each (from a 9V 2A external power supply powered from the mains: https://www.amazon.co.uk/BERLS-Power-Adapter-Elegoo-Connectors/dp/B07GSM6YLX/ref=...
0
votes
1answer
43 views

HC-05 bluetooth module

I was able to connect my HC-05, pair it with my phone, and I can see data in the Serial Bluetooth Terminal Android App. But when I try to connect it to a certain application it says it cannot find it....
0
votes
3answers
62 views

Arduino max power supply limit

What is the maximum current that can be supplied to an Arduino Mega board before frying/breaking? Basically i have several components connected to my board which draw a total current of 1.6A (which i ...
1
vote
1answer
45 views

How to subtract the current analog value from previous one [closed]

I pretty new to the Arduino. I am working on project that find the power by reading your
1
vote
3answers
83 views

How to initialize digital output pin as low

I need to define a pin as output for relay module but when i do it in setup section, relay is activated (low - 0) automatically then i deactivated immediately with coding digitalWrite(pin, 1) but this ...
0
votes
0answers
19 views

Making a voltmeter for PV system over 60 VDC

I'm trying to make a voltmeter for my PV system that can range from 24 VC to 120 VDC. I'm aware of the fact that we have Arduino modules available that can work for 25 VDC system. However in my case ...
0
votes
0answers
32 views

Unintelligible data transmission from Arduino Mega 2560 to RPi using nRF24L01+

I have a Raspberry Pi 3 and an Arduino Mega 2560 both attached to their own nRF24L01 chip. This is my first time using the nRF24L01 chip, so I copied and modified some demonstration code that I saw ...
0
votes
0answers
18 views

Brushless Motor and Electronic Speed Controller Initialisation Issues

I have been trying to make a brushless motor, working in synergy with an electronic speed controller, to work, however, all I have been achieving is the motor vibrating at a specific potentiometer/...
0
votes
0answers
52 views

How to operate a brushless motor & ESC with an Arduino

I have recently bought two brushless motors (Brushless-300w-6-5-Wheel-Tyre-Motor-Hoverboard-Swegway-Board-Replacement-Part) along with two ESC (https://hobbyking.com/en_us/hobbyking-40a-esc-4a-ubec....
0
votes
1answer
73 views

How to program the Robotdyn Mega 2560 PRO MINI?

I want to program the Robotdyn Mega 2560 PRO MINI which has no USB port. How do I connect the pins to an FTDI? Which setting do I have to use in the Arduino IDE?
1
vote
1answer
59 views

Motors triggering Interrupt

I am using a 4wd robotic car to measure straight distances. I have attached two encoders on the front two wheels to measure the distance and I am using the back two wheels to adjust the car and keep ...
0
votes
0answers
24 views

Not able to receive string from database

A few days ago I posted a thread as I was not being able to send data to my database online. It worked when I changed the GPS module. Now I am trying to retrieve data from the same Server and i'm not ...
2
votes
1answer
53 views

Is this a good way to filter noise due to vibration in limit switch?

I have a circuit connected as follows my limit switches which are attached to my structure sometimes gets falsely triggered, so I wrote this code to address it. My motor is supposed to go down skip ...
0
votes
1answer
58 views

I want to get incomming call number and compare it

Hello i want to get and compare incomming call number, it works but not as I want. When im calling from good number it print that I was calling form saved number when the number is stop calling i need ...
0
votes
1answer
53 views

nRF24L01 using sender as receiver and vice versa with RF24 library

I have two nRF24L01 modules (I tried 2 with antenna and 2 without antenna) paired with their power base module and connected to two different Arduino Mega 2560 boards. I'm able to send from one ...
0
votes
2answers
26 views

Connecting Emotiv EPOC+ to HC-05 [on hold]

How can I connect Emotiv Epoc+ headset to HC-05? The headset has its own Bluetooth USB dongle which you plug into the computer to acquire data, but is there anything I can do on the Arduino side to ...
2
votes
1answer
38 views

Mega 2560 pin output power and control question

I am trying to determine the total pin power requirements for my Mega 2560 project; it will connect to 3 1m Neopixel strips and 5 RGB laser fiberoptic lights, and control them via PWM. Each strip and ...
0
votes
1answer
99 views

5V DC Mini Water Pump with Arduino Mega 2560? [closed]

First of all, it is my first topic and i want to say hi to you all!! Secondly, i am really a terrible noob and sorry for that :( I need to make a smart greenhouse project with Arduino Mega 2560, ...
0
votes
2answers
55 views

ATmega 32A and 2560 R3 register to pin mapping?

I've been doing research for the last few hours trying to determine the mapping of physical pins to memory-mapped I/O registers for the Arduino Mega board (which is an ATmega 2560 R3). My code is on ...
0
votes
2answers
69 views

Combining code for multiple sensors in a single program [closed]

I need to operate 3 different sensors (taken 6 sensors of each type) by Arduino Mega2560 :- DHT11 (temperature-Humidity sensor) MQ5 (gas sensor) and Soil Moisture sensor {taken 6 of each type (total=...
0
votes
1answer
41 views

Powering LED strips with two power banks and they randomly change different colors when i use the second power bank [closed]

So for one of my projects i want to power LED strips with power banks but once i try use the second power bank the LEDs half way through patterns jump to random different colors and then go back to ...
0
votes
0answers
21 views

Arduino: Reading Multiple registers in a single slave device [duplicate]

I have a single slave device lets call it (Address_slave) and that slave device has 15 registers(Address_1, Address_2,..., Address_15). Is there a way to read a specific one of these registers with ...
0
votes
0answers
14 views

How to upload arduino code using xbee module ( pro s2c)?

I have three arduino ATMega2560 boards, all have xbee pro s2c attached to them. Now i want to update the code i had previously written on the arduino board but without connecting it to the computer. ...
0
votes
1answer
77 views

Arduino I2C Register Read

I am trying to read a specific register from a device. In this case I am trying to read the value stored in register 0X1F from slave device 0x08. On the scope I see writes for ADDRESS_SLAVE(Wire....
-1
votes
3answers
81 views

Can I use Arduino for my purpose? [closed]

I am trying to make an agv (automated guided vehicle) that will be line following, will have obstacle detection along with dragging 200 kg of weight in drums with wheels. My project is for industrial ...
2
votes
1answer
238 views

Wrong conversion of time_t to char

I have a simple sample of code that i want to convent a time_t to char array in order to concatenate it after, in an other array. Code: time_t unixt; char exm [40]; unixt = RTC.get(); Serial.println(...
0
votes
1answer
9 views

Arduino Nano, Uno and Mega - XBee connection difference

I have a simple sketch working on arduino Uno and Nano sending data using an XBee. However, if I run the project on an Arduino Mega it does not work. What differences between Uno/Nano and the Mega ...
0
votes
0answers
41 views

How to make Variable Frequency Drive (VFD) Inverter using Arduino

I have a VSI SPWM Inverter Project, but my supervisor ask me to upgrade it to a VFD Inverter. I've found a code about how to generate 3 phase SPWM in this article, and i've tried the code. The output ...
0
votes
1answer
38 views

RFID RC522 reads the previous tag serial with different tag

I hope someone can help me. I'm using a Mega with RC522, and this happens: I use a tag, it reads the right serial (e.g. AA:BB:CC:DD). Then I use a second tag and sometimes it gives me the correct ...