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.

198 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
1k views

Leonardo-based tachometer?

I'm new here. I'm not a native speaker, so pardon my English. I just received my Arduino Leonardo today. I tried some basic calculations and stuff like blinking and LCD interfacing. Its interesting. ...
3
votes
0answers
175 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 ...
3
votes
0answers
557 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()...
3
votes
0answers
385 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 ...
2
votes
0answers
40 views

Program an lcd display with 12 pins

I have a screen just like this (is the datasheet). My question is, Can I use it to an Arduino board?
2
votes
0answers
127 views

Arduino Mega as a EEPROM Programmer for Winbond W29EE011 memories

I'm trying to use my Arduino Mega as an EEPROM memory writer. For this project, besides my Arduino Mega, I use an SD Card module, an LCD display and two push buttons to handle the events. Inside the ...
2
votes
0answers
79 views

Servo motor won't work for a specific code

I have written a code with interrupts to control the servo but my servos are not working. One is meant to work with interrupt but the other one has to simply move but it is also not working. Even the ...
2
votes
0answers
50 views

Problem getting data from Arduino pro mini

I am currently working on a drone project using multiwii. I m using mpu6050 as gyro and accelerometer sensor with i2c protocol. I was able to read data coming from mpu6050 while using Arduino Uno ...
2
votes
0answers
32 views

Arduino Mega with Sensors and tftlcd 2.4 inch

I am working with tftlcd 2.4 inch with Arduino mega 2560 board. In this code I just want to show clock as my default or home screen. By clicking on clock at any point on screen user should get a new ...
2
votes
1answer
85 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 ...
2
votes
0answers
88 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() { ...
2
votes
0answers
33 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 <...
2
votes
1answer
135 views

RS-485 Serial communication problem with arduino

I use 485 modules to transmit data serially from one arduino uno to another uno. If I connect the 2 arduino boards directly without using the rs485 module, the data is sent and received without a ...
2
votes
1answer
102 views

Static ip for esp8266 based on gateway

I'm new to Arduino programming. I want to make my esp8266 get static IP based on gateway. I mean if gateway is 192.168.0.1 then it should get 192.168.0.15 as static IP. And if gateway is 192.168.1.1 ...
2
votes
0answers
109 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 ...
2
votes
0answers
92 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 ...
2
votes
0answers
234 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 ...
2
votes
0answers
40 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 (...
2
votes
1answer
144 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 ...
2
votes
0answers
519 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 ...
2
votes
0answers
49 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 ...
2
votes
0answers
214 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 ...
2
votes
0answers
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. ...
2
votes
0answers
231 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 ...
2
votes
0answers
71 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 ...
2
votes
0answers
568 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 ...
2
votes
0answers
66 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: ...
2
votes
0answers
256 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 ...
2
votes
1answer
918 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 ...
2
votes
0answers
213 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 ...
2
votes
0answers
498 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 ...
2
votes
0answers
329 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 ...
2
votes
0answers
2k views

Pelco D Library for Arduino

Does anyone know of any Pelco D libraries available for Arduino? I already have a PTZ joystick controlling 3 PTZ cameras, but I would like to add an Arduino 'intelligent' controller capable of ...
2
votes
1answer
209 views

Quick Programming Check/Review

I've been racking my head trying to start programming in a library organized method. My code works, but the translation and split to a .h and .cpp file is riddled with errors. It's gotta be stupidly ...
2
votes
1answer
1k views

Issues with PIR Sensor triggering by itself

I am currently working on my first Arduino project and I am having some issues that I am seeking help with. The robot I am building must have human following capabilities and to do so I am using 3 PIR ...
2
votes
0answers
568 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 ...
2
votes
0answers
5k 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 ...
2
votes
0answers
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 ...
1
vote
0answers
39 views

Expected signature for ATmega328P is 1E 95 0F; I can not burn bootloader on my arduino Uno

well... the problem starts from the time that I accidentally touched the crystal on my arduino and all of a sudden everything messed up; the leds on arduino turned on and off while being touched, and ...
1
vote
0answers
33 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 ...
1
vote
0answers
48 views

Issues porting capacitive touch code from Arduino to avr

I'm trying to port GreatScott's capacitive touch code to avr. From my understanding the timer is constantly generating a pulse via the TIMER1_COMPA interrupt and the circuit works when I test it ...
1
vote
0answers
24 views

Click counter using SparkFun Qwiic Twist

I wrote the script below in order to count the number of times that I press the SparkFun Qwiic Twist. But when I press the button, I get series of running numbers on the Serial Monitor and not a ...
1
vote
0answers
37 views

State machine controlling dc motor/ buzzer/ lcd / ultrasonic

I ran into some problems here with programming. I am trying to put together a code for 4dc motors, buzzer, ultrasonic and lcd to work together,. they will together make up a small car. when the ...
1
vote
0answers
34 views

DC motor and buzzer blink without delay code

So I am trying to put together a code for 4dc motors, buzzer, ultrasonic and lcd to work together,. they will together make up a small car. when the distance to the ultrasonic is smaller than 10cm, ...
1
vote
0answers
29 views

Can't transfer information from esp8266 to arduino

I have esp8266. Which I am trying to set up to be a self-contained access point and server (tcp). ESP8266 is connected to ports 2,3 of Arduino Uno. On Arduino, I want to process all information coming ...
1
vote
0answers
54 views

Send Multiple Sensors Data into single Packet in Arduino

I have two sensors data in packet but now I want to send these two sensors data into single packet in which these two sensors data are gathered. I mean I want to have a packet in which I have oxygen, ...
1
vote
0answers
35 views

How to name the temperature sensors instead of printing address using ds2482-100 and ds18b20 sensor- Help

I am using 10 ds18b20 Temperature sensors using with "DS2482-100" I2C board and Arduino so when I am getting the output like this:- "ROM = 28 46 04 1F 0D 00 00 74 96014B467FFF0A100A 25....
1
vote
0answers
80 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 ...
1
vote
0answers
22 views

Error in program that measures distance from a ultrasonic sensor

I am trying to use an ultrasonic sensor in conjuncture with different devices like a proximity sensor and a solenoid and alarm. This is how the project is supposed to work: A container is placed on a ...
1
vote
0answers
35 views

Use AGPS functionality with Arduino and GPS module

Recently, we developed the UTRAQ L100 GNSS Module base board for testing all the capabilities of the GPS receiver. https://www.elementzonline.com/blog/utraq-gps-l100-module-based-on-irnss-supported-by-...