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

using this with the Bit:Bot #1

Open
tgamble941 opened this issue Jul 20, 2017 · 1 comment
Open

using this with the Bit:Bot #1

tgamble941 opened this issue Jul 20, 2017 · 1 comment

Comments

@tgamble941
Copy link

I've tried your code on the Bit:Bot (see here) which only allows pin15 for accessory connections, but can't seem to get it to work.

In Microsoft MakeCode block editor, it seems to work fine using both pin15 for trig and echo. (see below)

Could you provide any help for a micropython solution for the above? (You can see your solution, with my edits below)

thanks
makecode snippet
HCSR04.txt

@rhubarbdog
Copy link
Contributor

rhubarbdog commented Nov 29, 2018

you can only set echo and trigger to same pin number if its a 3 pin device.power, ground and data.
the HCSR04 has 4 pins power, ground trigger and echo. they are 4 different pins.
i'm going to raise an issue at makecode i've seen this on other forums.
without disconnecting say the neopixel or deactivating display bit:bot has only one unused pin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants