Originally Posted by
alphasuede
The python example that draws a square, has something like this.
1) given a response, it reads the buffer fullness
2) computes cap from the previous response
3) uses a coroutine to generate Cap number of points
4) writes cap number of points to ethernet.
That is interesting... The test.c file for libetherdream is much simpler:
Code:
i = 0;
while (1) {
fill_circle((float)i / 50, mode); // creates an array of 600 points based on polar coordinate math
int res = etherdream_write(d, circle, CIRCLE_POINTS, 30000, 1); // CIRCLE_POINTS is the number of points in the array = 600
if (res != 0) {
printf("write %d\n", res);
}
etherdream_wait_for_ready(d);
i++;
}