Using Teensy 4.1
8mb ram added
16mb flashmem added
32gb SD card
Arduino IDE 1.8.16
Teensyduino 1.56 beta 2
Using TeensyThreads.h and NativeEthernet.h
Is there any good examples of threading and creating A simple-ish webserver?
The project I have currently, connects to my vehicle to scan it and logs to A SD card.
I have A simple web server deal going to where I can get my pages... view my SD card data, delete log files, even use jquery-csv plugin to generate A simple view of CSV file selected.
I even got AJAX working and A simple page to show "live" data via some gauges.
It "works" with something like
If the main feature of my project isn't running, the web interface works very well.
But once the main feature of the program starts to run where it is in a loop of Serial talking to the OBD2 of the vehicle that the web interface starts to no longer work.
It is as if the "serverloop" code in the thread that is all buried in there no longer really wants to run now.
Tried looking at the example and documents but not seeing anything standing out.
Like in my main thread/loop of the sketch, that I need to periodically give up some time slices back to a background thread? Since this is single core, need A way to allow back ground threads time to do their work
while A tight working main thread loop is running?
8mb ram added
16mb flashmem added
32gb SD card
Arduino IDE 1.8.16
Teensyduino 1.56 beta 2
Using TeensyThreads.h and NativeEthernet.h
Is there any good examples of threading and creating A simple-ish webserver?
The project I have currently, connects to my vehicle to scan it and logs to A SD card.
I have A simple web server deal going to where I can get my pages... view my SD card data, delete log files, even use jquery-csv plugin to generate A simple view of CSV file selected.
I even got AJAX working and A simple page to show "live" data via some gauges.
It "works" with something like
Code:
void thread_server() {
while (1) {
threads.delay(1);
serverloop();
}
}
void setup() {
..
..
..
webThreadID = threads.addThread(thread_server);
}
If the main feature of my project isn't running, the web interface works very well.
But once the main feature of the program starts to run where it is in a loop of Serial talking to the OBD2 of the vehicle that the web interface starts to no longer work.
It is as if the "serverloop" code in the thread that is all buried in there no longer really wants to run now.
Tried looking at the example and documents but not seeing anything standing out.
Like in my main thread/loop of the sketch, that I need to periodically give up some time slices back to a background thread? Since this is single core, need A way to allow back ground threads time to do their work
while A tight working main thread loop is running?