5 Micro:bit Display - Automatic Sliding Door

Поделиться
HTML-код
  • Опубликовано: 19 янв 2020

Комментарии • 8

  • @Goplka
    @Goplka 2 года назад

    This AMAZING!!

  • @stevansetiawan6090
    @stevansetiawan6090 10 месяцев назад

    Halo mau tanya

  • @-iG-px1ij
    @-iG-px1ij 2 года назад

    Please mention the components
    I eagerly need it

    • @daisychow286
      @daisychow286  Год назад

      Materials used:
      Micro:bit, robotbit, stepper motor, bamboo stick, hose, gear rack, cardboard

  • @gustavo.daacostam1093
    @gustavo.daacostam1093 Год назад

    por favor me puedes envair el codigo de l progrma

  • @miriamhirsch4302
    @miriamhirsch4302 Год назад

    Plase, can you share the materias and code that you used?

    • @daisychow286
      @daisychow286  Год назад +1

      I am using Micro:bit and the code is as follows:
      function door (num: number) {
      robotbit.MotorRun(robotbit.Motors.M1A, num)
      basic.pause(1450)
      robotbit.MotorRun(robotbit.Motors.M1A, 0)
      }
      input.onButtonPressed(Button.A, function () {
      door(255)
      })
      input.onButtonPressed(Button.B, function () {
      door(-255)
      })
      basic.showIcon(IconNames.Heart)
      let time = 0
      let door_open = false
      basic.forever(function () {
      if (pins.digitalReadPin(DigitalPin.P15) == 0) {
      time = input.runningTime()
      if (!(door_open)) {
      door_open = true
      door(255)
      }
      } else {
      if (door_open) {
      if (input.runningTime() - time > 5000) {
      door(-255)
      door_open = false
      }
      }
      }
      })

    • @daisychow286
      @daisychow286  Год назад +1

      Materials used:
      Micro:bit, robotbit, stepper motor, bamboo stick, hose, gear rack, cardboard