taweili / ardublock

ArduBlock is a Block Programming Language for Arduino.
GNU General Public License v3.0
413 stars 292 forks source link

Ultrasonic sensor #178

Open Zaurez opened 6 years ago

Zaurez commented 6 years ago

I have doubt about whether the pre-defined code of ultrasonic sensor block is correct or not. because when I uploaded it shows

duration = duration/59;

And i think it should be

distance = duration/59;

if everything is correct according to you help me with simple distance calculation using ultrasonic sensor and ardublock.

karlTH commented 6 years ago

Hello, Zaurez, the ultrasonic work fine. change in the code duration by distance, did it compile. let as it is does it work fine did it compile.

Zaurez commented 6 years ago

Yes it did compile But didn't got any value from the sensor for distance I have already worked through programming but I want to use ardublock for teaching purpose so please help me out.

On Nov 24, 2017 2:34 PM, "THOMAS karl" notifications@github.com wrote:

Hello, Zaurez, the ultrasonic work fine. change in the code duration by distance, did it compile. let as it is does it work fine did it compile.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taweili/ardublock/issues/178#issuecomment-346777469, or mute the thread https://github.com/notifications/unsubscribe-auth/Af3R9nPrIWDGbSK-nysjzhsjX-mu-Xc2ks5s5oa5gaJpZM4QpcZZ .

karlTH commented 6 years ago

the code work well, i use ultrasonic with arudblock. may be bug with echo trigger( pin), or somewhere else

Zaurez commented 6 years ago

Ok thanks for helping.

I might need your help in future with ardublock. Let me know if can I ask for your help.

On Nov 24, 2017 3:22 PM, "THOMAS karl" notifications@github.com wrote:

the code work well, i use ultrasonic with arudblock. may be bug with echo trigger( pin), or somewhere else

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/taweili/ardublock/issues/178#issuecomment-346787833, or mute the thread https://github.com/notifications/unsubscribe-auth/Af3R9qIQkpaUyLDjtEDLiH26Dyr-wcjCks5s5pHEgaJpZM4QpcZZ .