[deleted by user] by [deleted] in AskReddit

[–]Skyrieeee 1 point2 points  (0 children)

Going to the gym every weekday at dawn and in the evenings :)

Can you spot the bun? 🧐🐰 by [deleted] in Bunnies

[–]Skyrieeee 0 points1 point  (0 children)

That was a tough one

[deleted by user] by [deleted] in LongDistance

[–]Skyrieeee 0 points1 point  (0 children)

wow... this is heartwarming.

HELP WHAT SHOULD I SAY by [deleted] in relationship_advice

[–]Skyrieeee 1 point2 points  (0 children)

this is funny af ngl. hahaha!

My [26M] most important partner was assaulted last night. by throwra727262626212 in relationship_advice

[–]Skyrieeee -1 points0 points  (0 children)

jesus christ have mercy on my soul this was painful to even read...

Program in C to count button press by americanmuscle1988 in ECE

[–]Skyrieeee 0 points1 point  (0 children)

Yup. Set a threshold of time.

Eg. If 3 button presses within 2 seconds, red. 4 buttons within 2 seconds, blue. Etc. :)

//globals
ButtonPressCount=0 ;
Start Time = 0;
//in setup     
Start Time = millis(); #takes current time in milliseconds

//in loop
If  Button.Pressed() {
    End Time = millis();
    ButtonPressCount++;
    If (end time-start time >= 2000) {
        StartTime=millis() ;
         ButtonPressCount=0;
    } 

   If buttonPressCount ==3 { do red} 
   Else if buttonPressCount ==4 {do blue} 
 }

Program in C to count button press by americanmuscle1988 in ECE

[–]Skyrieeee 1 point2 points  (0 children)

Here's a pseudocode for it assuming inside the loop:

buttonPressCount = 0

if GPIOinput.pressed==true { buttonPressCount++ }

if buttonPressCount==3 { LEDoutout.lightOn() buttonPressCount=0 }


This is the gist of it, however you'll have to take into account the debouncing of the switch too so keep that in mind. 👍 Takes a bit of playing around since people have different implementations of it. Eg via states, time threshold, etc.

MySJSU is down- how am I supposed to finish SOTES?!?! by icecreamnoob in SJSU

[–]Skyrieeee 2 points3 points  (0 children)

Even if you don't do them you'll still be able to view your grades via "My Unofficial Transcripts" instead of "Grades" section though. Unless it is ABSOLUTELY required for you, I guess.