Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions arduino-nano33/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ var (
// used by i2c tests
accel *mpu6050.Device
powerpin = machine.D7

serial = machine.UART0
)

const (
Expand All @@ -55,7 +53,7 @@ const (
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C0.Configure(machine.I2CConfig{})
machine.InitADC()

Expand All @@ -80,8 +78,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions arduino/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ var (

// used by i2c tests
accel *mpu6050.Device

serial = machine.UART0
)

const (
Expand All @@ -53,7 +51,7 @@ const (
)

func main() {
serial.Configure(machine.UARTConfig{BaudRate: 57600})
machine.Serial.Configure(machine.UARTConfig{BaudRate: 57600})
machine.I2C0.Configure(machine.I2CConfig{})
machine.InitADC()

Expand All @@ -77,8 +75,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions circuitplay-express/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ var (

// used by i2c tests
accel *lis3dh.Device

serial = machine.UART0
)

const (
Expand All @@ -50,7 +48,7 @@ const (
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C1.Configure(machine.I2CConfig{SCL: machine.SCL1_PIN, SDA: machine.SDA1_PIN})
machine.InitADC()

Expand All @@ -75,8 +73,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(200 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions hifive1b/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ var (
// used by i2c tests
accel *mpu6050.Device
powerpin = machine.D9

serial = machine.UART0
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C0.Configure(machine.I2CConfig{})

waitForStart()
Expand All @@ -59,8 +57,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions itsybitsy-m4/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ var (

// used by i2c tests
powerpin = machine.D7

serial = machine.UART0
)

const (
Expand All @@ -53,7 +51,7 @@ const (
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C0.Configure(machine.I2CConfig{})
machine.InitADC()

Expand All @@ -78,8 +76,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions itsybitsy-nrf52840/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ var (
// used by i2c tests
accel *mpu6050.Device
powerpin = machine.D7

serial = machine.UART0
)

const (
Expand All @@ -54,7 +52,7 @@ const (
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C0.Configure(machine.I2CConfig{})
machine.InitADC()

Expand All @@ -79,8 +77,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions maixbit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ var (
// used by i2c tests
accel *mpu6050.Device
powerpin = machine.D33

serial = machine.UART0
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C0.Configure(machine.I2CConfig{})

waitForStart()
Expand All @@ -73,8 +71,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
8 changes: 3 additions & 5 deletions microbit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ var (

// used by i2c tests
mag *mag3110.Device

serial = machine.UART0
)

func main() {
serial.Configure(machine.UARTConfig{})
machine.Serial.Configure(machine.UARTConfig{})
machine.I2C0.Configure(machine.I2CConfig{})

waitForStart()
Expand All @@ -55,8 +53,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down
6 changes: 2 additions & 4 deletions stm32f4disco-1/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ var (

// used by i2c tests
accel *mpu6050.Device

serial = machine.UART0
)

func main() {
Expand All @@ -58,8 +56,8 @@ func waitForStart() {
println("Press 't' key to begin running tests...")

for {
if serial.Buffered() > 0 {
data, _ := serial.ReadByte()
if machine.Serial.Buffered() > 0 {
data, _ := machine.Serial.ReadByte()

if data != 't' {
time.Sleep(100 * time.Millisecond)
Expand Down