
/*
for test
by Enzo
*/
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
}
float thisByte = 0.0f;
void loop() {
Serial.print(sin(thisByte)*100.0f);
Serial.print(",");
Serial.print(cos(thisByte)*100.0f);
Serial.print(",");
Serial.print(sin(thisByte)*50.0f);
Serial.print(",");
Serial.print(cos(thisByte)*50.0f);
Serial.print(",");
Serial.print(sin(thisByte));
Serial.print("\n");
delay(10);
thisByte += 0.1f;
if (thisByte == 360.0f) { // you could also use if (thisByte == '~') {
thisByte = 0.0f;
}
}