You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* for test by Enzo*/voidsetup() {
//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
}
}
floatthisByte=0.0f;
voidloop() {
Serial.print(" 0:");
Serial.print(sin(thisByte)*100.0f);
Serial.print(" 1:");
Serial.print(cos(thisByte)*100.0f);
Serial.print(" 2:");
Serial.print(sin(thisByte)*50.0f);
Serial.print(" 3:");
Serial.print(cos(thisByte)*50.0f);
Serial.print(" 4:");
Serial.print(sin(thisByte));
Serial.print("\n");
delay(100);
thisByte+=0.1f;
if (thisByte==360.0f) { // you could also use if (thisByte == '~') {thisByte=0.0f;
}
}
The text was updated successfully, but these errors were encountered:
示例代码 Arduino
The text was updated successfully, but these errors were encountered: