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
2
votes
1answer
34 views

if I add a .cpp file, Serial becomes unusable

I am using the mega 2560. When I just use .ino and .h files, if I use Serial, it works fine, without even using: #include <SoftwareSerial.h> However, when I add a .cpp file I start getting 2 ...
0
votes
0answers
41 views

Arduino Map sensor [closed]

i hooked up a Bosch TMAP (Temperature Manifold Absolute Pressure Sensor) sensor to my Arduino (Data sheet in attached). this sensor simply tell the ECU of the car how much is air pressure in the air ...
0
votes
0answers
41 views

arduino LCD 16x2 rendering problem

I have an LCD screen that is about 5 years old. Recently I decided to set it up and I have the following problem occur at odd times: The actual code currently scrolls a character from left to right, ...
0
votes
0answers
21 views

Can anyone find out why when I run this code for a GPS and BME680 sensor I have no errors but nothing happens

Here is the code #include <Wire.h> #include <SPI.h> #include <Adafruit_Sensor.h> #include "Adafruit_BME680.h" #include <SoftwareSerial.h> #define BME_SCK 13 #define ...
0
votes
0answers
14 views

I am needing to combine the code for a GPS puck and a BME680 [duplicate]

GPS Code: #include <SoftwareSerial.h> SoftwareSerial gpsSerial(10, 11); // RX, TX (TX not used) const int sentenceSize = 80; char sentence[sentenceSize]; void setup() { Serial....
0
votes
0answers
21 views

usb host shield + wireless mouse (Read 5 times)

hello guys i have a problem , i have a usb host shield v2.0 from circuits @home attached to an arduino mega and to a usb wireless reciever mouse , this is the serial monitor output : x=0 dy=3 dx=0 ...
0
votes
2answers
92 views

Communication between 2 arduino boards

I am not really 100% too sure how to do this but I am trying to make my arduino UNO communicate with my arduino MEGA. The reason why I needed to do this was because I was using the RFID module along ...
0
votes
0answers
21 views

Problem with gps.encode() using TinyGPS library

First, see the schematics (attached). The GPS is working properly when I write code only for reading data from it as below: //Connect with pin 18 and 19 #include <TinyGPS.h> //long lat,lon; //...
2
votes
1answer
42 views

Mega: attachInterrupt on pin 18/19/20/21 not working

Task: I'm trying to create a fan-control with the arduino mega. I'm generating a PWM signal on pin 6 and 7 and want to use interrups to measure the rpm of the fans. Problem: On pin 2 and 3 everything ...
1
vote
0answers
22 views

Trouble with basic communication between two NRF24L01 modules

Introduction I am trying to setup a radio communication using the NRF24L01 module because I want to use it to control a tank. The first thing I did when I got the modules was watching some basic ...
0
votes
0answers
25 views

Display GPS module data to my TFT display

I am using Arduino Mega 2560 and I have written code for my GPS module (Neo-6m-0-001/GY-NEO6MV2) and it is working fine independently. I also have written code for Compass module (QMC5883L) which is ...
0
votes
0answers
22 views

WIFI Bee ESP8266, MySQL and PHP

I am trying to update a db table using a WIFI Bee. For the life of me, I can't figure out how to connect to and program the WiFi Bee ESP card. I've looked on DFRobot's website and other websites to ...
0
votes
0answers
11 views

How to power and switch a laser diode? [migrated]

I am quite new to the Arduino business and up until now managed to create a Hexapod robot from a kit based on the Arduino Mega 2560, add Computer Vision and let him crawl around to find target objects....
0
votes
0answers
33 views

Arduino emulator to create virtual 3d printer farm

I'm building a system to monitor several 3d printers, but I just have 1 printer. I'm thinking if there is any opensource tool to launch several virtual Arduino based boards running with Marlin ...
0
votes
0answers
20 views

Serial Hangs with multiple PN532 nfc reader and a TCA9548A

I am trying to use multiple PN532 reader. I have put all my readers on a multiplexer (TCA9548A). The script works well, but when I move my tags on readers sometimes the serial says to me there is an ...
0
votes
1answer
38 views

NRF24L01 +pa +lna modules do not communicate

I am building an rc airplane and I want the controller and the plane to communicate using 2 NRF24L01 +pa +lna modules. I am using an Arduino UNO and a Mega. I hooked them up corresponding to this ...
0
votes
1answer
25 views

Arduino Uno CTC mode interrupt is not tiggering

I am trying to generate LED blink after 4 second using Interrupt but Interrupt is not triggering not even once . Request: if you have arduino uno r3 please check at your end and let me know result. I ...
0
votes
0answers
29 views

Detecting a finger snap(basically trying to replicate infinity gauntlet)

I am trying to make an infinity gauntlet. So it's obvious it should have a snap feature(which will switch of a light,motor or whatever). But I don't know how to go about sense this snap. I thought of ...
0
votes
0answers
16 views

how to make stepper motor and led run sententiously but independent of each other? [duplicate]

I came across a problem with my code, I want to be able to have a servo motor constantly spin while a few leds blink at random. I already have a code written down but the problem is is that it seems ...
0
votes
0answers
26 views

pin 12 not working anymore in both 2 arduino mega after a little time working as an analogwrite

I faced a problem that I use analogwrite on pin 12 on arduino mega for a little time, and then it did not work anymore. I tried with another new arduino and then it happen again. the analogwrite not ...
0
votes
0answers
31 views

Need help Coding Adafruit v1 motor shield for 3 DC motors [duplicate]

My project is that I am building an animated (singing, dancing, head turning, and arm waving) snowman. I have 3 DC motors for individual functions that are to be run via Arduino Adafruit V1 card ...
0
votes
0answers
30 views

How to use AT+CHTTPACT command in SIM7100 and Arduino

I am try to send data over http using SIM7100, here is my code loading into Arduino. I am testing php code and GET function by postman application. #include <SPI.h> char answer; void setup() {...
0
votes
1answer
52 views

Is it possible to overload the digital pins for an Arduino?

I worked on an Arduino project for school that was a self-driving security robot that also acted as a smart home system. It was essentially a self-driving Roomba-like car that included several LED's(...
0
votes
0answers
16 views

How to connect SIM800C to Arduino Mega?

I have the SIM800C module shown in the attached photo, and I have an Arduino Mega. I just want to be able to send messages and do GET commands. My problem is simple: I have no idea how to connect it ...
0
votes
1answer
66 views

Serial communication arduino mega and D1 Wemos Mini

Can anyone help me connecting arduino mega to D1 Wemos Mini serially? Please let me know most efficient and easy steps to setup a communication. Using that following tutorial: https://...
-2
votes
1answer
97 views

Adafruit motor shield v1 Need help Running 3 DC motors simultaneously?

My project is that I am building an animated (singing, dancing, head turning, and arm waving) snowman. I have 3 DC motors for individual functions that are to be run via Arduino Adafruit V1 card ...
4
votes
1answer
124 views

MEGA 2560: Simple program - One analogWrite turns off the other

I'm using Windows 10, Arduino 1.8.12 (Windows Store 1.8.33.0) I have an Arduino MEGA 2560 and a red LED connected to pin 4. #define RED 4 #define GREEN 2 void setup() { analogWrite(GREEN, 0); ...
0
votes
1answer
40 views

How to generate 3 PWM signals

I have 2560 mega, and I Want to generate 3-phase PWM signal at 62.5khz, synced and shifted 120 degrees apart. I need that for 3-phase split-coil boost converter (or even isolated flyback converter), ...
0
votes
0answers
27 views

Java Errors thrown by Ardunio IDE when attempting to open serial monitor

I am only getting this error on one of my Windows 10 PC's. On another windows 10 PC and Mac, the board (Mega 2560) is working fine. Any hellp or advice on this would be appreciated. THE PROBLEM ...
0
votes
1answer
33 views

Linux not recoginizing Arduino Mega2560 Clone

I have an Elegoo Mega2560 R3. On my Windows machine, it recognizes fine and loads exactly like a Mega2560. I have a System76 laptop running Pop_os!. When I attach the board, I cannot connect to the ...
0
votes
2answers
53 views

Motor for a winch (with controller and external power supply)

I'm in need of a motor or continuous servo to power a winch. The motor must be continuous* and reversible, but it does not need to be fast, precise, nor bear a load when powered off. It just needs to ...
0
votes
0answers
42 views

Script works on Mega but not Uno

I'm struggling to get a script to work on an Uno that I've had working on a Mega.The script was made for an Uno and I've used all the same pin numbers as the orignal (Original project). I just bought ...
0
votes
0answers
43 views

Trying to use Timer0 on Arduino Mega

I've recently been looking at Timers and I'm trying to generate a PWM frequency at 250000Hz using Timer0 on PIN 4. When I set OCR0A = 63 I get nothing from the light however when I set OCR0A = 125 it ...
1
vote
3answers
69 views

Arduino Mega keep states after reprogramming

Based on: https://forum.arduino.cc/index.php?topic=440978.0 And some previous experience with Arduinos. What I would like to accomplish here is that I have a 8 channel relay board with the relays in ...
0
votes
1answer
47 views

What is the difference between delay() and delaymicroseconds() [closed]

Does delaymicroseconds() provide something more than the time accuracy
0
votes
2answers
46 views

Arduino digital pin input used to power device?

I am attempting to debug a W65C02 and I am using an Arduino Mega to look at the inputs and outputs of the device, which is behaving weird. I have Pin 22 to 52 connected as INPUT on the MEGA and they ...
0
votes
1answer
96 views

Why are my motors attached to an Arduino MEGA not running?

I verified my code and uploaded it to the board and that was successful. Info: - Using Mega 2560 Arduino Board with Adafruit V1 - 3 DC 12 volt motors - on HP computer Here is my code: #...
0
votes
0answers
71 views

Trouble Uploading Sketch - Issues with SPISettings

Full disclosure - I'm very new to Arduino. I am probably missing something simple. However, I've scoured the internet and can't seem to figure it out. I am trying to use an Arduino Duo Wifi rev2 to ...
0
votes
1answer
57 views

Why is my arduino now working with my LCD 16x2 displays?

So I've tried with 3 different lcd screens and each one has given me something different (https://imgur.com/a/EVzFoVv) and here is my code #include "LiquidCrystal.h" // initialize the library by ...
1
vote
2answers
92 views

Debugging different serial receive / send behavior between Uno & Mega

I have a simple text parser (as a component of a larger project) coded up and seemingly working correctly. It parses a key-value delimited command like the following: <key1=value1;key2=value2;key3=...
1
vote
1answer
75 views

Arduino /dev/ttyUSB0 permission denied even when user added to group "dialout' on Ubuntu 18.04

I bought Arduino Mega board (CH341 usb) and I am able to connect to /dev/ttyUSB0 (upload to device) only by using sudo. OS: Ubuntu 18.04 What I've tried: I have downloaded Arduino IDE and added my ...
0
votes
2answers
41 views

If condition not working as expected

In the last condition in else if (see code marked with ***), I am not getting my screen with the laser/specklke fail, if both failflag 1 and failgflag 5 is there, however it shows me laser fail ...
-2
votes
2answers
69 views

Trouble making my 12v dc motors run on my Mega 2560 Arduino [closed]

Can someone review my code to see if the code is the problem? If nothing is wrong with the code, can someone look at my image and tell me if I set up the shield and the motors wrong and see if that's ...
0
votes
1answer
69 views

Getting coordinates from a touch panel with I2C

Hello world (this is my first message in this forum). I am quite a just-married-to-Arduino guy, I am very passionate about this platform that I kew since long time but never had the time to dedicate. ...
0
votes
1answer
16 views

Update class attribute with attachInterrupt

I want to refactor this code /* YF‐ S201 Water Flow Sensor Water Flow Sensor output processed to read in litres/hour Adaptation Courtesy: www.hobbytronics.co.uk */ volatile int flow_frequency; // ...
0
votes
1answer
86 views

Im having another problem with my code the error is "redefinition of 'AF_DCMotor motor'? [duplicate]

Heres the code #include <AFMotor.h> AF_DCMotor motor(1, MOTOR12_8KHZ); AF_DCMotor motor(2, MOTOR12_8KHZ); AF_DCMotor motor(3, MOTOR34_1KHZ); void setup() { Serial.begin(9600); Serial....
0
votes
1answer
39 views

Counter variable gets reset to 0 without resetting it(Mega)

(Arduino Mega2560) I'm trying to test placing a counter n in a for loop, the problem is, every time it gets out and goes back to the for loop, the n is reset again, so it prints "counter: 245" every ...
0
votes
0answers
25 views

What is this schematic symbol on the Arduino Mega [duplicate]

I'm not sure what this symbol is on the schematic or what it is supposed to do. It looks like an eggshell, and it appears three times; all on the ATMEGA8U2-Mu microcontroller. The three instances ...
0
votes
0answers
34 views

SI5351 Breakout 153,600Hz Square Wave Signal

I'm trying to generate a consistent 153,600Hz square wave signal with 50% duty cycle from a Adafruit SI5351 3.3-5v breakout board for use as a fixed synchronous serial clock reference, but the closest ...
0
votes
1answer
40 views

Crazy Results with I2C and I2C_Anything()

I have the following code in a Arduino Mega function to retrieve two 4-byte integers from a Teensy 3.2. Wire.requestFrom(SLAVE_ADDR, sizeof(float)+ 2*sizeof(long)); mySerial.printf("\n<<<<...

1
2 3 4 5
33