We’re rewarding the question askers & reputations are being recalculated! Read more.

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Protothread keeps 'stalling'

So I'm working with protothreading for an arduino, and I'm running into an issue with the PT_WAIT_UNTIL() method Here's my function, generally, static void playNote(struct pt *pt,int n, int L){ ...
0
votes
1answer
26 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 ...
0
votes
0answers
27 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
1answer
330 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" ...
2
votes
2answers
167 views

How can i do something like multi threathing in arduino?

I am checking for ways to implement multi threathing in Arduino, I have also tried using the library TimerOne but it doesn't seem to work, what I'm trying to make is an Arduino application then, every ...
0
votes
1answer
614 views

Lighting LED Strip via HC-06 Bluetooth Module

What I Am Working With: I am working on a project involving an Arduino, some RGB led strip, and my PC. My Project: The PC sends UART (serial) data to the Arduino over Bluetooth (through a HC-06 ...
1
vote
1answer
1k views

Is this a proper implementation of FreeRTOS for Arduino?

I'm using the RGBLCDShield library and a few analog input signals and since it seems the interrupts are being used by the SPI interface of the LCD Shield, I decided to try it with FreeRTOS instead. I ...
1
vote
0answers
176 views

Receiving and transmitting messages simultaneously

tldr; I am writing a mesh network software using arduinos. I need to wirelessly receive, process, and transmit data, all simultaneously. I am aware of protothreads library, and the other software ...
1
vote
1answer
117 views

mthread and multiple header files

I'm using mthreads (https://github.com/jlamothe/mthread) for my arduino. But now as the project is getting bigger, it would make sense to break it up in several files. I successfully outsourced ...
7
votes
1answer
3k views

Event driven programming

I have ran across a couple of different event libraries that are available on the AVR and Andruino but I am not sure which one is the best option. What I would like to do is design my program in a ...
0
votes
1answer
510 views

Is it possible to accept multiple web requests at once?

I have an Arduino with ethernet shield and there are 8 different URLs that can be called to perform different actions. The program loads and runs as expected for the most part, but, if it is busy ...
1
vote
2answers
443 views

Existence of a non blocking and task yield framework for Arduino programming

I've been playing around with Arduino and understand that the standard runtime provides a single thread essentially. I was wondering if it is possible to write a thin layer (library) that allows one ...
1
vote
5answers
371 views

Multi-threaded Robot

I am working on a small robot project, the code which i made for this has a sequential execution in a single thread. There are a lot of Delay() function needed. Due to which the accuracy is extremely ...
0
votes
1answer
119 views

Embedded-c, schedule a function?

Simple question, of course if you do this FunctionA(); Delay(1000); FunctionB(); FunctionC(); it will call A, then wait a second, then call B, then call C. How does one do this? ... FunctionA(); ....
0
votes
2answers
3k views

Arduino Protothreads by Example

I am trying to get Arduino working with Protothreads and wanted to confirm I have the basic setup correct. If I have understood the API correctly, then the following code should be what I need to ...
0
votes
2answers
277 views

Multithreading Leds and Joystick

I'm trying to made a program that turn on and turn off leds with an input and send the coordinates of joystick, but, in the loop, the arduino makes one at a time, and i want make this in the same time....
1
vote
1answer
201 views

How to avoid the code interrupting itself?

I have this code, which I am using with a potentiometer to control the speed of a automotive fuel injector. In it, I have specified how long the injector shall stay open by using the delay functions. ...
0
votes
1answer
141 views

Paralellizing sensor data input [closed]

I have a total of 15 sensors (analog and digital) connected to an arduino mega. For my real-time control application, it's really really important that all data be collected simultaneously at regular ...
8
votes
3answers
6k views

Multiple independent LED patterns

I have an problem, which at first thoughts (and being new to Arduino) I though was a perfect application for an Arduino. However, after trying and failing to implement it I am doubting myself! Simply ...
60
votes
9answers
123k views

How can I create multiple running threads?

Is there a way I can have multiple parts of the program running together without doing multiple things in the same code block? One thread waiting for an external device while also blinking a LED in ...