Questions tagged [algorithm]

An algorithm is a sequence of well-defined steps that defines an abstract solution to a problem. Use this tag when your issue is related to algorithm design.

Filter by
Sorted by
Tagged with
1
vote
2answers
22 views

Converting each digit in an integer to its respective ASCII characters

For example what would be the process of converting the integer 1023 into ascii characters of 0x31 (1) 0x30 (0) 0x32 (2) 0x33 (3) Not looking for any library functions (I know of Serial.print() and ...
1
vote
1answer
40 views

How to detect patterns in an FFT output?

I have an FFT output from a microphone and I want to detect a specific animal's howl from that (it howls in a characteristic frequency spectrum). Is there any way to implement a pattern recognition ...
0
votes
1answer
67 views

Built-In Digital Map for Robot Driving

So, I'm creating this project for school. It's a simple robot with Arduino MEGA 2560 and basically, I create a digital map, feed it into the Arduino program and then the robot can drive. However, I've ...
0
votes
1answer
112 views

Digital map in A* search algorithm in Arduino [closed]

I am building an Automated Guided Vehicle as my graduation project. I'm new to path-finding algorithms and I've only worked with small projects based on Arduino as of now. I've chosen A* search after ...
2
votes
2answers
317 views

Maze solving robot turning failure due to sensor distance to the corner increasing during the turn

At my school we have a project where we have to make a robot that can solve a 3D-maze using an arduino controlled robot that uses ultrasonic sensors to determine how to turn. The robot may not be pre-...
0
votes
1answer
102 views

comparison in a time sequence [closed]

in an Arduino sketch a user is invited to input a number representing a time in the format HH:MM, this number is to be added at the end of an ordered and limited sequence of times --the first input (...
1
vote
2answers
280 views

Detect where pressure is being applied by using force resistors

I have 3 force resistors in a row, on top of which I have placed a board. I read values from the resistors through analogue ports. My goal is to be able to detect whether someone is pressing on the ...
1
vote
1answer
1k views

How do you balance an Arduino quadcopter using calculated gyro values?

I was working on an Arduino quadcopter project. I setup all my hardware and was having balancing problems with my software end. I am using an MPU-6050 gyro and accelerometer. I have calculated the ...
0
votes
1answer
53 views

Call function and not came back

Im having a little problem with my code. here i called a function to make a test, if it passed it goes back and continue if it doesn't it goes to main loop. void loop() { if (call == 1) { ...
5
votes
1answer
6k views

Compute yaw from magnetometer and accelerometer

I use an Arduino and a 9 DOF sensor (gyroscope, accelerometer and magnetometer) and I'm trying to use the pitch, roll and yaw that the sensor gives me to rotate an object in unity. I managed to ...
-9
votes
1answer
459 views

How does one write Jacobian algorithms using Arduino IDE?

I've seen some pretty big algorithms online such as this one. How would this type of algorithm be input in Arduino? How would the motor drivers know what this variable means or compute this type of ...
0
votes
1answer
1k views

Algorithm to detect motion using ultrasonic sensor

I have a PIR sensor which sometimes give false readings and I have added a ultrasonic sensor to compensate for that. I think my algorithm can work, however currently it is very prone to give false ...
2
votes
3answers
2k views

Algorithms to reduce measurement error from analogue sensors

When reading analogue sensors - e.g. load cells, accelerometers - via a microcontroller's Analogue to Digital Converter, there are many sources of potential measurement error including: a) Warm-up ...
2
votes
1answer
1k views

How to detect if more than one button was pressed

I am designing a turn signal bicycle blinker using two pushbuttons as input, one for each side, with a corresponding light for each button. The idea is this: Pressing one side makes same side start ...
1
vote
2answers
4k views

Using I2C: Master Reader and Writer

I'm using I2C and the Arduino Library (Wire) to communicate between two Arduinos, and my code isn't working. It's supposed to read in an int from the slave, write a value to the slave, then read back ...
2
votes
2answers
2k views

Exoskeleton Motor Control Code

Background: I have been working on an exoskeleton project with a group of friends, and I need help. I made another post on the robotics.stackexchange site for the drive system: https://robotics....
9
votes
5answers
5k views

Efficient algorithm/data structure to calculate moving averages

Currently I am developing a graphic LCD system to display temperatures, flows, voltages, power and energy in a heat pump system. The use of a graphic LCD means that half of my SRAM and ~75% of my ...