Questions tagged [arduino-nano]

The Arduino Nano is a small board based on the ATmega328 or 168. It has male headers, so it can be plugged directly into a breadboard. It is small and compact, and features a USB chip.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Execute a function out of loop()

I have this function void fadingLED() { //Lo del led analogWrite(LED, brightness); // change the brightness for next time through the loop: brightness = brightness + fadeAmount; // reverse ...
1 vote
0 answers
17 views

How to use LiPo powered Arduino Nano BLE when it's charging (with a charging circuit and a boost converter)?

I have a project where Arduino Nano 33 BLE (3.3V operating voltage) is powered by a LiPo battery. The battery is charged using Adafruit's MicroLipo Charger it is then connected to Adafruit's MiniBoost ...
0 votes
0 answers
28 views

Determine the SOC and SOH of a 3.2V LiFePO 4 using Arduino Nano

I wanted to replicate this BMS I have seen in youtube because I cannot afford the price the owner is asking. I want to explore how to do it. Here's the youtube link I already have the codes for ...
2 votes
1 answer
30 views

Why is Arduino not visible in MacOS USB port list?

When I connected my Arduino Nano 33 IoT to my 2017 iMac (Ventura OS), the USB port did not show in the Arduino IDE port list, even after double-clicking the Nano reset button to put it in the right ...
1 vote
1 answer
68 views

Checking a thing about interrupts

If I disable interrupts (for example noInterrupts or cli) and enable them (interrupts or sei for example) later, would interrupts which would have executed in the window in between fire by the ...
  • 33
2 votes
1 answer
59 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 ...
2 votes
2 answers
65 views

USB serial communication arduino nano and jetson nano

I want to communicate between Jetson nano and arduino nano through serial. I wrote a simple script to test functionality but I receive strange data here is the arduino code void setup() { // put ...
2 votes
1 answer
217 views

How does the compiler/assembler work wrt bootloader?

I realized that on the atmega boards the bootloader is programmed into the chip. I'm curious, when compiling a sketch how does the compiler/assembler differ from compiling a standard C program for a ...
2 votes
1 answer
142 views

Change Interrupts on the ATTiny 88

I am working on a project that requires a number of I/O pins for various purposes. I chose the ATTiny88 because it has plenty of GPIO pins, and is relatively inexpensive. Here is the updated code per ...
2 votes
1 answer
42 views

Arduino code working via IDE, not via PlatformIO Arduino code [closed]

I have a working Arduino code. The code works as intended when I upload it to an Arduino Nano using the old bootloader via the Arduino IDE. However, when I upload the same code via PlatformIO, the ...
  • 21
-1 votes
0 answers
20 views

USE OF GPS +GSM+LoRa+WebServer

I'm new to this forum. I hope I'm posting this in the right place. I'm working on a project that involves the GPS location of safety lights on radio communications towers. I need to show on Google ...
1 vote
0 answers
40 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 ...
1 vote
2 answers
56 views

How to configure watchdog for the arduino Nano 33 BLE Sense board?

For the arduino Nano 33 BLE Sense board, the standard avr/wdt.h is not available. And it seems that no standard library provides it. How to use the watchdog system for this board ? I found no full ...
-2 votes
1 answer
43 views

How to connect Arduino Nano to Thermal Printer via serial connection

I have a generic Arduino Nano board that uses the old bootloader. I have the printer and the Arduino connected like so: This is my code: #include "Adafruit_Thermal.h" // Here's the new ...
-1 votes
1 answer
54 views

variable 'LiquidCrystal_I2C lcd' has initializer but incomplete type

I have a problem with lcd, I have NUCLEO64 L746RG , I have Lcd Display and I2C connected to it. When I verify code it gives me and long error and I can not find the solution or cause of this error: ...
-1 votes
1 answer
74 views

Serial port stops receiving data after random amount of time

EDIT: Things I have tried so far: Increasing the baud rate, but this didn't make any difference as it still continued to stop receiving data after random amount of time. I tried testing one sensor ...
2 votes
2 answers
88 views

Arudino receiving interrupt command BEFORE entering sleep mode causing it not to receive any interrupt commands in order to wake up

I've written code for an Arduino Nano that when a button is pressed, it sends an IR command. It is set so that if no button press has been received for a period of 10 seconds, it will enter sleep mode ...
1 vote
3 answers
139 views

Multiplexing three VFD tubes — why are the segments and the display timing incorrect?

I'm using an Arduino Nano, a UNL2803 IC, and three 2N3904 transistors to drive three seven-segment vacuum fluorescent display tubes (IV-6) in a multiplex configuration. The UNL2803 is used to drive ...
0 votes
1 answer
56 views

Rotary encoder weird values

I am trying to understand this rotary encoder I have, but it makes no sense to me. I am using this rotary encoder: https://www.amazon.com/gp/product/B07DM2YMT4/ CYT1100 aka CY110 aka EC11 I am using ...
  • 103
1 vote
1 answer
119 views

Arduino nano 33 BLE serial port not working with C# app

I use an Arduino Nano with some sensors and send data to a PC using the serial port. I just got a new Arduino Nano 33 BLE and tried the same code but its not working. So for testing I just wrote some ...
1 vote
2 answers
73 views

Analog Microphone values not changing

I just bought a microphone for my Ardoino Nano 33 BLE. The mic can use both Analog and Digital input. Here is the mic and how it's connected. Here is the code where I read the input int sensorPin = ...
  • 11
0 votes
1 answer
39 views

Single Method for 2 Ultrasonic Sensor is not working as expected

So I have created a method to read and return Ultrasonic Sensor Data. I have 2 Ultrasonic Sensors. Below is my code.    // Ultrasonic Pins    #define T1 2 &...
1 vote
1 answer
49 views

TMRpcm not compatible incompatible with current board

My goal is to play sounds with my Arduino Nano Every. I tried the example sketch that comes with the library but I get the error: **WARNING: library TMRpcm-master claims to run on avr architecture(s) ...
  • 29
1 vote
1 answer
163 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 votes
1 answer
49 views

How "fast" could GPS data be refreshed while moving and does it depend on the mcu?

I'm using Nano Every and SIM33EAU GPS module for my project and today I went riding shotgun to test how it works when moving on the road. I am using u8g2 library and one of the things that I have ...
  • 89
-1 votes
1 answer
34 views

Arduino Nano Doesn't Upload Any Code After Connecting It In Reverse (Rotated 180°)!

I've Made A PCB Which Includes An Arduino Nano. I Soldered Some Female Pin Headers Instead Of Soldering The Arduino Itself, So That I Can Easily Plug/Unplug The Arduino Board. It Was All Good, Until I ...
-1 votes
1 answer
66 views

Arduino code works when connected to laptop, not when connected to battery or wall socket

So I have an Arduino nano, and I am using two SG90 servos, and 1 BMP280, and 1 MPU6050. My code works fine when I plug my nano into my computer, but when I connect the battery to my nano, it doesn't ...
0 votes
0 answers
34 views

Writing to ADMUX on 3.7V from battery restarting chip

Given: arduino nano (atmega328P) with nrf24l01. What am I trying to do: Measure battery drain. What am I doing for that. So I made a small research of how could I measure the battery voltage without ...
2 votes
0 answers
201 views

OLED screen goes blank on delay() - U8G2 library + Arduino Nano [closed]

Description I'm currently trying to get this SSD1306 0.91" OLED screen with an Arduino Nano with the U8G2 library (as per seller's guide), and in any code I run, as soon as a delay() is executed, ...
-1 votes
1 answer
60 views

Constantly Stream data vía Bluetooth to monitoring

I am using a Bluetooth module HC-05 to Stream data from Arduino to My computer. In they computer I am using a python script to receive They specifications: Baud rate: 9600 But I am getting an error. ...
1 vote
1 answer
82 views

Confusion about Oscope reading of Arduino Software Serial

I am trying to troubleshoot a Software Uart Connection from my Arduino Nano, and I do not understand this output. The setup is simple, I have a Software Serial connection on pins 2 and 3. I send 170, ...
0 votes
1 answer
73 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 ...
-1 votes
1 answer
73 views

I2C HMC5983 communication issue

I have a really weird problem, when I run the exmple wire (I2C) scanner from Arduino, I get: I2C Scanner Scanning... I2C device found at address 0x1E ! done However when I try directly to the 0x1E I ...
0 votes
1 answer
66 views

Best practice for wiring two sensors that have SCL and SDA connections

I have two different sensors which have SCL and SDA connections which I am trying to connect to an Arduino nano. From what I understand, connecting both of these sensor to the A5 and A4 pins doesn't ...
  • 9
0 votes
1 answer
54 views

Library files multiple users

I want to place all of my libraries on the server. Currently the sketches work fine and as far as I know the libraries are coming from the individual linux mint machines using cinnamon, releases vary ...
  • 1,589
0 votes
2 answers
93 views

Lag in sensor reading when Arduino Powered with 12V adaptor

So I am trying to power an arduino to measure water flow. It works all fine and dandy when I am powering it with laptop, but when I directly power it with 12V 1.5A adaptor the readings take a second ...
1 vote
1 answer
115 views

Why does Serial.print(1) cost 228 bytes more program memory compared to Serial.print((char)(48+1))?

Just discovered this. When I cast an int to a char inside a Serial.print statement it costs way less program memory. I'm not sure why. Could someone explain this to me? In the following example the ...
  • 55
-1 votes
1 answer
45 views

Function call only works if called once

I have 3 LED chains which are all mapped to concentric rings. Each ring has a its own 2D array with the chain number & LED number. I have a function that is passed a ring array and then lights the ...
  • 149
0 votes
1 answer
159 views

On Linux Min21, unable to access tools/port (grayed out)

I have dual boot laptop, Windows 11 & Linux Mint 21 (default boot). when running Arduino IDE 1.8.19 using Linux the port not accessible [from tools/port], but if I boot as windows, I can access ...
1 vote
3 answers
102 views

Is there a way to strip a library from all unused parts and defines, automatically?

Say you want to investigate part of the code you use from a rather large library, but it's buried between all kinds of #defines and classes etc, that you're never gonna use in your code. Is there a ...
  • 55
-1 votes
1 answer
189 views

Why does "Get Board Info" not work, but I can still program my Arduino Nano? [closed]

Dear Stack Exchangers, I have been working with Arduinos for probably 10 years, and as a habit the first thing I do when I connect a device to the USB port is run the "Tools > Get Board Info&...
0 votes
1 answer
183 views

How to read and Serial.print the contents (current values) of an 8-bit register?

Currently I'm using: ADMUX = 0b01100000; //example for (int i = 7; i >= 0; i--) { Serial.print(bitRead(ADMUX, i)); } This correctly prints: 01100000 But is there a simpler way? Before ...
  • 55
-1 votes
1 answer
103 views

How to improve button turn on/off experience

I have simple circuit turning lights on and off on button click. It is working quite fine but there is a small issue with button click itself, it is not fully reliable. Turning lights on is pretty ...
  • 125
0 votes
1 answer
84 views

Do I need to connect a capacitor to AREF if using internal reference? _BV(REFS0)

This is from the Atmega328p datasheet. But I see no mention of it in practical examples. So when I'm setting up the timer for ADC with: ADMUX = _BV(REFS0); Should I add the cap? Or might it be ...
  • 55
1 vote
1 answer
63 views

Do these bit settings all mean the same?

ADMUX = ADMUX | _BV(REFS); // uncompounded bitwise OR ADMUX |= _BV(REFS0); // #define _BV(bit) (1 << (bit)) ADMUX |= bit(REFS0); // #define bit(b) (1UL << (b)) bitSet(...
  • 55
1 vote
1 answer
73 views

Can't upload sketch after overheating

I'm using an Arduino nano, after an unfortunate event, The mega chip heat up and when I tried touching it, it burned my finger. After that, I connected to my laptop's USB port and the computer ...
0 votes
3 answers
157 views

How do I go about pausing/stopping the timer1 task setup in this library, so I can use timer1 for something else in my code

So I want to use this library, that uses timer1 to fetch samples from analog input on pin A0. It works great, and so after proper detection I'd like to perform all kinds of different tasks. But for ...
  • 55
1 vote
0 answers
69 views

DS18B20 doesn't work with pinMode for other devices

i do some project. There is DS18B20, 3 mosfet modules, 1 relay, display 1602, buzzer... I built it on bread board, everything worked. Now i soldered it: arduino works, display works but DS18B20 doesn'...
-1 votes
2 answers
112 views

Strange problems driving an Optocoupler (PC123) with a Nano

I'm having some strange issues getting a Nano to drive a PC123 optocoupler properly. What I'm trying to do: In the real world, I need to press a button ONCE, and have the device that I'm connecting ...
  • 1
-1 votes
2 answers
73 views

Robot car not working

My robot car won’t respond to my command. The code below worked before however, this time there is no response. I’ve tried experimenting with the code in the first while loop. I’ve tried different ...

1
2 3 4 5
26