Stephaude
Posts: 1
Joined: Mon Dec 25, 2017 10:28 pm

Ultrasonic Scratch2

Tue Dec 26, 2017 7:29 am

Hello
I use the ultrasonic sensor in scratch 1.4 (ultrasonic + trigger + trigger pin + echo + echo pin). On the other hand, I can not use this sensor in scratch 2. Do you have a solution?
Thank you
Bye

Forris
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 245
Joined: Fri Jan 06, 2012 7:46 pm

Re: Ultrasonic Scratch2

Tue Jan 02, 2018 2:45 pm

A bit more info would be useful:

How are you connecting the sensor ?

What does your script look like, in both 1.4 and 2.0 ?

What is it, specifically, that doesn't work ?

ghp
Posts: 1170
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Ultrasonic Scratch2

Tue Jan 02, 2018 8:06 pm

Hello,
since a short time scratchClient is supporting scratch2 in addition to scratch1.4. There is an adapter supporting the ultrasonic sensor.
See http://heppg.de/ikg/wordpress/?p=984 for a summary.

When connecting the ultrasonic HC-SR04, be sure to use level shifters for the output signal. The sensor is powered by 5V.

Hope this helps,
Gerhard

Return to “Scratch”

Who is online

Users browsing this forum: No registered users and 1 guest