You seem to be using the kernel interface directly.
Do you have any plans to release a more general library?
I'm really having trouble with IIC for the US sensor.
I dug up some example for using mutexes: #include <pthread.h> #include <stdio.h> #include <stdlib.h> pthread_mutex_t mutex; int number = 0; void *dostuff(void *arg) { while (1) { pthread_mutex_lock(&mutex); number++; pthread_mutex_unlock(&mutex); } } int main(void) { pthread_t tid; pthread_m...
As people already said: The only way is to modify the makefile. Just add the effing flag to the file. Threads are hard to use correctly. You would be better of using a single loop to control the screen and the motors. The EV3 C stack is very much alpha, so IMO you should not use it if you don't want...
Very good find! I wonder indeed if the C program can access the sensors without freaking out lms. Possibly, this program could communicate over stdio with the system call and control the motors and sensors. That'd be a lot of work probably. Or maybe it could simply allow reverse arbitrary code execu...
Wild guess that this is how it's supposed to work: #include <pthread.h> // Multitasking-Demo: // 3 Motoren an die Motorausgänge A,B,C anschließen ! // die Motoren werden automatisch angesteuert, // die Encoderwerte werden simultan angezeigt! #include <stdio.h> #include <unistd.h> #include "ev...
Read a bit about pthreads, they allow you to do premptive multitasking on the EV3. You need to link your program with -lpthread though. I'm not sure how you would do that in BrixCC #include <stdio.h> #include <pthread.h> main() { pthread_t f2_thread, f1_thread; void *f2(), *f1(); int i1,i2; i1 = 1; ...
In my limitted testing, I'm quite happy with the ouput API (when it doesn't panic the kernel :-) ) I have not yet tested rotating multiple motors synchronously at different speeds, but I assume it is properly supported. I have not seen anything like absolute position regulation, but that's not too i...
Ah, nice to hear the rationele of the designer himself :-) I didn't even notice there was a pin missing, but you're right. I see how i's great for racing, but for paralleel parking I might actually redo the front section without the steering wheel to decrease the tolerance. It could greatly improve ...