WouterVessies

Eurobricks New Members
  • Content Count

    8
  • Joined

  • Last visited

About WouterVessies

Spam Prevention

  • What is favorite LEGO theme? (we need this info to prevent spam)
    City

Profile Information

  • Gender
    Male
  • Location
    Boskoop, The Netherlands

Extra

  • Country
    The Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thank you Jim for your review. Programming in Scratch 3 is more intuitive, than the standard EV3 software.
  2. Thanks for the information. I added a battery box as shown in the first Youtube movie and this works.
  3. Is it possible to power a power functions IR receiver with an 9v LEGO train speed regulator or an other non-LEGO 9v power supply, instead of a power functions battery box? I tried the 9v train speed regulator, it doesn't work, but the power function lights and motors are running well on it.
  4. I removed the rotation sensors they were causing the problem. I even tested the rotation sensor after the gearing (24:1) but the result became even worse. I have written a new program based on running the motors for a fixed amount of time and this is working fine.
  5. After 7 times opening and closing there is a noticeable offset, so every time open and closing the offset increases a bit.
  6. I have automated the LEGO Railway crossing 4539 with Mindstoms RCX2.0 and made a program with the original software. The program works, but after running a while the position of the beams get of sync and are pushed into the the roadplate. Is there a solution to prevent this? For measuring the rotations I use on both motors a rotation sensor, see the photos for the setup. A screenshot of the program is enclosed. RailroadCrossing_V3 by Wouter Vessies, on Flickr DSC00652 by Wouter Vessies, on Flickr DSC00651 by Wouter Vessies, on Flickr
  7. Thank you Lok24, that was indeed the solution, I have read over it when I read the documentation.
  8. I'm busy with automating a LEGO railway crossing and have therefore written the code below. This code works fine, but motor D starts only when motor A is finished. Are there possibilities to start both motors at the same time? #!/usr/bin/env pybricks-micropython from pybricks.hubs import EV3Brick from pybricks.ev3devices import (Motor, TouchSensor, ColorSensor, InfraredSensor, UltrasonicSensor, GyroSensor) from pybricks.parameters import Port, Stop, Direction, Button, Color from pybricks.tools import wait, StopWatch, DataLog from pybricks.robotics import DriveBase from pybricks.media.ev3dev import SoundFile, ImageFile # Initialize the EV3 Brick. ev3 = EV3Brick() sensor_1 = UltrasonicSensor(Port.S1) motor_A = Motor(Port.A) motor_D = Motor(Port.D) # parameters speed = 6*165*10 # [deg/s] rotation_angle = 24*90 # gear ratio 24:1 dis_track_1 = 65 # [mm] t1 = 10*1000 # [sec] while True: if sensor_1.distance() < dis_track_1: # close railway crossing ev3.light.on(Color.RED) motor_A.run_angle(speed=speed, rotation_angle=-rotation_angle, then=Stop.HOLD, wait=True) motor_D.run_angle(speed=speed, rotation_angle=-rotation_angle, then=Stop.HOLD, wait=True) # wait 10 seconds wait(t1) # open railway crossing motor_A.run_angle(speed=speed, rotation_angle=rotation_angle, then=Stop.HOLD, wait=True) motor_D.run_angle(speed=speed, rotation_angle=rotation_angle, then=Stop.HOLD, wait=True) ev3.light.on(Color.GREEN)