fixed compass bug

This commit is contained in:
Peli de Halleux
2017-03-29 06:47:52 -07:00
parent b3ad4e5b4d
commit a2a28391d0
4 changed files with 14 additions and 43 deletions

View File

@ -27,28 +27,7 @@ let degrees = input.compassHeading()
```blocks
let degrees = input.compassHeading()
if (degrees < 45) {
if (degrees < 45 || degrees > 315) {
basic.showString("N", 150)
}
```
## 4. Write the 'If statement' that will check if the device is mostly pointing East. Display 'E' on the @boardname@
```blocks
let degrees = input.compassHeading()
if (degrees < 135) {
basic.showString("E", 150)
}
```
## 5. Write the 'If statement' that will check if the device is mostly pointing South. Display 'S' on the @boardname@
```blocks
let degrees = input.compassHeading()
if (degrees < 225) {
basic.showString("S", 150)
}
```