mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 19:17:47 +00:00
committed by
Ayke van Laethem
parent
8f7b7e6ee3
commit
e4fa1a8288
@@ -20,20 +20,18 @@ func main() {
|
||||
|
||||
count := 0
|
||||
for {
|
||||
machine.I2C0.WriteTo(0x09, []byte("n"))
|
||||
|
||||
switch count {
|
||||
case 0:
|
||||
// Crimson
|
||||
machine.I2C0.WriteTo(0x09, []byte{0xdc, 0x14, 0x3c})
|
||||
machine.I2C0.WriteTo(0x09, []byte{'n', 0xdc, 0x14, 0x3c})
|
||||
count = 1
|
||||
case 1:
|
||||
// MediumPurple
|
||||
machine.I2C0.WriteTo(0x09, []byte{0x93, 0x70, 0xdb})
|
||||
machine.I2C0.WriteTo(0x09, []byte{'n', 0x93, 0x70, 0xdb})
|
||||
count = 2
|
||||
case 2:
|
||||
// MediumSeaGreen
|
||||
machine.I2C0.WriteTo(0x09, []byte{0x3c, 0xb3, 0x71})
|
||||
machine.I2C0.WriteTo(0x09, []byte{'n', 0x3c, 0xb3, 0x71})
|
||||
count = 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user