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.

126 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
2answers
942 views

How can an Arduino Mega 2560+Wifi Shield 2.0 (SeeedStudio) receive data from database in a XAMPP server on my PC?

I'm trying to connect my Arduino Mega via Wifi to my XAMPP server. My main objective is get a value from my database and store it on a variable in Arduino code. With this new variable I'll be able to ...
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. ...
2
votes
3answers
829 views

Using an accelerometer with an Arduino as a shock sensor

I really need some help. I have absolutely no experience with accelerometers and have a project that would work great if I could integrate one into it. I am not hinting to have some write me a code, ...
2
votes
0answers
413 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()...
2
votes
1answer
2k views

How to get response of issued AT command for ES266 on Arduino programatically?

I'm successfully running AT commands via the Serial Monitor. But now I'm issuing AT commands via Arduino code and facing problems getting the correct response. Goal: After issuing AT commands ...
2
votes
0answers
370 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
341 views

USB Keyboard in Retro Emulators

I have created a retro keyobard using a ZX spectrum and a PRO MICRO based on the info here: http://blog.tynemouthsoftware.co.uk/2013/04/arduino-leonardo-based-zx81-usb-keyboard.html When plugged into ...
1
vote
0answers
45 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 ...
1
vote
0answers
35 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 ...
1
vote
0answers
29 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 (...
1
vote
1answer
143 views

Printing elements of char array from PROGMEM

Given: const char* PROGMEM names[] = {"Foo","Bar"}; Serial.print(names[0]); I get garbage output. Is there some function that will print the string from PROGMEM? E.G.: Serial.print(<function ...
1
vote
0answers
56 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 ...
1
vote
1answer
95 views

Will this sketch eventually fail because of integer limit issue?

I am a novice in Arduino programming and I'm setting up an Arduino controlled, underwater time-lapse camera to take a picture every 2 hours. It's going in the ocean for a month and I want to be sure ...
1
vote
2answers
245 views

Can client IP address be obtained from Arduino Ethernet2 library for W5500 during client.connected() call?

I've found posts explaining how to get client IP by modifying the W5100 Ethernet library and the Adafruit CC3000 library but not the Ethernet2 lib for W5500 chip, which is different enough that the ...
1
vote
2answers
2k views

Arduino OTA port not updating in Arduino IDE

The OTA (from the ArduinoOTA library) on my ESP8266 does not show up in the programming ports on the Arduino IDE unless I restart the IDE. Even when I plug in a usb cable and the ports list updates ...
1
vote
0answers
46 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 ...
1
vote
0answers
39 views

Zero-ing Compass | Following Magnet Strip Robot

So my problem is purely programming, I understand the problem but can't figure out what to do, Is there a library? should I create my own code for Zero-ing my compass so I don't have value from earth ...
1
vote
0answers
124 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 ...
1
vote
0answers
63 views

ALLBOT knee joints not moving

I am trying to write a simple script for an ALLBOT, but am encountering a very peculiar issue. With the following code, I can align all the servos: #include <Servo.h> #include "constants.h" // ...
1
vote
0answers
1k 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. ...
1
vote
0answers
199 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 ...
1
vote
0answers
65 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 ...
1
vote
0answers
33 views

Not hearing PlayBack from code that records and plays back MIDI

I have altered some code that i found online that records and playback midi data from a midi controller. from my testing i am pretty sure that notes are being recorded from my midi controller, i have ...
1
vote
0answers
337 views

How to play Midi from the Sparkfun Mp3 Player Shield?

in the video: https://www.youtube.com/watch?v=zc1zbwheyE0 I suspect they may be using the midi playback functionality of the chip (VS1053b) on the Mp3 shield. how do you playback Midi from the mp3 ...
1
vote
0answers
441 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 ...
1
vote
0answers
61 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: ...
1
vote
1answer
2k views

Using MMA8451 accelerometer to count steps

I'm trying to use an Adafruit MMA8451 accelerometer to create a pedometer-type device that counts steps. I'd like to initiate a counter that says "if the x-axis readout is > some threshold, add 1 to ...
1
vote
0answers
241 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 ...
1
vote
0answers
206 views

OV7670 non FIFO with AL440?

I am trying to build a low-cost Arduino-based camera image to SD card prototype and would like to know if it is feasible to connect a non-FIFO OV7670 camera to an AL440B video buffer to avoid the ...
1
vote
0answers
199 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 ...
1
vote
0answers
424 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 ...
1
vote
0answers
270 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 ...
1
vote
0answers
1k 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 ...
1
vote
0answers
89 views

27 Servo Project, Uno with Adafruit's 16-Channel Drivers

I'm working on a project where I need to be able to control 27+ servos. The problem is that I am unsure how to control them from a computer. I'd love to build a simple program with a user interface ...
1
vote
0answers
550 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 ...
1
vote
0answers
519 views

Checking string condition?

I'm looking for my Arduino board to jump to a function based on an if condition, where a string (content) is checked to see if it matches the word FALLEN. However, the if condition never occurs ...
1
vote
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 ...
1
vote
0answers
963 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
3answers
4k views

Implement Visible Light communication using Arduino

I want to implement a simple VLC based communication system using two Arduinos and send messages/data/files between two PCs. For that I have a simple transmitter circuit with an LED on Tx side and a ...
1
vote
1answer
789 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 ...
1
vote
1answer
122 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 ...
1
vote
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 ...
0
votes
0answers
16 views

How to adapt this code using a DF Mini Player and interrupts for the ATTiny85?

So I programmed my Arduino Mega 2560 to play certain sound effects from a DF Mini Player that I have. I took the base code that I modified from online so some fo the names might seem odd. Currently, ...
0
votes
0answers
77 views

Having problem in coding Arduino Uno

I'm making a timer program which takes the Time Duration as input from the user by two button switches (one for 'up' and one for 'down'), and after pressing an another button switch ('start'), the ...
0
votes
0answers
47 views

Using the YS-IRTM with an Arduino Uno

Picked up a YS-IRTM IR Transmitter/Receiver module to do some testing for a project. There's not a lot of details on it but eventually came across two very important sources: Translated Module ...
0
votes
1answer
20 views

Using case statement with IR emitter reciever

I am trying to use two "infrared obstacle avoidance modules" to work with the following sketch. From all my research, I believe, a case statement is my best option because, (I understand) the sketch ...
0
votes
0answers
24 views

UV sensor help!

I am creating a uv sensor. The sensor detects a certain amount of UV light and turns on the respective light (eg uv of 1-3 turns on a blue light). However I am getting an error: "expected primary-...
0
votes
0answers
20 views

Accel Multi Stepper - Array for timelapse operation

I am trying to run 2 cameras for timelapse. I can do this with a single stepper: void doSteps(long steps) { calcSpeedStepper(); digitalWrite(sleepPIN, HIGH); stepper1.setCurrentPosition(0); ...
0
votes
0answers
14 views

HC-05 Bluetooth AT Mode

I know that I need to pull pin #34 high on the HC-05 "chip" (AKA PIO11) while powering ON the chip in order to put it into AT mode. Can I leave that pin high while programming, or does it need to go ...
0
votes
0answers
44 views

Is it possible to convert RCA(video only) to Arduino Uno then to a computer?

I have an old wireless RCA output camera. I was wondering if I can convert its analog input to a digital one and have it saved on a file in my laptop?