All Questions
Tagged with coding or programming
1,681 questions
1
vote
1
answer
1k
views
RF sniffer with Arduino
Hello programmers out in the world.
I am doing a capstone project for an RF sniffer to capture RF signals from Key fobs within an OEM manufacturing plant. I want to be able to decode this RF signal to ...
2
votes
1
answer
2k
views
How to make car turn 90 degrees?
I have an elegoo car model and am trying to make it turn 90 degrees whenever it gets to a 90 degree turn. This model has line tracing and it works fine on curved surfaces but doesn't work so on 90 ...
0
votes
1
answer
301
views
Error Compiling for board Arduino Nano while using Adafruit GFX
Whys is this happening to me??
I have to meet a deadline please help!!
Here is my code.
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h&...
2
votes
1
answer
6k
views
4 Bit Counter up and down
we are asked to create an Arduino code that would run a 4 Bit Binary UP counter once a push button switch is pressed and then 4 Bit Binary Down counter on the second click. Then vice versa. This ...
-1
votes
1
answer
477
views
How to make Arduino react to serial information?
I want to write a program that allows me to control the LED connected to pin 13 of the Arduino. When the program is started, the LED should be off. The user should open the serial monitor to ...
0
votes
1
answer
1k
views
confirming this will blink LED at given frequency
I want to blink an LED at an specific frequency, ie: 7Hz
here what Im doing
int ledPin = 4;
float freq = 7;
void setup() {
pinMode(ledPin, OUTPUT);
}
float periodo() {
float peri = 1/freq;
...
0
votes
1
answer
455
views
Whats wrong with my POST request?
Ive been trying to get POST working on my ESP8266. I followed this tutorial https://techtutorialsx.com/2016/07/21/esp8266-post-requests/ which works, but once i change the request URL to anything else ...
2
votes
1
answer
2k
views
Storing data in Arduino Portenta H7's SDRAM
I am working on storing data from Portenta H7's ADC through a high sample rate (>100kSa/sec) per channel. I am using 2 ADC channel for my work. Through the forum, I learned that the serial. print ...
-1
votes
1
answer
442
views
Efficient workflow/tools for converting color images to hex arrays
I would like to display 65k color animated gifs on my oled. I'm using the adafruit library for https://learn.adafruit.com/096-mini-color-oled
Now I need to convert a significant number of images to ...
1
vote
0
answers
159
views
Aurdino EMG sensors and servos?
I'm new here and to the aurdino.
I'm building a 3D printed robotic arm controlled by a EMG sensor. I purchased a V3 EMG board and leads on Aliexpress. Here's a list of the things I've purchase for ...
0
votes
1
answer
179
views
What's wrong with this code..?
I want to make an 8*8 led matrix. I found this code on the web:
int latchPin = 12; //Pin connected to ST_CP of 1st 74595
int clockPin = 13; //Pin connected to SH_CP of 1st 74595
int ...
1
vote
2
answers
853
views
unable to modify NTPClient to use static IP address
I tried the example File > Examples > ESP8266WiFi > NTPClient which requests the current time and it worked fine. Then I tried to modify it so that the ESP8266 would have a static IP ...
6
votes
3
answers
3k
views
Using Arduino as a standalone compiler
I mostly program in C/C++ so I conviniently have a GCC compiler for all my compilations. I was wondering if there is a special compiler for Arduino that can be used just like the GCC Compiler? Because ...
0
votes
2
answers
92
views
How do I program an LCD screen and do I need an Arduino
I am trying to create a small device with a screen that tells the date and time. I am thinking of using a UCTRONICS 0.96 Inch OLED Module (type that on Amazon). I am very new at coding, and I know ...
-3
votes
1
answer
141
views
How to put a condition on HTTP.POST?
I set my code to if it executes HTTP.POST, the count will reset / back to zero, but I noticed that even it returns other http code than 201 (-1 or 500), the count still resets.
How to put a condition ...
-1
votes
1
answer
223
views
Need help with millis () function for two linear actuators
Last week I was grateful to receive help programming the Arduino to control two linear actuators.
I need help re-writing the code using the millis () function. I am more than happy to reimburse for ...
1
vote
1
answer
270
views
How do I power a linear actuator at different speeds for specified periods of time
I am new to Arduino and wondering if anyone can help me get it programmed correctly. I am using two buttons to control a linear actuator to open and close a barn door. I want it to go a certain speed ...
1
vote
0
answers
95
views
Infared: some controllers send code into infinite loop
I have a piece of code that captures input from infrared and spits it out to the serial port.
When I use it with a simple controller that comes with a typical kit, it receives the infrared code just ...
0
votes
1
answer
1k
views
Splitting up code in multiple files causing `multiple definition` and `undefined reference` error
I have the following very basic program that reads MPU6050(accelerometer and gyroscope) sensor using the I2C library, and prints the sensor information. This program works as expected.
#include <...
1
vote
1
answer
1k
views
Adding zero padding to decimal values
I want to add zero before the float number like this:
010.0
The code I'm using is this:
if(value < 10){
lcd.print(F("0"));
}
lcd.print(value);
But when the value is exactly 10, it ...
2
votes
2
answers
122
views
Best Data model/Concept to Store Multi-Day Alarm for clock?
I'm writing a multiday day alarm program for a project.
I'm not sure how I want to store the format of each of 10 alarms....I need to store it...in SPIFFS retrieve it(at boot) and then compare it to ...
1
vote
0
answers
111
views
Changing the servo motor operating direction using arduino
I want to turn the servo motor 90 degrees with the first double high inputs, then I want to turn the motor 180 degrees with double high inputs, but the motor turns 180 degrees with one high input.
...
-1
votes
1
answer
2k
views
How to upload code to atmega32u4?
I recently created a pcb with the atmega32u4 to use it as a development board. The controller is connected to a micro usb port. Should I install the arduino bootloader instead of the deafult one? Or ...
1
vote
1
answer
374
views
Why do I get different results when compiling the same code with different ide?
I have a basic code about reading true rms.I compiled the same code with arduino ide and atmel studio, then ran it in a proteus simulation.I'm trying to measure how long the read_rms() function takes.
...
0
votes
3
answers
14k
views
Rounding to the next upper (or lower) 0.1
I'm reading from a temperature sensor. I get float values with 2 decimals. I want to round them to nearest 0.1.
This is my sketch:
void setup() {
Serial.begin(115200);
}
void loop() {
float ...
1
vote
0
answers
2k
views
Wemos d1 mini code not uploading
I have a wemos d1 mini. I uploaded a code in wemos d1 mini and after that my wemos mini not working. I tried to upload another code in it even the led blink sketch and even a blank sketch but whenever ...
1
vote
1
answer
379
views
Asymmetric encryption on a Teensy?
I want to monitor an input and then send the information in an encrypted way that can't be easily unlocked even if a malicious actor gets access to the device itself. I'm new to using the Teensy ...
2
votes
2
answers
132
views
RAM cost of entering functions
A friend has told me I shouldn't rely on functions because, during execution, they occupy a significant amount of RAM.
Is that true or, if it isn't, what's the maximum suggested level of function ...
6
votes
5
answers
3k
views
Is there any better choice other than using delay() for a 6-hours delay?
I am designing an incubator system and I need to drive a motor forward and reverse every 6 hours. Is there any better choice other than using delay()? A 6-hours delay seems a little unprofessional.
0
votes
1
answer
137
views
I can't find what I did wrong [closed]
int lightPin = 13;
int buttonPin = 2
void setup() {
pinMode(lightPin, OUTPUT); //red
pinMode(buttonPin, INPUT);
}
void loop() {
int buttonValue = digitalRead(buttonPin);
if (buttonValue == ...
4
votes
1
answer
1k
views
Why does Arduino round off some integers but not others when my desktop PC does not do this?
I am writing (in C) some low level digit manipulation routines that convert int to float and vice versa for Arduino. I came across some puzzling behaviour with Arduino rounding some numbers but not ...
-1
votes
1
answer
100
views
arduino parking lot
I want to make a project where there is a parking lot and a ir sensor which senses when a car comes and displays a message on lcd saying to insert a rfid card and then it opens a gate and there are ...
0
votes
1
answer
130
views
Question: how to join two different codes
I’m dabbling in Arduino and having trouble running two sketches on my Arduino UNO simultaneously. The first is about a program that reads temperature and relative humidity and the second is a program ...
1
vote
0
answers
139
views
Is it possible to program an atmega32 via internet or remotely with Android app?
There is a board with atmega32 microcontroller, sim card and Bluetooth modules. I used to program this microcontroller using a serial port cable. As long as the circuit is able to connect to internet, ...
1
vote
0
answers
701
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....
1
vote
2
answers
11k
views
Read Comma Separated String
I have a string that looks like this "10.00,20.00,-50.00," in which these are angle values and they have 2 decimals and can be negative. I want to separate them into 3 separate floats. Here ...
3
votes
2
answers
695
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 ...
1
vote
0
answers
54
views
How does one upload a synthesized solution to the Arduino Vidor FPGA?
I've compiled a solution and have received a ttf file from Intel Quartus which is designed for the Vidor 4000 Arduino board. The file represents a synthesized bitstream to be sent to the FPGA. How do ...
0
votes
3
answers
886
views
How do i make my DC motors run simultaneously?
Im coding an adafruit motor shield for 3 DC motors to go forward & backwards, and so my concern is why only my motor3 is running the whole time and motors 1 & 2 are switching off meaning 1 ...
1
vote
1
answer
342
views
Uno Wifi Rev2 Programming via Uno R3 ArduinoISP
I'm attempting to program Atmega4809 (Uno Wifi Rev2) via the ICSP pins on the board by connecting in this manner:
The difference is that I have a Uno Wifi Rev2 on the right instead of a Uno R3. I've ...
3
votes
2
answers
529
views
Form a signal from an array of bits
I need to reproduce with a digital pin of an Arduino such a key in the form of a sequence of 1's and 0's, where a one takes 2 ms high and 2 ms low, and a zero takes 1 ms high and 1 ms low.
int key =...
2
votes
0
answers
1k
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, ...
1
vote
2
answers
247
views
(very new to C) I'm trying to use irsend with what I think is char* but it won't take it. How can I convert it to what it needs?
I'm attempting to use a raspberry pi to send ir codes directly to my arduino to have as simple as a C program as possible. Here's my code I've been tinkering with that leads to errors or not working ...
4
votes
1
answer
413
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 ...
3
votes
1
answer
416
views
Pass Color to a function without using a specific Adafruit_NeoPixel
I'm initializing my strips as an array:
// Declare NeoPixel strip array:
Adafruit_NeoPixel strip[] = {
Adafruit_NeoPixel(LED_COUNT[0], LED_PIN[0], NEO_RGBW + NEO_KHZ800),
Adafruit_NeoPixel(...
0
votes
1
answer
143
views
Use Android on Arduino TFT
I don't know whether this is possible or not but is there any way that I can run something similar to Android on a normal TFT. I want to make complex graphics but can't program those complex programs ...
1
vote
0
answers
302
views
How can I interface, received HC-12 data and transmit the received data using sx-1278 RF-module in arduino-UNO?
I am currently working on a project, where I need to send data from first unit to the second unit which is a few km apart, so I decided to go with hc-12 RF module as it covers upto 5km. Then the data ...
2
votes
3
answers
222
views
Count specific range of output as 1 single output
The LDR sensor gives a range of values to show whether a LED is OFF/ON, let's say above LDR range 400, the led is ON. When a LED is ON, after reading the sensor values it shows above LDR range 800, ...
1
vote
0
answers
84
views
esp8266 sending to both webserver and myphpadmin
I have tried to send all the variables to both the webpage and to myphpadmin. I seperated
the code into two functions and put the functions inside the void loop() function under the
impression that it ...
3
votes
1
answer
3k
views
Alternatives to Nextion display
I am wanting to have a display where I can design the GUI on a program and then somehow transfer it to the display. For the graphics I want to make, it would be really hard to manually write the code. ...