Shop OBEX P1 Docs P2 Docs Learn Events
S3 Rubber-Laser Gun & Educational activities - Page 2 — Parallax Forums

S3 Rubber-Laser Gun & Educational activities

2»

Comments

  • ercoerco Posts: 20,256
    Looking really great, Nikos!
  • 72sonett72sonett Posts: 82
    edited 2018-03-04 10:43
    Ah, I see...

    It is still possible to calculate the exact tilt angle τ. Measure the distance from the 'barrel' to the rotation point R, say 'b'.

    Then
    α = atan (h/(a + d))
    m = √(h**2 +(a+d)**2)
    β = acos (b/m)
    γ = 180 - β - α (in degrees, or π - β - α in radians)

    and

    τ = 90 - γ (or π/2 - γ in radians)
    593 x 330 - 40K
  • NikosGNikosG Posts: 705
    edited 2018-03-06 08:26
    72sonett wrote: »
    Ah, I see...

    It is still possible to calculate the exact tilt angle τ. Measure the distance from the 'barrel' to the rotation point R, say 'b'.

    Then
    α = atan (h/(a + d))
    m = √(h**2 +(a+d)**2)
    β = acos (b/m)
    γ = 180 - β - α (in degrees, or π - β - α in radians)

    and

    τ = 90 - γ (or π/2 - γ in radians)

    Right!!!

    So we have a "heavy" enough formula for the Tilt ...
    Tilt_formula.jpg
    I'll try to transorm it in to Blockly command using the new
    "Multiple argument math block"
    Stephanie and Ken explained the function of this block on webinar....
    However that formula is complicated enough...


    531 x 157 - 12K
  • NikosGNikosG Posts: 705
    edited 2018-03-15 20:20
    right%20triangle_path.jpg
    Working with some activities with my students, we programed the S3 in order to move on a path of a right triangle.
    [img][/img]S10_m_senario.jpg
    The triangle had vertical sides 100 and 50 cm and the robot using Blockly Prop calculated the acute angle, as well as the hypotenuse of the triangle.

    here is the bloclyProp code
    S10_m_senario2.jpg
    and here is a video:

    [video] [/video]
    524 x 309 - 19K
    1095 x 821 - 164K
    678 x 656 - 100K
  • ercoerco Posts: 20,256
    Bravo! Very dramatic stop at the end. A real cliffhanger!
  • erco wrote: »
    Bravo! Very dramatic stop at the end. A real cliffhanger!

    Yeah,
    I had a mistake on two last commands on my Blocklyprop code:
    The left and right motor distance should be "Y" instead of "f"
    Here is the right code:
    678 x 686 - 108K
  • I would like to see it find and shoot at a target... :)
  • ercoerco Posts: 20,256
    72sonett wrote: »
    I would like to see it find and shoot at a target... :)

    By all means, Nikos' asset-3 (S3) should pursue and fire at moving targets as been previously demonstrated in Greece on the streets of Athens. Flaming obstacles optional. :)



Sign In or Register to comment.