This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// © 2015, 2019 Gabriel Jones | |
import org.scalajs.dom | |
import spire.math.Complex | |
import spire.implicits._ | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
val TAU = 2*Math.PI | |
val LIMIT = 255 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SimpleCounter demo | |
// A simple distributed counter example | |
// | |
// On startup, blinks are dim BLUE which shows they are in IDLE mode waiting for a master | |
// | |
// Button press a blink to make it master of the cluster. The master will show the current count | |
// using the 0-342 display format decribed below under showNumber()... | |
// | |
// While a blink is actively part of a counting cluster, it will show dim GREEN on the face | |
// that points to its parent. All parent faces eventually lead back to the master. |