Search found 7 matches
- Tue Dec 17, 2019 5:06 pm
- Forum: micro:bit boards
- Topic: pin digital_read
- Replies: 9
- Views: 8117
- Wed Dec 11, 2019 9:57 am
- Forum: micro:bit boards
- Topic: pin digital_read
- Replies: 9
- Views: 8117
Re: pin digital_read
jimmo - brilliant - that code works! Many thanks for your help. Your notes on the bit:bot are extremely useful as well. On your github pages for ncss-embedded is there something I need to have installed so the equations show properly? In my browser they just show as the text eg \begin{equation} V_{t...
- Tue Dec 10, 2019 7:01 pm
- Forum: micro:bit boards
- Topic: pin digital_read
- Replies: 9
- Views: 8117
Re: pin digital_read
Thanks for the replies. I loaded lugo's code onto the bitbot and it just returns -1 all the time, which means it's timing out while waiting for the pulse to finish. Not quite sure what this means. I would suspect the batteries except for the fact that the same bitbot will return ultrasonic distances...
- Fri Dec 06, 2019 11:30 am
- Forum: General Discussion and Questions
- Topic: How do I upload an image to a post?
- Replies: 3
- Views: 2042
- Fri Dec 06, 2019 10:56 am
- Forum: General Discussion and Questions
- Topic: How do I upload an image to a post?
- Replies: 3
- Views: 2042
How do I upload an image to a post?
Can't find how to upload an image from my local drives to a post. If I click on the Insert Image icon it just puts the tags img into the post but doesn't open a window to browse to the image file. Sorry if this is not the right part of the forum for this question. Please tell me what is the right pl...
- Fri Dec 06, 2019 10:25 am
- Forum: micro:bit boards
- Topic: pin digital_read
- Replies: 9
- Views: 8117
Re: pin digital_read
Thanks for your reply. I have no control over the pins, as that's the way the bitbot is wired up. I know it works using the same pin for both because this code in Java PXT returns the distance (albeit not very accurately): basic.forever(function () { basic.showNumber(Math.round(bitbot.sonar(BBPingUn...
- Wed Dec 04, 2019 10:18 am
- Forum: micro:bit boards
- Topic: pin digital_read
- Replies: 9
- Views: 8117
pin digital_read
I am trying to programme a HC-SR04 ultrasonic sensor mounted on a 4tronix bitbot robot. The following micropython code is from the 4tronix website: from microbit import * from utime import ticks_us, sleep_us SONAR = pin15 def sonar( ): SONAR.write_digital(0) # Clear trigger sleep_us(2) SONAR.write_d...