0

Adafruit Circuit Playground Express leveler
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Circuit Playground Express leveler

by jorge77 on Thu Dec 07, 2017 4:05 am

Hello,

I'm sorting through some tutorials to introduce my students to the CPX.

When I try the Adafruit Circuit Playground Express leveler example on the Makecode reference page, it works when the CPX is upside down with the printing on the back facing up. Is that how it's meant to be?

Also on this page, the code shows
absolute X + absolute X < 64

Should one of those be Y?

Sorry for the noob questions.

Thank you.

jorge77
 
Posts: 2
Joined: Sat Nov 25, 2017 3:21 am

Re: Adafruit Circuit Playground Express leveler

by jorge77 on Thu Dec 07, 2017 6:14 am

I changed
Code: Select all | TOGGLE FULL SIZE
if (Math.abs(pitch) < 10 && Math.abs(roll) < 10)
to
Code: Select all | TOGGLE FULL SIZE
if (Math.abs(pitch) < 10 && Math.abs(roll) > 170)
and now it works right side up.

jorge77
 
Posts: 2
Joined: Sat Nov 25, 2017 3:21 am

Please be positive and constructive with your questions and comments.