Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ultrasonic Ranger and 4-digit display counters not working #34

Closed
humb1t opened this issue Dec 6, 2024 · 7 comments
Closed

Ultrasonic Ranger and 4-digit display counters not working #34

humb1t opened this issue Dec 6, 2024 · 7 comments
Labels
pxt-grove Label for pxt-grove UAY Unassigned yet

Comments

@humb1t
Copy link

humb1t commented Dec 6, 2024

When I try to use

  • Ultrasonic Sensor (in cm) at P0
  • set Display to 4-digit Display at P0 and P14
    I receive an error in make code:Property 'C16' does not exist on type 'typeof DigitalPin'". Here is an example:

https://makecode.microbit.org/_Hqtgx99XbKde

@martinwork
Copy link

Reported in Micro:bit Foundation support ticket https://support.microbit.org/helpdesk/tickets/84361 (private)

@MKleinSB @MatthewJeffson This extension seems to have been changed (d0ead22) to target calliopemini.

"calliopemini"

Is it possible to restore micro:bit compatibility?

@Lesords Lesords added UAY Unassigned yet pxt-grove Label for pxt-grove labels Dec 9, 2024
@Lesords
Copy link

Lesords commented Dec 9, 2024

Please change C16 to P0 and try again

@humb1t
Copy link
Author

humb1t commented Dec 9, 2024

@Lesords please check the template I shared. I do not choose C16 there, I choose P0.

@Lesords
Copy link

Lesords commented Dec 9, 2024

@Lesords please check the template I shared. I do not choose C16 there, I choose P0.

I just looked at this template.

Click JavaScript button, then you will see C16 in line 8, just change it

@Lesords
Copy link

Lesords commented Dec 9, 2024

@Lesords please check the template I shared. I do not choose C16 there, I choose P0.

I just looked at this template.

Click JavaScript button, then you will see C16 in line 8, just change it

Or you can reselect P0

@humb1t
Copy link
Author

humb1t commented Dec 9, 2024

@Lesords thank you, I regret that I didn't check Javascript tab to see that. It seems like by default the settings in blocks view are different from what is really encoded in them. I will close that issue then.

@martinwork
Copy link

Thanks @MKleinSB for proposing a fix: #35

Thanks @Lesords for suggesting the workaround.

When the block is added on https://makecode.microbit.org/ it says P0 so it's not obvious to a micro:bit user what the C17 message is about.

image

C16 and C17 are default pin selections in the extension code that are not appropriate for micro:bit

//% group="Ultrasonic" pin.defl=DigitalPin.C16

//% clkPin.defl=DigitalPin.C16 dataPin.defl=DigitalPin.C17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pxt-grove Label for pxt-grove UAY Unassigned yet
Projects
Status: Done
Development

No branches or pull requests

3 participants