#include <thread>
void setup() {
Serial.begin(115200);
}
void oscillate(){
for (float j = 0; j < 360; j=j+0.25) {
Serial.println(sin(j * (PI / 180)));
}
}
void loop() {
std::thread t1(oscillate);
t1.join();
}#include <thread>
void setup() {
Serial.begin(115200);
}
void oscillate(){
for (float j = 0; j < 360; j=j+0.25) {
Serial.println(sin(j * (PI / 180)));
}
}
void loop() {
std::thread t1(oscillate);
t1.join();
}