1

Hardware Blocks

When we are doing hardware programming, usually, we need to connect the sensor to a port of board (like Arduin board).

Such as Digital Port or Analog Port. So we need to set the Port name when we are coding.

An Arduino usually have multiple Digital Ports and Analog Ports, which are named in order as D0~D13, A0~A5.

1. LED [port] [status]

  • Decide whether the LED(s) is/are on or off

2. LED [port] set brightness to (50)

  • Set the LED(s) brightness (1~100)

3. unidirectional motor [port] [start] rotating

  • Apply to unidirectional motor only. Set the motor to start or stop rotating.

4. unidirectional motor [port] set rotational speed to (50)

  • Apply to unidirectional motor only. Set motor rotational speed (0~100).

5. bidirectional motor [port] rotates [forward]

  • Apply to bidirectional motor. Set the motor to start or stop rotating, and the rotational direction.

6. bidirectional motor [port] set rotational speed to (50)

  • Apply to bidirectional motor. Set motor rotational speed with number (-100~100, positive number to rotate forward; vice versa).

7. buzzer [port] [start] buzzing

  • Decide whether the buzzer buzzes or not.

8. vibration [port] [start] vibrating

  • Decide whether the vibration vibrates or not.

9. vibration [port] set vibration intensity (50)

  • Set the intensity of vibration (0~100).

10. sound trigger [port] detects sound

  • It is a Boolean type block.

  • Report true if sound trigger detects sound.

11. sound sensor [port] detected loudness

  • Intensity of sound detected by sound sensor (0~100).

12. light trigger [port] detects light

  • It is a Boolean type block.

  • Report true if light trigger detects light.

13. light sensor [port] detected brightness

  • Intensity of light detected by light sensor (0~100).

14. switch [port] [on]

  • It is a Boolean type block.

  • Report true if the switch is in the chosen state (on or off).

  • Please note: it can detect all types of switch, such as push switch, toggle switch, roller switch and so on.

15. motion trigger [port] detects movement

  • It is a Boolean type block.

  • Report true if motion trigger detects motion.

16. thermo switch [port] detects high temp

  • It is a Boolean type block.

  • Report true if thermo detects high temp.

17. treed switch [port] detects magnetic field

  • It is a Boolean type block.

  • Report true if reed switch detects magnetic field.

18. dimmer [port] rotation amount

  • Get the rotation amount of dimmer (0~100).

  • Dimmer is the knob.

19. pressure sensor [port] detects pressure

  • Get the pressure detected by pressure sensor (0~100).

20. slide dimmer [port] movement amount

  • Get the movement amount (0~100) detected by slider dimmer.