Stories
Slash Boxes
Comments

SoylentNews is people

Log In

Log In

Create Account  |  Retrieve Password


cafebabe (894)

cafebabe
(email not shown publicly)

Journal of cafebabe (894)

The Fine Print: The following are owned by whoever posted them. We are not responsible for them in any way.
Tuesday August 08, 17
04:32 AM
Code

I've written a program which implements the functionality for a buzzer round of a quiz game. This is suitable for two, three or four teams to have a common button (or buttons wired in parallel). The program performs a power-up test of lights and buzzer before entering the main loop. When a member of one team presses the team's button, a buzzer sounds for one second and the team's light stays locked on until the quizmaster hits a reset button.

It requires an Arduino compatible micro-controller configurable as five digital inputs (button1, button2, button3, button4, reset) and five digital outputs (light1, light2, light3, light4, bell). The first team has a very small advantage which can be measured in millionths of a second. Making a completely equally weighted input is left as an exercise. Keeping score is a more difficult exercise because it requires a routine to compensate for switch bounce.

begin 644 buzzer.ino.gz
M'XL(`#P`AUD"`WV26T^#,!B&[_D57^(-6]1!6]V,V<W,/"33>6#9-9%N:X(M
MEJ+9S/Z[I3`$I+N#]^G[G0=]F&2['95P*R2\9&P'=^$'3:$_<`9]<&]ZR/.'
M$&PHW`B>"JE8]G&>TQSGS!MY(Y#T+%6A5`>0)O2=K;:0,)["2D=F/,E4"B&/
M0&0J_S9!3B*Z8IS"[.'N/O`!-04$N"E@($V!P$4E3*:S&5S^_2Z"8/[DP["E
M(!BU%`Q7+86`[U72R^OT;1J`[SO.EV`11(RO7<85Q#WX<4#_KYD*XZ5DBKKQ
MZ;VNJW?=UO/B:HC&X=;U/<^SO)S-EX9(JC+)KYW](;?0N3O2%O.K;/\9.L+P
M$49*=BC@\SMDJMF]KB@V[N\-BZE;QGBE8>06H^N-QWD0^-GG[TT')J"^$YEQ
M$/R=FF,P"5+=<5*VJ*_G4415=_-%\+P(3*H&05:"K81T$3/Z+KTXI=.'IVZ"
MK`1;">D@Q;AJP`RWZ+[X+X=7)\A*L)60%JF=6;D421,:*AK%V[_5Q$(<-L-6
LC3V7`]*+-B=NGD!Y*[7R]S8GLCO1<2>V._%Q)[$[2>6L#>87E=OD@RH%````
`
end

(Usual instructions for uudecode process.)

Display Options Threshold/Breakthrough Reply to Article Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 2) by Snow on Wednesday August 09 2017, @02:51PM (1 child)

    by Snow (1601) on Wednesday August 09 2017, @02:51PM (#551120) Journal

    Hey cafebabe,

    I just wanted to say that I appreciate your articles that you are posting to your journal. You are doing good work :)

    -- Snow

    • (Score: 2) by cafebabe on Thursday August 10 2017, @04:04AM

      by cafebabe (894) on Thursday August 10 2017, @04:04AM (#551439) Journal

      I'm a fan of your journal and I was specifically thinking about it over the last few days. Here I am tinkering and you're posting about *life* in very revealing detail. From your articles, I understand that you're relatively busy. However, if you had endless time, you could write far more and far more important things than me. Your experience is outside of many people's experience. I feel unqualified to comment about specifics in the manner that I feel unqualified to comment about astronomy or biology articles. Regardless, your articles are particular savored.

      --
      1702845791×2
  • (Score: 0) by Anonymous Coward on Wednesday August 09 2017, @09:05PM (1 child)

    by Anonymous Coward on Wednesday August 09 2017, @09:05PM (#551296)

    Why are you posting code on your journal. Nobody will ever uncode all that oldskool shit. Put it on github or you don't fucking exist.

    • (Score: 2) by cafebabe on Thursday August 10 2017, @03:32AM

      by cafebabe (894) on Thursday August 10 2017, @03:32AM (#551433) Journal

      Why are you posting code on your journal.

      I post content where it is welcome. That means places where it is possible to have open discussion. That excludes Google [soylentnews.org], GitHub and BitBucket [knowyourmeme.com].

      Nobody will ever uncode all that oldskool shit.

      Counter-example [soylentnews.org]. I've also been in situations where it was convenient to obtain my own code in this format.

      Put it on github or you don't fucking exist.

      There's a really significant counter-example. The primary author of git is Linus Torvalds. His main project, Linux, uses git for development but he doesn't use GitHub. Why is that? Is it because GitHub is a repository for toy projects? Or maybe because a popular action on GitHub is the point-and-click equivalent of git clone? I understand that even relatively obscure projects have 20 identical copies with no further development. Anyhow, dear anonymous user, I apologize that my workflow doesn't facilitate your resumé padding but some people find this workflow preferable.

      --
      1702845791×2
(1)