Questions tagged [threads]
Threads are different processes that a device runs at once. Unless it has multiple cores, it has to switch between the threads to ensure that all the threads get ran.
30 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
65
views
Problem when running Servo library with thread (Protothreads)
When running two threads, one for blinking led once every second, one for sweeping the servo 180 degrees. The servo just vibrates.
When I tested adding a serial printout in the run servo for loops for ...
0
votes
1
answer
345
views
How can I make my code Thread-Safe?
So I made a post yesterday running into an issue on my ESP32 using both cores on the microcontroller (with wifi enabled, incase that is important).
I'm using both cores to control two Neopixel strips ...
2
votes
2
answers
135
views
arduino acclerometer with servo motor
I'm currently working on project to operate three motors while sending accelerometer value to computer via bluetooth module. I want the motor operation and value transmission to work seperatly. But ...
3
votes
2
answers
381
views
Is it bad practice to multitask without timing constraints
Going through resources such as several things at the same time and with some greatly appreciated assistance on here I'm finally getting a grasp on how to multitask a microcontroller.
Most examples ...
0
votes
1
answer
211
views
Arduino stuck in PT_WAIT_UNTIL
I am using the Protothread Library from Adam Dunkels.
It is supposed to wait 1 second and then continue. But instead it gets stuck there and everything after that line is not executed.
lastTimeBlink = ...
0
votes
1
answer
421
views
Why I can't exit this while loop by reading from the Serial?
I'm trying to work with the FastLed libraries and i'm controlling a Led Stip via a WEMOS D1 MINI based on the ESP8266, what I'm trying to achieve is to jump from fastled animation to another one.....
5
votes
2
answers
321
views
What’s the most common (and low cost) microprocessor with at least two threads?
I want to make a next version of my current project. I’m hoping to use an Arduino compatible processor that also supports at least 2 processes simultaneously without using pro threading or any other ...
1
vote
2
answers
1k
views
How can I use both ultrasonic and IR sensor and ultrasonic sensor at ones with Arduino
I want to use both the ultrasonic sensor and IR sensor with Arduino + motors for a car project. Will I have to do any kind of multithreading on Arduino, or is it something else
2
votes
2
answers
3k
views
ESP32: How to run two independent PID controllers, one per core?
I want to control 2 independent processes with 2 PID controllers. Is it possible to run each controller on a separate core? I'm using this PID library. According to its documentation, the PID::Compute(...
1
vote
1
answer
414
views
Is my sketch 'thread safe'?
I come from a .Net background, typically I would 'lock' operations on an integer when I have thread-safe requirements. I'm not sure that applies to my sketch here? Could I potentially bypass an ...
1
vote
0
answers
252
views
Bluetooth multithreading
I'm using my Arduino to make a speaker-like device. Instead of sound, it receives the beat of the song, thus the data comes in an array of floats. Each item in the array is a timestamp, an LED is ...
1
vote
0
answers
115
views
FreeRTOS single thread vs Function call
Good day to everyone,
I am currently working on project using ATmega2560. I want to use threading, that is why I decided to use FreeRTOS. However, I cannot make one thread to work fine, so that I ...
1
vote
1
answer
386
views
Can we call GPRS HTTP request asynchronously in Arduino?
Usually GPRS modules (SIM800,900, A6, etc) that used with arduino are called in synchronous way in HTTP (GET/POST) request. It takes more than 10 seconds in most times and this makes the system very ...
1
vote
0
answers
145
views
Capacitive Sensor and Thread
Looking for a great way to detect when someone touches thread, or if 4 people touch thread etc.
I'm not looking for a hand count, but I'm going to try to translate it into MIDI for use in a project.
...
1
vote
1
answer
512
views
Protothread Library Stalling on One Thread
I am trying to use a protothreading library found here
http://harteware.blogspot.com/2010/11/protothread-powerfull-library.html
to perform protothreading with my Arduino so I can "simultaneously" ...