Home
Speculative DesignSilent Vinyl Record | Design for Justice
Hustling Stamp | Social Design
Trapped by Freedom |  Unveiling Humanity

Virtual Production
After Humanity: Echoes of Ijen
Exhibition Design
Blowing Dandelions | Data Visualization

Business Plan
Tomorrow Taipa | Social Service
Coding Work
Emotional Cocoon |  AI Ethics

Event Poster
She Rewires
CV
About 
Instagram & Rednote

BackTechinical Design








If button 1 is pressed, exit the loop and set the relay to a normally open state.

void loop() {
 button1State = digitalRead(button1_Gtech);
 button2State = digitalRead(button2_In);

 if (button2State == LOW && !loopActive) {
 loopActive = true;
 isPaused = true;
 startTime = millis();
 duration = random(0, 5000);
 }
}

If button 2 is pressed, start the random run and pause loop, with the duration ranging from 0 to 5 s.

if (loopActive) {
 if (isPaused) {
 if (millis() - startTime >= duration) {
 isPaused = false;
 digitalWrite(relayPin, HIGH);
 startTime = millis();
 duration = random(0, 5000);
 }
 } else {
 if (millis() - startTime >= duration) {
 isPaused = true;
 digitalWrite(relayPin, LOW);
 startTime = millis();
 duration = random(0, 5000);}
 }
}


© 2025 by Chuyao Dong. All rights reserved.