All Questions
Tagged with arduino-nano programming
62
questions
2
votes
0
answers
67
views
Arduino NANO RF reciever and Digispark Attiny 85 transmitter issues
I am trying to send RF signal from Digispark Attiny 85 (this one) and receive the signal with Arduino NANO V3.0 ATmega328 (this one). Transmitter and receiver are STX882 and SRX882 (these). Library ...
3
votes
0
answers
36
views
Can I use regular pins (Example: D2, A3, etc...) as serial (RX, TX)?
Python/Arduino Beginner here...
I have a DFplayer I am trying to hook to my Arduino and I want to hook it up through the regular pins instead of the RX and TX pins, but I've not been able to find ...
3
votes
1
answer
140
views
Arduino hangs / freezes - can't figure out why
I am building a remote controlled boat. My remote project freezes after an arbitrary amount of time. The serial stops output, the OLED doesn't update anymore and instructions are not send / received ...
1
vote
1
answer
204
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);
...
1
vote
1
answer
51
views
RF Keyfob single button code
I'm making a project where a 2 channel RF keyfob (433Mhz) controls an led using arduino nano. As for the hardware everything works and I have tested it with the example decoder code and it works fine. ...
1
vote
1
answer
115
views
I am trying to add a countdown to my Arduino code but it does 0 days, 04:09:36 instead of starting at 7 days
The code I use probably has a math problem since an Arduino can only count a 16 bit integer. This problem is with the WeekDelay() function.
The project is for an Aerogarden. It pumps water into the ...
-1
votes
1
answer
124
views
I have been having a lot of trouble adding a countdown to a piece of code [closed]
This is the code. The /// are where I added the countdown. Unfortunately the countdown only goes down 9 seconds. What I want it to do is go down the full 24 hours. I have been trying to fix this error ...
1
vote
0
answers
175
views
RTClib.h problem
In Library Manager RTClib and DS3231 work somehow with older versions. RTC time can picked only once and then it give bullshit. Using newest versions screen is empty.
In picture first time is right, ...
0
votes
1
answer
414
views
Problem Using pins A4 and A5 for input and output I2C
Hardare used:
Arduino nano ( old Bootloader )
Oled Monochrome Display ( 4 pins, 128 x 32 )
MPU 6050
Both display and MPU use A4 and A5 as I2C communication protocol, They interfere, as the MPU is used ...
-1
votes
1
answer
78
views
Arduino Sleep to conserve battery - How to intergrade it to existing sketch - HELP pls
My sketch below is simply using a touch sensor to activate a servo motor to go from from initial position 0 to 180 then back to 0. then I want the Adruino NANO to go to sleep to conserve some battery ...
3
votes
1
answer
136
views
Anyone know why my pushbutton is always returning HIGH?
Been trying to figure this out for a couple hours, despite how ridiculously simple it should be. I have no idea why it's always returning 1, even when i'm pushing the button. Fritzing sketch:
My code:...
1
vote
2
answers
171
views
Delay coding not working as expected
Added second attempt at bottom of code, Please check it, works with out lag time but never turns Vacuum off? This project is pretty well explained in the code description. My main problem is I need a ...
1
vote
0
answers
103
views
Project doesn't work after 2 - 3 times, requires frequent turning off and on
I am new to Arduino and I am working on a project. This project inspired me and I tried doing it.
The following code was provided in the description:
int maxPeople = 5; // maximum number of people ...
2
votes
3
answers
851
views
Create a dead zone for joystick
I'm trying to create a dead zone so the joystick will turn the motor off completely when in the center position. It's much too sensitive and will start the motor if barely touched. How could I fix the ...
0
votes
2
answers
419
views
random() Function isn't random at all
I'm using the random() to generate random coordinates for coins in a simple game console. The problem here is that the random() function is not generating random numbers, since the coin is at the same ...
1
vote
0
answers
464
views
How to change the update rate in TinyGPS++?
I am working with TinyGPS++ library and Arduino-nano and I want to change the update rate.
I worked before with Adafruit GPS and uses the below code for updating it.
// Set the update rate
GPS....
3
votes
2
answers
321
views
Arduino Nano randomly resetting
I am currently struggling with an intermittent problem with an Arduino project.
Background
I am using a LabVIEW program to control a few pieces of hardware. One of them is a NEMA 17 stepper motor that ...
3
votes
1
answer
667
views
How to program Esp8266 remotly via wifi?
I hope it's not a sci-fi for arduino. But I saw that dual system with two MCU can program each other via radio connection. It has been done in experimental space cube projects.
It is theoretically ...
1
vote
2
answers
252
views
Is it possible to send 2 or more o/p signal at the same time?
I wanted run two motors using Cytron MDD10A Dual Channel motor driver. So my concern is based on execution of code that is done line by line, in that case when I'm driving two motors will this delay ...
1
vote
1
answer
1k
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 ...
1
vote
2
answers
239
views
Counter program
I'm an absolute beginner, and lately I had some problem with this program I was trying to do.
Basically I wanted with the Arduino to count 3 pulses from an oscillator and store the time of these 3 ...
0
votes
1
answer
1k
views
Program Nano Every using UPDI port
I have and Arduino Nano and an Arduino Nano Every. I'm doing some experiments and trying to program the Nano Every from the Nano, using the UPDI port.
I'm using tutorials like this one that does the ...
1
vote
2
answers
171
views
Bike Gear Indicator Coding Problem
Lack of practice I forgot many function of C & C++...
Can anyone help me with this coding Please...
I think this is The Main coding:
Topic: Gear indicator
I first found this, Gear_Indicator_Raw
...
2
votes
1
answer
362
views
Arduino Project Interrupt Error?
I have a project to be made i.e. water Billing System using RFID(Mfrc522) on Arduino NANO.
There is one difficulty that I haven't been able to overcome. I hope someone could help me out.
Project flow:
...
0
votes
1
answer
441
views
FC-16 led matrix module based on MAX7219
EDIT:
const char *pc[NUM_ZONES] =
{
"ROOM", //0
"SUBJECT", //1
"GRADE",//2
};
I did this and I can't get them to display every row simultaneously.
void loop(void)
{
DateTime now = rtc....
1
vote
1
answer
538
views
Reduce Sketch Size Help!
I dont know what to do?
Sketch uses 3712 bytes (12%) of program storage space. Maximum is 30720 bytes.
Global variables use 210 bytes (10%) of dynamic memory, leaving 1838 bytes for local variables. ...
-1
votes
2
answers
3k
views
Connecting an Arduino Nano to a Raspberry Pi Zero
I'm working with an Arduino Nano Every, and I'm trying to connect it to the Raspberry Pi Zero for data collection from I2C sensors and writing/program code from the Pi to the Arduino. Typically, I ...
0
votes
0
answers
49
views
RF24 code not working:
I watched this video and used his transmitter code and receiver code. However, it's not working. There's no response from the receiver.
The transmitter stuck at the loop:
if (!radio.write( &data,...
-1
votes
1
answer
639
views
How to use H3LIS331DL 3-Axis Linear Accelerometer with arduino to detect Harsh braking of vehicle
I am a newbie here, Recently I was working with H3LIS331DL 3-Axis Linear Accelerometer I²C Mini Module
Here is code for the X, Y, Z-axis.
#include <movingAvg.h>
#include <...
0
votes
2
answers
1k
views
Using an Arduino Nano to program (as ISP) a standalone 328p
I uploaded the ArduinoISP sketch to an Arduino Nano to use it as a programmer for other chips.
It worked successfully to program an ATtiny45, I did the usual wiring between them, and added a 10uF ...
0
votes
1
answer
329
views
How can I stop a loop when using a servo with a Key input?
How can I stop my following code using a key?
Basically the code should run the servo in a loop if "t" is pressed and stop the loop if "s" is pressed.
#include <Servo.h>
Servo myservo; // ...
1
vote
0
answers
56
views
Rocket deploy system
I found a code from Astronomica Messier that allows to activate a servo from a Gyroscope MPU 6050 change in direction. I followed the wiring and uploading correctly. The thing is that the MPU is ...
3
votes
1
answer
477
views
led chaser fill color effect
Please help. I am learning a lot about Arduino. Most all in lightning. I am a newbie. I play with nano and LED ws2812 and use fastled library.
What ask is to make effect like fill effect. For ...
1
vote
3
answers
2k
views
How to automatically reset the NRF24L01 module
For my home-automation project I'm using several arduino nano's with each a NRF24L01+ module. Each module is able to both receive and transmit with one another. Everything seemed to be flawless for a ...
0
votes
1
answer
97
views
Segmentation fault and huge SRAM need for Serial.println
I have written my own 'assert' since I want to use it for both Windows and Arduino. The class is called from many files (about 10).
AssertUtils.h:
#pragma once
#define assert(expr) AssertUtils::...
2
votes
0
answers
97
views
ARDUINO PROGRAM
I have a project that consists in measuring the mass of an object with a strain gauge HX711.
so I found an interesting Arduino program and the editing that goes with it.
but I have a problem, I ...
0
votes
1
answer
396
views
exit status 1 'mySerial' does not name a type
I just can't make it work for some reason. I tried #include <SoftwareSerial.h> and I tried #include "SoftwareSerial.h". Can someone help me?
#include <SoftwareSerial.h>
SoftwareSerial ...
0
votes
1
answer
100
views
Help with coding Arduino Nano to run fan through slide switch at specific intervals
I’m trying to use Arduino Nano to run my 5 V PC fan, which, I know it sounds crazy, it’ll be mounted on a piece of Tupperware that’ll control the airflow through it via the fan. However I have no ...
1
vote
4
answers
3k
views
How to blink led and run another code at same time?
I had written a code to calculate rpm of the motors using IR sensor and
Arduino nano and displaying it on OLED . With that I want an LED to
blink always. Here is the code what I did:
You can skip the ...
0
votes
2
answers
4k
views
How to read a PWM OUTPUT PIN value?
How to get a pwm pin value that is in pinMode OUTPUT?
How to get a digital OUTPUT PIN value:
#define pin 3
void setup()
{
pinMode(pin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
delay(...
0
votes
1
answer
194
views
Trying to read the current position of a flex sensor and store it as a variable? NANO ATmega328p
I am trying to write a code to read the current position of a flex sensor when a button is pushed and use that data to pulse a piezo. I set it up to read the flex sensor and to alarm when it gets 100 ...
0
votes
2
answers
6k
views
Stop Buzzer after some seconds/time?
This is a "water level alarm/display" sketch using and Arduino and ultrasonic sensor.
The buzzer gets on when the water level hits 100% or more.
But most of the time the water level will stay @ 100%, ...
7
votes
2
answers
553
views
Storage usage of methods compared to copied code
When you have really small snippets of code that are repeated several times in your micro controller program, is it better to write a method? I mean better in terms of performance and storage usage. I ...
-1
votes
1
answer
106
views
Linux IDE 1.0.6 & Nano: Problem with if statement [closed]
This is a basic battery monitor for a solar-powered control box. It keeps the solar panels tracking the sun.
The Arduino monitors the voltage on the battery and turns on an AC-powered battery ...
1
vote
3
answers
1k
views
Issue with If statement and boolean logic
I'm trying to control motor based on rain sensor and my own build anemometer. It should only controlling motor clockwise/CW for open the roof if there are no rain (indicated by value above 900) AND ...
8
votes
6
answers
19k
views
how fast does loop() run in Arduino
Hi I am using Arduino Nano to gamify my experience on Unity3D. I know that Update() in Unity3D runs every frame per second but I because I'm not an electronics guy I don't know how loop() function ...
2
votes
3
answers
1k
views
Constructing my own serial command syntax to control arduino
I know this is a basic question, but as a hardware electronics guy and not a programmer I cannot seem to fathom how to do this - so any examples of code would be greatly appreciated:
I want the ...
0
votes
1
answer
1k
views
HMC5883L not working in continuous mode!
I'm just starting with the HMC5883L, I'm writing my code with C and also my own I2C library.
I noticed that the values on the Arduino IDE's serial monitor are constant.
Then I developed a function ...
1
vote
1
answer
393
views
Cannot obtain reading from meter (Modbus)
I have a system in which I am taking readings from a meter and processing it through an Arduino Nano. My code looks as follows:
#include <SoftwareSerial.h>
#define SerialControl 7
#define ...
2
votes
1
answer
5k
views
Arduino Nano TX LED is on
My Arduino nano make weired thing...
The TX LED is on when i define a Variable and a digital Pin as output. Do you now if it is a error in the code? If I upload a clear new sketch the LED is off.
~...