Questions tagged [programming]

The process of designing and writing source code as part of a program (or sketch) for Arduino. For questions about uploading code to an Arduino board, use the [uploading] tag instead.

192 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
53 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 ...
prestonferry's user avatar
3 votes
0 answers
64 views

nano 33 BLE problems with reading RC signal

I'm using an Arduino Nano 33 BLE and a L293D motor driver to control a three-wheeled RC robot. The sketch I'm using worked fine with my Uno Rev3, but I've moved to the Nano for size/weight reasons, ...
starthrow's user avatar
3 votes
0 answers
97 views

My port is grayed out?

Hello I have a question on why my port is grayed out when I go to upload? I’ve watched so many YouTube videos on what’s the problem and have been trying to do everything but just nothing seems to work!...
Tommy Serluca's user avatar
3 votes
1 answer
316 views

TFMini Sensors with Arduino

I have three TFMini sensors I need all of them to detect. I only got one to work , pins 4,5 . My info in coding is basic . I really appreciate your help . Thanks in advance. I think the problem is ...
Soul's user avatar
  • 37
3 votes
0 answers
566 views

Getting atsam3x8e (Arduino Due) to work

I decided to make a pcb based on the atsam3x8e (microcontroller used in Arduino Due). For the design I copied most of the layout that I found on this site and looked at the official Arduino Due ...
Sven Onderbeke's user avatar
3 votes
0 answers
593 views

Do software SPI read from a register using shiftin()

How to read from a register using software SPI, presumably shiftin()? It works using the builtin SPI library + hardware SPI. I seem to be able to write but not read using manual shiftin()/shiftout()...
user avatar
3 votes
0 answers
393 views

How do I install a library in Arduino Yun cross compile environment?

A few days ago, I've asked this question. Thanks to the replies I've received, I've set up a cross compile environment for Yun by following this guide. I've created a virtual machine with virtualbox ...
Nehil's user avatar
  • 53
2 votes
0 answers
137 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 ...
Le_Peck's user avatar
  • 21
2 votes
0 answers
312 views

Coding issue with Fast LED Multiple Colour Palettes in a State Machine

I am working on a project using the WSB2812B LED strip, with a ATmega644A using the MCUdude/MightyCore plug in (https://github.com/MCUdude/MightyCore). I am using Fastled 3.3.3 with Ardunio 1.8.13 on ...
Newbie's user avatar
  • 21
2 votes
0 answers
896 views

Set acceleration for stepper motor with no ending

I have a problem. I am using a stepper motor with 2 buttons. In my code I am trying to rotate the stepper motor clockwise while holding button1 and counter-clockwise while holding button2. To do that, ...
A. Vreeswijk's user avatar
2 votes
0 answers
150 views

Please help with my tinkercad code. Debouncing stopwatch with lcd

#include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int ssPin = 8; int resetPin = 9; bool cntrRunning = false; int sec = 0; int min = 0; double currentMillis; void setup() { ...
Amy's user avatar
  • 21
2 votes
0 answers
64 views

loop once per startup for stepper motor

First of all sorry that i dont know much about programming, most of my codes are just copy paste. And of course, i know this question has been asked before, but while using this code: #include <...
bo na fi de's user avatar
2 votes
0 answers
368 views

SG 90 servos randomly spinning

I started one project where i need 4 servos to control 4 grabbers jaws. i use STM32F103C8T6 with arduino IDE for programming it. The motor TZT Micro Servo 9g SG 90. First, I was playing with stepper ...
Петар Варга's user avatar
2 votes
0 answers
98 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 ...
Marie lesquibille's user avatar
2 votes
0 answers
554 views

Clear Timer on Compare or CTC in ATmega328P, Toggle OC0A on Compare Match

I want to use the CTC on the ATmega328P to play same notes with a speaker, a project that I find in this book. In the data sheet I read: For generating a waveform output in CTC mode, the OC0A ...
Ugo Mela's user avatar
2 votes
0 answers
2k views

Can I use ESP8266 and OV7670 to video stream on a web?

OV7670 image sensor, small volume, low operating voltage, providing all functions of a single chip of VGA camera and image processor. so I am using and ESP8266 to connect to internet and stream the ...
Ahmad's user avatar
  • 121
2 votes
0 answers
46 views

Troubleshooting Program using sensors and actuators

I am doing a project on waste management. I have to separate waste majorly as metal, plastic and other materials. For that using Arduino Mega 2560. I have connected Inductive proximity sensor @ A0 (...
Vasumathi's user avatar
2 votes
0 answers
932 views

Ideal voltage level for attachInterrupt()

Well I am working on old textile machines, it is taking motor RPM with ISR. I want to read this RPM and publish on web. but the output voltage of this old system is 0 and 22 Volt. (0 Volt when the ...
memet569's user avatar
2 votes
0 answers
53 views

Arduino Communication with Xbee

I'm trying to establish a wireless connection between two Arduino's(M0) using xbee s2c, one Arduino as the sender and other as the receiver. But I am not able to receive the message what the Arduino ...
Akk's user avatar
  • 21
2 votes
0 answers
262 views

Installing Optiboot loader for pro mini 3.3V 8MHz

I have tried to install a better bootloader in some chinese Arduino pro mini boards. I have tried the OptiLoader application via an ArduinoAsISP. I failed in some way. The boards got unstable, I can ...
Wirewrap's user avatar
  • 341
2 votes
0 answers
2k views

ESP8266 library / function for IR remote control

I am using IRremoteESP8266 for reverse engineering Hitachi AX-M76E mini stereos IR controller. I want to read the signal that the remote sends and send the same hexas to the stereos with IR led. ...
mico's user avatar
  • 413
2 votes
0 answers
257 views

How to pass input from a Midi controller to a function?

I am trying to pass the input[], data1(pitch) from a Midi controller to the waitForButton function. When a key is pressed it sends data1(pitch) into the array input[], and when the key is up the array ...
Hjhk90's user avatar
  • 291
2 votes
0 answers
74 views

Changing function to work with Midi controller instead of buttons

I am trying to change up this function to work with a midi controller instead of buttons most of the code for the function i will be using as is. it just the parts of the code the deal with button ...
Hjhk90's user avatar
  • 291
2 votes
0 answers
594 views

Arduino Serial Communication Issue

I state that I have already written a similar question on StackOverflow thinking that the problem is with my computer software. Anyway, after some shell debugs, I notice that the real issue is on the ...
youngz's user avatar
  • 33
2 votes
0 answers
74 views

Issue regarding executing sketch code when not connected to USB

`I have an Arduino Uno A000066 Board R3 that has an Arduino A000079 Motor Shield Rev3 attached to it. Also I have connected two DC Servo Motors to the Motor Shield and wrote the following sequence: ...
Catalin Cristea's user avatar
2 votes
0 answers
262 views

Problem with my Arduino project

I am making a smart bin which automatically sense (with the help of IR sensor ) and dispose the trash by moving with help of DC geared motor 12V 60 RPM and it also detects for obstacles with the help ...
Jegadeesh Vontlin's user avatar
2 votes
0 answers
1k views

PC cannot access HC-06 Bluetooth COM port

I have an HC-06 Bluetooth module connected to an Arduino Uno board to allow for the data received by the Ultrasonic sensor to be transferred to my PC via Bluetooth and serial communication. I am using ...
Ghadeer Aiydhah's user avatar
2 votes
0 answers
217 views

Connection between Matlab and Arduino

I'm trying to connect Maltab and Arduino by this code: arduino=serial('COM7','BaudRate',9600); fopen(arduino); But I get this message: Open failed: Port: COM7 is not available. No ports are ...
Jack Sparrow's user avatar
2 votes
0 answers
548 views

Arduino programming attiny13a

Hello I want to program an Attiny13a with Arduino code. I always have this error when I add repository "no file board.txt" in path. How to successfully configure IDE to able burn on it? I use : Link ...
Michał Gałkowski's user avatar
2 votes
0 answers
341 views

How to generate Analog Signal (Voice) to the microphone

I have question about microphone and generating sound signal. I have microphone in my intercom at home. It is simple analog microphone, not digital. What I want is to connect arduino analog ...
dugdthndwytn's user avatar
2 votes
0 answers
574 views

7 Key Educational Piano with Capacitive Sensor

I am working on a project for grade 10 computer science. I am supposed to make a piano that has 7 keys using a capacitive sensor, and the piano is supposed to teach you songs like Twinkle Twinkle ...
31089915's user avatar
2 votes
0 answers
6k views

Aduino Due Can messages

I am trying to read/send CanBus messages using a Arduino Due. As of now I have used https://github.com/collin80/due_can library to setup my Can Bus interface. I am using Vector Software CanAylzer ...
SeahawksRdaBest's user avatar
2 votes
0 answers
1k views

MODbus response for configure data

I am not able to receive data. I am able to send data from master but am not getting any response. This program uploaded successfully. I have below setup to monitor data from Modbus. I have included ...
AMPS's user avatar
  • 467
2 votes
1 answer
180 views

LCD displays an "A" instead of 0

I am trying to make a timer that has a accuracy up to 1 tenth of a second. However when it is suppose to print "0", it will print an "A". For example, when printing "10", it will print "1A". This ...
J. Doe's user avatar
  • 29
1 vote
0 answers
22 views

Code logic to measure values stored in buffer and created nested array

I am having a difficult time creating some logic in my code. I have a potentiometer connected to an ESP32 to simulate a load cell and a range sensor. The value for the force is between 0 and 400 ...
Carlos Costa's user avatar
1 vote
0 answers
41 views

MKR GPS shield inconsistent GPS connection/data printing...library issue?

I have been using a MKR WiFi 1010 board with GPS shield for a very long time (year+) and have not been able to solve my problems with the GPS data dropping out. The setup for my field application is a ...
ktn8rgrl's user avatar
1 vote
0 answers
174 views

How to use multiple PN532 over i2c bus(es) and SPI?

I am working on a project that involves 3 PN532_modules to an ESP32, which sends the Tag_ID over BLE. Plan A was to use One module on i2c_1, second on I2C_2 and third over SPI. The SPI one works as ...
user91535's user avatar
1 vote
0 answers
88 views

how to config size USB mass storage arduino nano ble 33?

I see that they arduino nano ble 33 support USB 2.0. Is there a way for us to create a USB mass storage of about 200kb for convenient storage of configuration files and history files? I see example ...
Nguyễn Thuận Hải's user avatar
1 vote
0 answers
182 views

What is the most simple sketch to confirm the DAC works for audio on a speaker with it's own amplifier for an ESP32?

I have a PC speaker with it's owner power supply (no amplifier needed). It just uses a standard AUX jack. Most examples sketches use an amplifier like the MAX98357A. I have explored some libraries too,...
adamaero's user avatar
  • 198
1 vote
1 answer
39 views

Help with program upload problem

I'm going to upload some code to my LeArm using an Arduino board. I connected the RX and TX pins of the LeArm to the Arduino, but I got an error message when I tried to upload the code. I'm not sure ...
CharNgai's user avatar
1 vote
0 answers
241 views

How can I program an Arduino Pro Mini with an ESP8266-01 connected to its TX and RX?

I am working on a project that uses an Arduino Pro Mini to gather information from various sensor. Once the readings are taken I turn on an ESP-01 from a separate dedicated 3.3v power supply. The ESP-...
user1114881's user avatar
1 vote
0 answers
63 views

How to save the current SPI settings with out have a global variable keeping track?

I am making a function for one of my devices, my device needs a particular SPI setting. I was hoping to save the current setting of the SPI class into some variable, load in the required setting, do a ...
DrakeJest's user avatar
  • 229
1 vote
0 answers
342 views

ESP8266 not sending text message to telegram bot

I've been trying to get my esp8266 to send a message to a telegram bot as soon as it connects to the wi-fi, whenever it encounters an obstacle, or whenever an SOS push button is pressed. But I didn't ...
Lucent1712's user avatar
1 vote
0 answers
35 views

Atmega328P constantly restarting when defining a function

I wanted to make a simple led on/off program using USART interface. When the code doesn't have any functions other than main it runs fine, however Arduino keeps resetting when one is included. At this ...
L1RG0's user avatar
  • 19
1 vote
0 answers
133 views

Nucleo F446ZE VS Nucleo F446RE

I don't know if this is the right forum to ask this, but I can't find people that want to help, so let's try it here... First I had an F446RE, and program it in PlatformIO with an Arduino Framework... ...
Swets's user avatar
  • 11
1 vote
0 answers
75 views

Need help with calling an API using an Arduino system

As stated in the title, I need help with calling an API. I'm trying to integrate make a call using the Verkada API but it seems to be using a cURL library that I'm not entirely certain I can get to ...
Tazbot815's user avatar
1 vote
0 answers
198 views

FastLED changing colour at holding state

Basically make a code to guide users through a box breathing exercise (breath in for 4 seconds, hold for 4, release for 4, hold again for 4, repeat) to help relax them. Right now my code is running ...
entirelyreverse's user avatar
1 vote
0 answers
208 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, ...
Petri Hietala's user avatar
1 vote
0 answers
89 views

1.) How do I delay a servo motor from turning in a loop? 2.) How do I make a servo motor's change in position dependent on temperature?

I'm super new to the c++ programming world (currently taking the class now) and I'm in need of some assistance with some coding that's way beyond my knowledge at the moment. I have to write a code for ...
Erin Trolinger's user avatar
1 vote
0 answers
128 views

I2C 16x2 LCD - Will Initialize (sometimes) - Holds Up The Code

Basically I have a keypad, that when a certain code is entered, it will write either "Wrong code" or "Good code" on the LCD. At the same time a timer will count down until 0 is ...
GeorgeWTrump's user avatar