Forum Replies Created

Page 1 of 3
  • etutill

    Member
    October 31, 2021 at 11:05 am in reply to: NASA’s Ingenuity Helicopter Page
    96
    75
    2
    1
    0

    @alexanderb – really interesting. Thanks for sharing!

  • 96
    75
    2
    1
    0
  • etutill

    Member
    August 10, 2021 at 7:48 am in reply to: general discussion
    96
    75
    2
    1
    0

    Hey Ryan – One of the ways that vines “know” where to grow is by growing away from light or towards darkness. This is a tropism (biological effect on a plant caused by external stimuli). I’m pretty much paraphrasing wikipedia here, but, in the case of a vine, if there is a taller object near by that is blocking light, a vine would grow towards the absence of light until it reaches the object, and then grow up it. The many of the biological processes involved hinge on plant hormone production/balance. Lots of good info here for a jumping off point. https://en.wikipedia.org/wiki/Phototropism

  • etutill

    Member
    July 6, 2021 at 8:35 am in reply to: National Robotics Week
    96
    75
    2
    1
    0

    @katejackson

  • etutill

    Member
    July 6, 2021 at 8:24 am in reply to: Robotics for Young Learners (Under 6 Years Old)
    96
    75
    2
    1
    0

    Hi @janiefoz , I just found this site, but, so far it appears to be a pretty good resource for robotics related information for children (and adults):
    https://www.nationalroboticsweek.org/Resources

  • etutill

    Member
    June 19, 2021 at 6:24 pm in reply to: Adeept RaspTank Project
    96
    75
    2
    1
    0

    will do

  • etutill

    Member
    June 18, 2021 at 6:10 pm in reply to: Adeept RaspTank Project
    96
    75
    2
    1
    0

    Now that it moves properly I need to see how well it follows lines.

  • etutill

    Member
    June 15, 2021 at 12:50 pm in reply to: Adeept RaspTank Project
    96
    75
    2
    1
    0

    because the rasptank has a hdmi port, usb ports and wifi I’ve edited the move.py file in two different ways.

    1. By connecting to the hdmi port and using a bluetooth mouse/keyboard and editing the move.py file on the raspberrypi locally using the raspbian operating system

    2. The much faster option is connecting wirelessly via ssh to the tank while it is powered up and editing the move.py file using vi through the command line interface. It’s a pain at first (I’m really rusty), but, once I got used to making a lot of changes, it made it a lot faster to make a quick file change, run the robot program, test the changes, figure out if my change was garbage, make another change, test it again, and again….

    • etutill

      Member
      June 15, 2021 at 12:51 pm in reply to: Adeept RaspTank Project
      96
      75
      2
      1
      0

      I havn’t even tested the cool features on this machine yet, so, more to come. @katejackson

  • etutill

    Member
    June 15, 2021 at 12:43 pm in reply to: Adeept RaspTank Project
    96
    75
    2
    1
    0

    pi@raspberrypi:~/adeept_rasptank/server $ cat move.py

    #!/usr/bin/env python3

    # File name : move.py

    # Description : Control Motor

    # Product : GWR

    # Website : http://www.gewbot.com

    # Author : William

    # Date : 2019/07/24

    import time

    import RPi.GPIO as GPIO

    # motor_EN_A: Pin7 | motor_EN_B: Pin11

    # motor_A: Pin8,Pin10 | motor_B: Pin13,Pin12

    Motor_A_EN = 4

    Motor_B_EN = 17

    Motor_A_Pin1 = 14

    Motor_A_Pin2 = 15

    Motor_B_Pin1 = 27

    Motor_B_Pin2 = 18

    Dir_forward = 0

    Dir_backward = 1

    left_forward = 1

    left_backward = 0

    right_forward = 1

    right_backward= 0

    pwm_A = 0

    pwm_B = 0

    def motorStop():#Motor stops

    GPIO.output(Motor_A_Pin1, GPIO.LOW)

    GPIO.output(Motor_A_Pin2, GPIO.LOW)

    GPIO.output(Motor_B_Pin1, GPIO.LOW)

    GPIO.output(Motor_B_Pin2, GPIO.LOW)

    GPIO.output(Motor_A_EN, GPIO.LOW)

    GPIO.output(Motor_B_EN, GPIO.LOW)

    def setup():#Motor initialization

    global pwm_A, pwm_B

    GPIO.setwarnings(False)

    GPIO.setmode(GPIO.BCM)

    GPIO.setup(Motor_A_EN, GPIO.OUT)

    GPIO.setup(Motor_B_EN, GPIO.OUT)

    GPIO.setup(Motor_A_Pin1, GPIO.OUT)

    GPIO.setup(Motor_A_Pin2, GPIO.OUT)

    GPIO.setup(Motor_B_Pin1, GPIO.OUT)

    GPIO.setup(Motor_B_Pin2, GPIO.OUT)

    motorStop()

    try:

    pwm_A = GPIO.PWM(Motor_A_EN, 1000)

    pwm_B = GPIO.PWM(Motor_B_EN, 1000)

    except:

    pass

    def motor_left(status, direction, speed):#Motor 2 positive and negative rotation

    if status == 0: # stop

    GPIO.output(Motor_B_Pin1, GPIO.LOW)

    GPIO.output(Motor_B_Pin2, GPIO.LOW)

    GPIO.output(Motor_B_EN, GPIO.LOW)

    else:

    if direction == Dir_backward:

    GPIO.output(Motor_B_Pin1, GPIO.LOW)

    GPIO.output(Motor_B_Pin2, GPIO.HIGH)

    pwm_B.start(100)

    pwm_B.ChangeDutyCycle(speed)

    elif direction == Dir_forward:

    GPIO.output(Motor_B_Pin1, GPIO.HIGH)

    GPIO.output(Motor_B_Pin2, GPIO.LOW)

    pwm_B.start(0)

    pwm_B.ChangeDutyCycle(speed)

    def motor_right(status, direction, speed):#Motor 1 positive and negative rotation

    if status == 0: # stop

    GPIO.output(Motor_A_Pin1, GPIO.LOW)

    GPIO.output(Motor_A_Pin2, GPIO.LOW)

    GPIO.output(Motor_A_EN, GPIO.LOW)

    else:

    if direction == Dir_forward:#

    GPIO.output(Motor_A_Pin1, GPIO.LOW)

    GPIO.output(Motor_A_Pin2, GPIO.HIGH)

    pwm_A.start(100)

    pwm_A.ChangeDutyCycle(speed)

    elif direction == Dir_backward:

    GPIO.output(Motor_A_Pin1, GPIO.HIGH)

    GPIO.output(Motor_A_Pin2, GPIO.LOW)

    pwm_A.start(0)

    pwm_A.ChangeDutyCycle(speed)

    return direction

    def move(speed, direction, turn, radius=0.6): # 0 < radius <= 1

    #speed = 100

    if direction == ‘forward’:

    if turn == ‘right’:

    motor_left(0, left_backward, int(speed*radius))

    motor_right(1, right_forward, speed)

    elif turn == ‘left’:

    motor_left(1, left_forward, speed)

    motor_right(0, right_backward, int(speed*radius))

    else:

    motor_left(1, left_backward, speed)

    motor_right(1, right_backward, speed)

    elif direction == ‘backward’:

    if turn == ‘right’:

    motor_left(0, left_forward, int(speed*radius))

    motor_right(1, right_backward, speed)

    elif turn == ‘left’:

    motor_left(1, left_backward, speed)

    motor_right(0, right_forward, int(speed*radius))

    else:

    motor_left(1, left_forward, speed)

    motor_right(1, right_forward, speed)

    elif direction == ‘no’:

    if turn == ‘right’:

    motor_left(1, left_backward, speed)

    motor_right(1, right_forward, speed)

    elif turn == ‘left’:

    motor_left(1, left_forward, speed)

    motor_right(1, right_backward, speed)

    else:

    motorStop()

    else:

    pass

    def destroy():

    motorStop()

    GPIO.cleanup() # Release resource

    if __name__ == ‘__main__’:

    try:

    speed_set = 60

    setup()

    move(speed_set, ‘forward’, ‘no’, 0.8)

    time.sleep(1.3)

    motorStop()

    destroy()

    except KeyboardInterrupt:

    destroy()

    pi@raspberrypi:~/adeept_rasptank/server $

  • etutill

    Member
    June 15, 2021 at 12:39 pm in reply to: Adeept RaspTank Project
    96
    75
    2
    1
    0

    OK. So I finally put my money where my mouth is and started messing with the code to make this robot respond to commands correctly. It took me a bit to figure out, but, there are a couple of different ways you can do this:

    – As described above you can adjust the parameters. In my quest for the “right” settings I made a lot of changes to the variable values that didn’t work.

    – Eventually instead of messing with the direction variables, I adjusted the methods.

    – I’ll paste in the “before” move.py file code that was turning correctly but went forward when commanded backwards and vice versa.

    – Then I’ll paste in the “after” move.py file code with the changes that enabled the robot to respond to my commands correctly.

    – For fun you can root out the changes I made – if your into that

    • etutill

      Member
      June 15, 2021 at 12:40 pm in reply to: Adeept RaspTank Project
      96
      75
      2
      1
      0

      I saved the “before” code before I started making changes in case I really bungled the original file with my adjustments…

      • etutill

        Member
        June 15, 2021 at 12:41 pm in reply to: Adeept RaspTank Project
        96
        75
        2
        1
        0

        # “before” code

        # file before I changed pin settings…

        #!/usr/bin/env python3

        # File name : move.py

        # Description : Control Motor

        # Product : GWR

        # Website : http://www.gewbot.com

        # Author : William

        # Date : 2019/07/24

        import time

        import RPi.GPIO as GPIO

        # motor_EN_A: Pin7 | motor_EN_B: Pin11

        # motor_A: Pin8,Pin10 | motor_B: Pin13,Pin12

        Motor_A_EN = 4

        Motor_B_EN = 17

        Motor_A_Pin1 = 14

        Motor_A_Pin2 = 15

        Motor_B_Pin1 = 27

        Motor_B_Pin2 = 18

        Dir_forward = 0

        Dir_backward = 1

        left_forward = 0

        left_backward = 1

        right_forward = 0

        right_backward= 1

        pwm_A = 0

        pwm_B = 0

        def motorStop():#Motor stops

        GPIO.output(Motor_A_Pin1, GPIO.LOW)

        GPIO.output(Motor_A_Pin2, GPIO.LOW)

        GPIO.output(Motor_B_Pin1, GPIO.LOW)

        GPIO.output(Motor_B_Pin2, GPIO.LOW)

        GPIO.output(Motor_A_EN, GPIO.LOW)

        GPIO.output(Motor_B_EN, GPIO.LOW)

        def setup():#Motor initialization

        global pwm_A, pwm_B

        GPIO.setwarnings(False)

        GPIO.setmode(GPIO.BCM)

        GPIO.setup(Motor_A_EN, GPIO.OUT)

        GPIO.setup(Motor_B_EN, GPIO.OUT)

        GPIO.setup(Motor_A_Pin1, GPIO.OUT)

        GPIO.setup(Motor_A_Pin2, GPIO.OUT)

        GPIO.setup(Motor_B_Pin1, GPIO.OUT)

        GPIO.setup(Motor_B_Pin2, GPIO.OUT)

        motorStop()

        try:

        pwm_A = GPIO.PWM(Motor_A_EN, 1000)

        pwm_B = GPIO.PWM(Motor_B_EN, 1000)

        except:

        pass

        def motor_left(status, direction, speed):#Motor 2 positive and negative rotation

        if status == 0: # stop

        GPIO.output(Motor_B_Pin1, GPIO.LOW)

        GPIO.output(Motor_B_Pin2, GPIO.LOW)

        GPIO.output(Motor_B_EN, GPIO.LOW)

        else:

        if direction == Dir_backward:

        GPIO.output(Motor_B_Pin1, GPIO.HIGH)

        GPIO.output(Motor_B_Pin2, GPIO.LOW)

        pwm_B.start(100)

        pwm_B.ChangeDutyCycle(speed)

        elif direction == Dir_forward:

        GPIO.output(Motor_B_Pin1, GPIO.LOW)

        GPIO.output(Motor_B_Pin2, GPIO.HIGH)

  • etutill

    Member
    October 12, 2021 at 8:36 pm in reply to: The Emotional Cup
    96
    75
    2
    1
    0

    Walking around the lake next to my house. Sometimes I lose track of the number of laps…

  • etutill

    Member
    July 20, 2021 at 5:46 am in reply to: physical wellbeing
    96
    75
    2
    1
    0

    I love trampolines! Super dangerous, but, so much fun and such a great workout and so good for developing balance and spacial awareness (in my opinion).

Page 1 of 3