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
40 views

Using an Arduino to rotate a DC motor once a minute (edited)

I’m trying to write an arduino sketch that makes a dc motor turns one full rotation every 60s similar to a clock. The arduino will be connected to the gate of a typical mosfet and the dc motor will be ...
1
vote
4answers
328 views

Need some Hardware advice with arduino

I am fairly new(having less hands on experience) to Arduino and electronics in general. I have a project for which I know the features and required electromechanical parts. I need some advice in ...
0
votes
1answer
15 views

Power supply for DIY Arduino CNC Router

I am making a CNC router from a dremel and 3-5 NEMA 17 steppers. I am really confused on how I can power all those motors. I am using a RAMPS 1.4 with Arduino Mega. I have a 2.4A USB power supply. Is ...
2
votes
0answers
29 views

Does anyone know code for a filter that bypasses small vibrational movements in my accelerometer input data

So basically I have a DC motor that is self stabilizing a platform using an accelerometer as its input. When i hit the table, everything freaks out and the platform moves rapidly back and forth for a ...
1
vote
0answers
28 views

Stepper motor not working as expected

Kunal Gupta: Guys plss help me .... I am having issues in using stepper motor I have tried both 28bjy with uln2003 and l293d .. giving it output supply of 5V . Motor is vibrating but its shaft is not ...
1
vote
0answers
26 views

Arduino MEGA 2560 board doesn't transmit RF signal

I tried to test RF communication using nRF24L01 with 2 Arduino boards ( between Arduino Nano and Arduino mega). Codes are working fine (They are very simple codes). When I set Arduino nano as the ...
1
vote
2answers
44 views

I need help creating a code that moves a DC motor CW or CCW based off of 2 different buttons

I know I can make the motor move backwards and forwards with buttons but I don't want it to move at full speed. I want it to increment in very small amounts to where it can be adjusted very small ...
0
votes
0answers
29 views

Not getting input from sensor using timer

I wrote a code to move linear actuator and lights up and down using timer. But its not getting Sensor input please help me in this. #include <avr/sleep.h>//this AVR library contains the methods ...
1
vote
0answers
18 views

ST7920 and u8g2 only using some of a 128x64 display

I am trying to use the u8g2 library and an Arduino Mega to control an LCD display. Adapting HelloWorld from the examples included in the library to use the SPI ports of the Mega (50-52), I have the ...
2
votes
1answer
112 views

Inaccurate and non-precise voltage reading from Arduino Analog pin

float get_volt() { rawVolt = analogRead(voltageSensor); vOUT = (rawVolt * 4.6) / 1024.0; vIN = vOUT / (R2/(R1+R2)); //if(vIN>12.0){vIN=12;} //if(vIN<11.12){vIN=11.12;} //return (vIN -...
1
vote
2answers
54 views

Read Internal Registers of RS485

I am trying to interface sele EM2M, I am using Arduino Mega with RS 485 module. I want to read the internal registers I am using ModbusMaster library. The data which I want to receive is in the ...
1
vote
0answers
32 views

How to make 16 coin vibration motors and 5 servos work at the same time on a Arduino Mega?

I saw in Arduino Mega's datasheet that the sum of currents out of all input/output pins combined should be maximum 200mA. But I want to make 16 vibration motors and 5 servos work together on the same ...
1
vote
0answers
17 views

Downloading code from Arduino mega [duplicate]

A while ago I made a code for a drag timing system and uploaded it to my Arduino mega after that I broke my computer and got a new one and I don't have that code anymore. Does anyone know how to ...
0
votes
1answer
29 views

storing 600 unsigned int values in an array and find minimum and maximum values

I am reading an ASCII serial data values from a sensor and storing it in an unsigned integer variable. The values are ~45000 to 50000 range. I need to store 600 values and then find the minimum and ...
1
vote
0answers
29 views

serially parse integer after serially read

I want to write below code but I don't know where I doing wrong, so please help me solve this issue. Serially read some text like number then I want to serially parse integer value into some variable ...
1
vote
2answers
49 views

Using LM70 temperature sensor with Arduino

I am trying to sense the temperature using the LM70 temperature sensor with an Arduino Mega. As you can see in the Datasheet, it uses the SPI protocol. I have made the following connections (VSSOP-8 ...
3
votes
2answers
31 views

AMIS30543 - Library code | Order of pinDirection and pinOut

This piece of code was taken from AMIS30543- Arduino library, void init(uint8_t slaveSelectPin) { ssPin = slaveSelectPin; digitalWrite(ssPin, HIGH); pinMode(ssPin, OUTPUT); } Facts I know ...
0
votes
1answer
42 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
votes
0answers
18 views

Arduino mega as isp to program 328p

Hiii friends I am programming atmega328p using arduino mega as isp for long time Today ... It suddenly showing invailed device signature ..... So.... I tried another atmega328p and it worked..... But ...
1
vote
0answers
104 views

How to read/write a 125 kHz RFID tag or card? [closed]

Can someone tell me (I think not only I'm interested in it) how to write a 125 kHz tag or card? There is a video on Youtube where this Russian guy makes his module from scratch, but I want ready-made ...
1
vote
0answers
27 views

Arduino wait for incomming data from blynk terminal [duplicate]

I need to add wait command in code where it waits the next input value from blynk terminal to arduino? How can I do that? please help, I will appreciate your help, Thank you. Here is my code ...
1
vote
0answers
31 views

Read from Blynk terminal number to arduino

I have a problem in sending numbers from blynk terminal to arduino serial monitor. When I send any number from blynk terminal the arduino always getting 1. How can I get any number please help me. ...
1
vote
0answers
38 views

Having a bunch of global variables or calculate them on the go on an Arduino, as far as memory is concerned

So I'm new in the arduino world but I have a grasp of object oriented programming, and decided to write a little library for running games on an arduino mega using a display. My question is, I'm ...
1
vote
1answer
36 views

working with ultrasonic sensors

I have a little problem dealing with ultrasonic sensor I want a simple thing , when the sensor read High pulse then after it low pulse , turns on the led so I try to make it with a 5cm distance and a ...
1
vote
1answer
69 views

Can Arduino UNO permanently store a code?

I'm really new to Arduino and wanted to know if I can make Arduino a permanent controller? and could you help me with a cheaper alternative? I also wanted to know about "fuse", i read it ...
0
votes
1answer
29 views

Error “cstddef: No such file or directory” on use AzureIoTHub

Good Morning I'm trying to integrate with Azure IoT with Arduino Mega 2560. I imported the AzureIoTHub and AzureIoTUtility lib. I just created this part of the code #include <AzureIoTHub.h> ...
2
votes
1answer
104 views

My motor driver gets stuck in either high or low with a certain speed super randomly. Motor output stops going based on accelerometer input

Running a DC motor(6.5A max input), motor driver (MD10C 7Amp peak output), and arduino Mega. Basically, I am creating a stabilized object based on the accelerometer's input. It works great but all of ...
1
vote
0answers
20 views

Connect and detect multiple arduinos using firmata

i am trying to connect several arduinos to usb ports and have the abillity to define between them. i added Firmata.attach function on the arduino board. how do i call it from my python script? thank ...
1
vote
1answer
37 views

Saving a value with a click

I have a rotary encoder and 2 buttons to a. Store the encoder value b. Reset the encoder value to 0. The reset buttons work fine the issue is with the set/store button. Where the value changes without ...
0
votes
0answers
42 views

Error compiling for board Arduino Mega or Mega 2560

#include <Servo.h> // Include Servo Library #include <NewPing.h> // Include Newping Library #include<SoftwareSerial.h> #include <dht.h> //Include the DHT library ...
0
votes
1answer
15 views

log STK500v2 commands while flashing a Mega

My final goal is to replicate the process with which the PC programs the arduino. I have gone through the commands.h file and made a couple of attempts to get the logic right. But no success at ...
1
vote
1answer
47 views

Timers, PWM pins and digital outputs on Arduino Mega

I'm using an Arduino Mega to control motors via PWM and Adafruit DRV8871 motor drivers. I also use TIMER1 for a timed interrupt. After adding the TIMER1 interrupt I discovered I had problems with ...
2
votes
1answer
37 views

I want a bar type display for my Arduino Project

I am trying to make a smart table project. But I have stumbled upon one problem, that is I don't know which display should I use. I need a display that has roughly aspect ratio of 2:1 but also has a ...
3
votes
1answer
142 views

Wrong documentation for Mega2560 SPI Pins?

This page https://store.arduino.cc/usa/mega-2560-r3 contains the following image under the Documentation section. It shows digital pins 10 to 13 with labels SS, MOSI, MISO, and SCK. However, this ...
2
votes
1answer
60 views

The analog read is not giving the correct waveform as that of an oscilloscope

I have this code that fetches analog input values from terminals A0, A1 and A2 of Arduino mega 2560. But, when I plot the data, it does not give the desired waveform. The desired waveform is parallel ...
1
vote
0answers
37 views

Several lines of code stop program from running?

After a lot of help from you guys (huge thanks) Ive completed my code and gone to test it. unfortunately though one line of code weight = (tip_read.get_units()); stops anything from happening and on ...
1
vote
1answer
31 views

Arduino array error

I'm writing a program that has a sub program that saves values to an array, but the sub program that saves the values to the array comes back with an error telling me that the array isnt declared in ...
2
votes
1answer
28 views

FastLED not performing as expected

I'm fairly new to working and programming with arduinos. The project I am working on is a digital clock which uses a string of WS2812 leds to light up the correct numbers. Each digit consists of 7 ...
0
votes
0answers
26 views

How to tell if there is a line break from Nextion display to Arduino at Serial

Well I am trying make language page with Nextion display and Arduino Mega. If user enter the language page Nextion display is sending page name with this commend to Arduino for which is current page. ...
1
vote
1answer
58 views

printing data from gps on Serial1 and sensors into Serial

I am having some trouble using my gps (on Serial1) with my other sensors. They both work great independently but when I use them in the same code, it's either the gps or the sensors that get to write ...
1
vote
1answer
27 views

About maximum length of matrix can be use for matrix invertsion on atmega32

what is the maximum length for matrix can be used for matrix inversion on atmega32,for example,can we implement matrix inversion for 15x15 matrix on atmega32? And if it can be done on atmega32..does ...
0
votes
1answer
39 views

I get an error saying, “exit status 1 expected initializer before 'void'.”

I will be wiring a switch to the Arduino that controls the voltage. When the I turn the switch it can adjust the voltage from 0 to 5. The overall task is to print the output voltage. The print is to ...
1
vote
1answer
31 views

Read two HX711 load cell amps

I need to read two values from hx711 load cells connected to strain guages. Ive found the code below that reads one guage, but being self taught and with little experience I have no idea how to adapt ...
1
vote
0answers
24 views

Function not delclared in scope [closed]

Its a bit of a long piece of code so thank anyone for your help, I'm having several problems with it. at one point in time when I was testing it when I called sub routines they worked fine. but now ...
1
vote
0answers
20 views

Which pin triggered MCP23017 interrupt

This is my first post here, so apologies in advance if I've done something against any forum guidelines! I have a project where I am monitoring multiple switch states with an Arduino using multiple ...
0
votes
1answer
68 views

Trouble programming custom ATMEGA2560 board

I need some help. I copied the heart of MEGA2560 design into a new project. I have the new PCBs with blank MCUs and now I need to get things programmed. (I have an existing project that runs on a ...
1
vote
0answers
22 views

How to create QR code [closed]

How to create qr code based on 30 digit number and send the generated qr code to wireless printer.
-1
votes
1answer
36 views

Sending data struct with 2 int fields from Arduino to Raspberry via NRF24L01

I'm trying to do wireless thermometer on max31865 arduino and nrf24l01 but I'm having problem sending whole data struct I can send int or char arrays but when I try to send whole struct I got output ...
-2
votes
1answer
78 views

What is the maximum size of Static Json Document in Arduino JSON?

I'm trying to do serial communication between Arduino mega and a esp8266, and having issues with determining the size of the JSON document. I have read that the receiver buffer size should be greater ...
0
votes
3answers
78 views

Better way for connecting to Arduino pins to a sensor than jumper cable

Well I have an dht21 and arduino mega. Dht21 leads look like this If I use jumper cable and soldering dht21 leads with jumper cable than plug-in my arduino's socket. it looks like this below image. ...

1
2 3 4 5
34